@alfatech/livechat 2025.7.0-5.1 → 2025.7.0-9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +14 -14
  2. package/package.json +2 -1
package/dist/main.js CHANGED
@@ -34,10 +34,10 @@ var vg=e=>{throw TypeError(e)};var $E=(e,t)=>()=>(t||e((t={exports:{}}).exports,
34
34
  `+Kc+e}var Gc=!1;function Qc(e,t){if(!e||Gc)return"";Gc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
35
  `),s=r.stack.split(`
36
36
  `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
- `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Gc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Io(e):""}function hT(e){switch(e.tag){case 5:return Io(e.type);case 16:return Io("Lazy");case 13:return Io("Suspense");case 19:return Io("SuspenseList");case 0:case 2:case 15:return e=Qc(e.type,!1),e;case 11:return e=Qc(e.type.render,!1),e;case 1:return e=Qc(e.type,!0),e;default:return""}}function nf(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 Jd:return"Profiler";case lh:return"StrictMode";case ef:return"Suspense";case tf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gx:return(e.displayName||"Context")+".Consumer";case Kx:return(e._context.displayName||"Context")+".Provider";case uh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ch:return t=e.displayName||null,t!==null?t:nf(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return nf(e(t))}catch{}}return null}function mT(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 nf(t);case 8:return t===lh?"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 Yx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gT(e){var t=Yx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ul(e){e._valueTracker||(e._valueTracker=gT(e))}function Xx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function au(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 rf(e,t){var n=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Eg(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 Zx(e,t){t=t.checked,t!=null&&ah(e,"checked",t,!1)}function sf(e,t){Zx(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")?of(e,t.type,n):t.hasOwnProperty("defaultValue")&&of(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tg(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 of(e,t,n){(t!=="number"||au(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $o=Array.isArray;function Ns(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ei(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function af(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if($o(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function Jx(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 _g(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function e1(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 lf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?e1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cl,t1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cl=cl||document.createElement("div"),cl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ua(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},vT=["Webkit","ms","Moz","O"];Object.keys(qo).forEach(function(e){vT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qo[t]=qo[e]})});function n1(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 r1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=n1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yT=Ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function uf(e,t){if(t){if(yT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function cf(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 df=null;function dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ff=null,Ms=null,Ls=null;function Pg(e){if(e=Ka(e)){if(typeof ff!="function")throw Error(N(280));var t=e.stateNode;t&&(t=ec(t),ff(e.stateNode,e.type,t))}}function i1(e){Ms?Ls?Ls.push(e):Ls=[e]:Ms=e}function s1(){if(Ms){var e=Ms,t=Ls;if(Ls=Ms=null,Pg(e),t)for(e=0;e<t.length;e++)Pg(t[e])}}function o1(e,t){return e(t)}function a1(){}var Yc=!1;function l1(e,t,n){if(Yc)return e(t,n);Yc=!0;try{return o1(e,t,n)}finally{Yc=!1,(Ms!==null||Ls!==null)&&(a1(),s1())}}function ca(e,t){var n=e.stateNode;if(n===null)return null;var r=ec(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(N(231,t,typeof n));return n}var pf=!1;if(lr)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){pf=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{pf=!1}function xT(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Ko=!1,lu=null,uu=!1,hf=null,wT={onError:function(e){Ko=!0,lu=e}};function bT(e,t,n,r,i,s,o,a,l){Ko=!1,lu=null,xT.apply(wT,arguments)}function ST(e,t,n,r,i,s,o,a,l){if(bT.apply(this,arguments),Ko){if(Ko){var u=lu;Ko=!1,lu=null}else throw Error(N(198));uu||(uu=!0,hf=u)}}function Zi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u1(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 jg(e){if(Zi(e)!==e)throw Error(N(188))}function kT(e){var t=e.alternate;if(!t){if(t=Zi(e),t===null)throw Error(N(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return jg(i),e;if(s===r)return jg(i),t;s=s.sibling}throw Error(N(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function c1(e){return e=kT(e),e!==null?d1(e):null}function d1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=d1(e);if(t!==null)return t;e=e.sibling}return null}var f1=Vt.unstable_scheduleCallback,Ag=Vt.unstable_cancelCallback,ET=Vt.unstable_shouldYield,TT=Vt.unstable_requestPaint,Me=Vt.unstable_now,CT=Vt.unstable_getCurrentPriorityLevel,fh=Vt.unstable_ImmediatePriority,p1=Vt.unstable_UserBlockingPriority,cu=Vt.unstable_NormalPriority,_T=Vt.unstable_LowPriority,h1=Vt.unstable_IdlePriority,Yu=null,In=null;function PT(e){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(Yu,e,void 0,(e.current.flags&128)===128)}catch{}}var Sn=Math.clz32?Math.clz32:RT,jT=Math.log,AT=Math.LN2;function RT(e){return e>>>=0,e===0?32:31-(jT(e)/AT|0)|0}var dl=64,fl=4194304;function zo(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 du(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=zo(a):(s&=o,s!==0&&(r=zo(s)))}else o=n&~i,o!==0?r=zo(o):s!==0&&(r=zo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Sn(t),i=1<<n,r|=e[n],t&=~i;return r}function OT(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 DT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Sn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=OT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function mf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function m1(){var e=dl;return dl<<=1,!(dl&4194240)&&(dl=64),e}function Xc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sn(t),e[t]=n}function FT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Sn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function ph(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Sn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var pe=0;function g1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var v1,hh,y1,x1,w1,gf=!1,pl=[],Br=null,Vr=null,Ur=null,da=new Map,fa=new Map,Cr=[],NT="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 Rg(e,t){switch(e){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":da.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(t.pointerId)}}function jo(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ka(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function MT(e,t,n,r,i){switch(t){case"focusin":return Br=jo(Br,e,t,n,r,i),!0;case"dragenter":return Vr=jo(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=jo(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return da.set(s,jo(da.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,fa.set(s,jo(fa.get(s)||null,e,t,n,r,i)),!0}return!1}function b1(e){var t=ki(e.target);if(t!==null){var n=Zi(t);if(n!==null){if(t=n.tag,t===13){if(t=u1(n),t!==null){e.blockedOn=t,w1(e.priority,function(){y1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);df=r,n.target.dispatchEvent(r),df=null}else return t=Ka(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Og(e,t,n){$l(e)&&n.delete(t)}function LT(){gf=!1,Br!==null&&$l(Br)&&(Br=null),Vr!==null&&$l(Vr)&&(Vr=null),Ur!==null&&$l(Ur)&&(Ur=null),da.forEach(Og),fa.forEach(Og)}function Ao(e,t){e.blockedOn===t&&(e.blockedOn=null,gf||(gf=!0,Vt.unstable_scheduleCallback(Vt.unstable_NormalPriority,LT)))}function pa(e){function t(i){return Ao(i,e)}if(0<pl.length){Ao(pl[0],e);for(var n=1;n<pl.length;n++){var r=pl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Br!==null&&Ao(Br,e),Vr!==null&&Ao(Vr,e),Ur!==null&&Ao(Ur,e),da.forEach(t),fa.forEach(t),n=0;n<Cr.length;n++)r=Cr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cr.length&&(n=Cr[0],n.blockedOn===null);)b1(n),n.blockedOn===null&&Cr.shift()}var Is=pr.ReactCurrentBatchConfig,fu=!0;function IT(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=1,mh(e,t,n,r)}finally{pe=i,Is.transition=s}}function $T(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=4,mh(e,t,n,r)}finally{pe=i,Is.transition=s}}function mh(e,t,n,r){if(fu){var i=vf(e,t,n,r);if(i===null)ad(e,t,r,pu,n),Rg(e,r);else if(MT(i,e,t,n,r))r.stopPropagation();else if(Rg(e,r),t&4&&-1<NT.indexOf(e)){for(;i!==null;){var s=Ka(i);if(s!==null&&v1(s),s=vf(e,t,n,r),s===null&&ad(e,t,r,pu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ad(e,t,r,null,n)}}var pu=null;function vf(e,t,n,r){if(pu=null,e=dh(r),e=ki(e),e!==null)if(t=Zi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=u1(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 pu=e,null}function S1(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(CT()){case fh:return 1;case p1:return 4;case cu:case _T:return 16;case h1:return 536870912;default:return 16}default:return 16}}var Lr=null,gh=null,zl=null;function k1(){if(zl)return zl;var e,t=gh,n=t.length,r,i="value"in Lr?Lr.value:Lr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return zl=i.slice(e,1<r?1-r:void 0)}function Bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hl(){return!0}function Dg(){return!1}function Ht(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?hl:Dg,this.isPropagationStopped=Dg,this}return Ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),t}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vh=Ht(go),qa=Ae({},go,{view:0,detail:0}),zT=Ht(qa),Zc,Jc,Ro,Xu=Ae({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yh,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!==Ro&&(Ro&&e.type==="mousemove"?(Zc=e.screenX-Ro.screenX,Jc=e.screenY-Ro.screenY):Jc=Zc=0,Ro=e),Zc)},movementY:function(e){return"movementY"in e?e.movementY:Jc}}),Fg=Ht(Xu),BT=Ae({},Xu,{dataTransfer:0}),VT=Ht(BT),UT=Ae({},qa,{relatedTarget:0}),ed=Ht(UT),HT=Ae({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),WT=Ht(HT),qT=Ae({},go,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),KT=Ht(qT),GT=Ae({},go,{data:0}),Ng=Ht(GT),QT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YT={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"},XT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=XT[e])?!!t[e]:!1}function yh(){return ZT}var JT=Ae({},qa,{key:function(e){if(e.key){var t=QT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?YT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yh,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eC=Ht(JT),tC=Ae({},Xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mg=Ht(tC),nC=Ae({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yh}),rC=Ht(nC),iC=Ae({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),sC=Ht(iC),oC=Ae({},Xu,{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}),aC=Ht(oC),lC=[9,13,27,32],xh=lr&&"CompositionEvent"in window,Go=null;lr&&"documentMode"in document&&(Go=document.documentMode);var uC=lr&&"TextEvent"in window&&!Go,E1=lr&&(!xh||Go&&8<Go&&11>=Go),Lg=" ",Ig=!1;function T1(e,t){switch(e){case"keyup":return lC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function C1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function cC(e,t){switch(e){case"compositionend":return C1(t);case"keypress":return t.which!==32?null:(Ig=!0,Lg);case"textInput":return e=t.data,e===Lg&&Ig?null:e;default:return null}}function dC(e,t){if(xs)return e==="compositionend"||!xh&&T1(e,t)?(e=k1(),zl=gh=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 E1&&t.locale!=="ko"?null:t.data;default:return null}}var fC={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 $g(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fC[e.type]:t==="textarea"}function _1(e,t,n,r){i1(r),t=hu(t,"onChange"),0<t.length&&(n=new vh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qo=null,ha=null;function pC(e){I1(e,0)}function Zu(e){var t=Ss(e);if(Xx(t))return e}function hC(e,t){if(e==="change")return t}var P1=!1;if(lr){var td;if(lr){var nd="oninput"in document;if(!nd){var zg=document.createElement("div");zg.setAttribute("oninput","return;"),nd=typeof zg.oninput=="function"}td=nd}else td=!1;P1=td&&(!document.documentMode||9<document.documentMode)}function Bg(){Qo&&(Qo.detachEvent("onpropertychange",j1),ha=Qo=null)}function j1(e){if(e.propertyName==="value"&&Zu(ha)){var t=[];_1(t,ha,e,dh(e)),l1(pC,t)}}function mC(e,t,n){e==="focusin"?(Bg(),Qo=t,ha=n,Qo.attachEvent("onpropertychange",j1)):e==="focusout"&&Bg()}function gC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zu(ha)}function vC(e,t){if(e==="click")return Zu(t)}function yC(e,t){if(e==="input"||e==="change")return Zu(t)}function xC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:xC;function ma(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Zd.call(t,i)||!En(e[i],t[i]))return!1}return!0}function Vg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ug(e,t){var n=Vg(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=Vg(n)}}function A1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?A1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function R1(){for(var e=window,t=au();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=au(e.document)}return t}function wh(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 wC(e){var t=R1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&A1(n.ownerDocument.documentElement,n)){if(r!==null&&wh(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=Ug(n,s);var o=Ug(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 bC=lr&&"documentMode"in document&&11>=document.documentMode,ws=null,yf=null,Yo=null,xf=!1;function Hg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xf||ws==null||ws!==au(r)||(r=ws,"selectionStart"in r&&wh(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}),Yo&&ma(Yo,r)||(Yo=r,r=hu(yf,"onSelect"),0<r.length&&(t=new vh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ws)))}function ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bs={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionend:ml("Transition","TransitionEnd")},rd={},O1={};lr&&(O1=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 Ju(e){if(rd[e])return rd[e];if(!bs[e])return e;var t=bs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in O1)return rd[e]=t[n];return e}var D1=Ju("animationend"),F1=Ju("animationiteration"),N1=Ju("animationstart"),M1=Ju("transitionend"),L1=new Map,Wg="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){L1.set(e,t),Xi(t,[e])}for(var id=0;id<Wg.length;id++){var sd=Wg[id],SC=sd.toLowerCase(),kC=sd[0].toUpperCase()+sd.slice(1);si(SC,"on"+kC)}si(D1,"onAnimationEnd");si(F1,"onAnimationIteration");si(N1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(M1,"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 Bo="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(" "),EC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bo));function qg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ST(r,t,void 0,e),e.currentTarget=null}function I1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;qg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;qg(i,a,u),s=l}}}if(uu)throw e=hf,uu=!1,hf=null,e}function be(e,t){var n=t[Ef];n===void 0&&(n=t[Ef]=new Set);var r=e+"__bubble";n.has(r)||($1(t,e,2,!1),n.add(r))}function od(e,t,n){var r=0;t&&(r|=4),$1(n,e,r,t)}var gl="_reactListening"+Math.random().toString(36).slice(2);function ga(e){if(!e[gl]){e[gl]=!0,qx.forEach(function(n){n!=="selectionchange"&&(EC.has(n)||od(n,!1,e),od(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gl]||(t[gl]=!0,od("selectionchange",!1,t))}}function $1(e,t,n,r){switch(S1(t)){case 1:var i=IT;break;case 4:i=$T;break;default:i=mh}n=i.bind(null,t,n,e),i=void 0,!pf||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 ad(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}l1(function(){var u=s,d=dh(n),c=[];e:{var f=L1.get(e);if(f!==void 0){var p=vh,h=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":p=eC;break;case"focusin":h="focus",p=ed;break;case"focusout":h="blur",p=ed;break;case"beforeblur":case"afterblur":p=ed;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Fg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=VT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=rC;break;case D1:case F1:case N1:p=WT;break;case M1:p=sC;break;case"scroll":p=zT;break;case"wheel":p=aC;break;case"copy":case"cut":case"paste":p=KT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Mg}var v=(t&4)!==0,b=!v&&e==="scroll",m=v?f!==null?f+"Capture":null:f;v=[];for(var x=u,w;x!==null;){w=x;var E=w.stateNode;if(w.tag===5&&E!==null&&(w=E,m!==null&&(E=ca(x,m),E!=null&&v.push(va(x,E,w)))),b)break;x=x.return}0<v.length&&(f=new p(f,h,null,n,d),c.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==df&&(h=n.relatedTarget||n.fromElement)&&(ki(h)||h[ur]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?ki(h):null,h!==null&&(b=Zi(h),h!==b||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=u),p!==h)){if(v=Fg,E="onMouseLeave",m="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=Mg,E="onPointerLeave",m="onPointerEnter",x="pointer"),b=p==null?f:Ss(p),w=h==null?f:Ss(h),f=new v(E,x+"leave",p,n,d),f.target=b,f.relatedTarget=w,E=null,ki(d)===u&&(v=new v(m,x+"enter",h,n,d),v.target=w,v.relatedTarget=b,E=v),b=E,p&&h)t:{for(v=p,m=h,x=0,w=v;w;w=hs(w))x++;for(w=0,E=m;E;E=hs(E))w++;for(;0<x-w;)v=hs(v),x--;for(;0<w-x;)m=hs(m),w--;for(;x--;){if(v===m||m!==null&&v===m.alternate)break t;v=hs(v),m=hs(m)}v=null}else v=null;p!==null&&Kg(c,f,p,v,!1),h!==null&&b!==null&&Kg(c,b,h,v,!0)}}e:{if(f=u?Ss(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=hC;else if($g(f))if(P1)T=yC;else{T=gC;var C=mC}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=vC);if(T&&(T=T(e,u))){_1(c,T,n,d);break e}C&&C(e,f,u),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&of(f,"number",f.value)}switch(C=u?Ss(u):window,e){case"focusin":($g(C)||C.contentEditable==="true")&&(ws=C,yf=u,Yo=null);break;case"focusout":Yo=yf=ws=null;break;case"mousedown":xf=!0;break;case"contextmenu":case"mouseup":case"dragend":xf=!1,Hg(c,n,d);break;case"selectionchange":if(bC)break;case"keydown":case"keyup":Hg(c,n,d)}var _;if(xh)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else xs?T1(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(E1&&n.locale!=="ko"&&(xs||k!=="onCompositionStart"?k==="onCompositionEnd"&&xs&&(_=k1()):(Lr=d,gh="value"in Lr?Lr.value:Lr.textContent,xs=!0)),C=hu(u,k),0<C.length&&(k=new Ng(k,e,null,n,d),c.push({event:k,listeners:C}),_?k.data=_:(_=C1(n),_!==null&&(k.data=_)))),(_=uC?cC(e,n):dC(e,n))&&(u=hu(u,"onBeforeInput"),0<u.length&&(d=new Ng("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=_))}I1(c,t)})}function va(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ca(e,n),s!=null&&r.unshift(va(e,s,i)),s=ca(e,t),s!=null&&r.push(va(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 Kg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=ca(n,s),l!=null&&o.unshift(va(n,l,a))):i||(l=ca(n,s),l!=null&&o.push(va(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var TC=/\r\n?/g,CC=/\u0000|\uFFFD/g;function Gg(e){return(typeof e=="string"?e:""+e).replace(TC,`
38
- `).replace(CC,"")}function vl(e,t,n){if(t=Gg(t),Gg(e)!==t&&n)throw Error(N(425))}function mu(){}var wf=null,bf=null;function Sf(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 kf=typeof setTimeout=="function"?setTimeout:void 0,_C=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,PC=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg<"u"?function(e){return Qg.resolve(null).then(e).catch(jC)}:kf;function jC(e){setTimeout(function(){throw e})}function ld(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),pa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);pa(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 Yg(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 vo=Math.random().toString(36).slice(2),Ln="__reactFiber$"+vo,ya="__reactProps$"+vo,ur="__reactContainer$"+vo,Ef="__reactEvents$"+vo,AC="__reactListeners$"+vo,RC="__reactHandles$"+vo;function ki(e){var t=e[Ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ur]||n[Ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Yg(e);e!==null;){if(n=e[Ln])return n;e=Yg(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){return e=e[Ln]||e[ur],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function ec(e){return e[ya]||null}var Tf=[],ks=-1;function oi(e){return{current:e}}function ke(e){0>ks||(e.current=Tf[ks],Tf[ks]=null,ks--)}function xe(e,t){ks++,Tf[ks]=e.current,e.current=t}var ti={},pt=oi(ti),jt=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 At(e){return e=e.childContextTypes,e!=null}function gu(){ke(jt),ke(pt)}function Xg(e,t,n){if(pt.current!==ti)throw Error(N(168));xe(pt,t),xe(jt,n)}function z1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(N(108,mT(e)||"Unknown",i));return Ae({},n,r)}function vu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Vi=pt.current,xe(pt,e),xe(jt,jt.current),!0}function Zg(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=z1(e,t,Vi),r.__reactInternalMemoizedMergedChildContext=e,ke(jt),ke(pt),xe(pt,e)):ke(jt),xe(jt,n)}var er=null,tc=!1,ud=!1;function B1(e){er===null?er=[e]:er.push(e)}function OC(e){tc=!0,B1(e)}function ai(){if(!ud&&er!==null){ud=!0;var e=0,t=pe;try{var n=er;for(pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}er=null,tc=!1}catch(i){throw er!==null&&(er=er.slice(e+1)),f1(fh,ai),i}finally{pe=t,ud=!1}}return null}var Es=[],Ts=0,yu=null,xu=0,Jt=[],en=0,Ui=null,rr=1,ir="";function gi(e,t){Es[Ts++]=xu,Es[Ts++]=yu,yu=e,xu=t}function V1(e,t,n){Jt[en++]=rr,Jt[en++]=ir,Jt[en++]=Ui,Ui=e;var r=rr;e=ir;var i=32-Sn(r)-1;r&=~(1<<i),n+=1;var s=32-Sn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,rr=1<<32-Sn(t)+i|n<<i|r,ir=s+e}else rr=1<<s|n<<i|r,ir=e}function bh(e){e.return!==null&&(gi(e,1),V1(e,1,0))}function Sh(e){for(;e===yu;)yu=Es[--Ts],Es[Ts]=null,xu=Es[--Ts],Es[Ts]=null;for(;e===Ui;)Ui=Jt[--en],Jt[en]=null,ir=Jt[--en],Jt[en]=null,rr=Jt[--en],Jt[en]=null}var Bt=null,It=null,Ee=!1,wn=null;function U1(e,t){var n=nn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Jg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Bt=e,It=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Bt=e,It=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ui!==null?{id:rr,overflow:ir}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Bt=e,It=null,!0):!1;default:return!1}}function Cf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _f(e){if(Ee){var t=It;if(t){var n=t;if(!Jg(e,t)){if(Cf(e))throw Error(N(418));t=Hr(n.nextSibling);var r=Bt;t&&Jg(e,t)?U1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Bt=e)}}else{if(Cf(e))throw Error(N(418));e.flags=e.flags&-4097|2,Ee=!1,Bt=e}}}function ev(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Bt=e}function yl(e){if(e!==Bt)return!1;if(!Ee)return ev(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Sf(e.type,e.memoizedProps)),t&&(t=It)){if(Cf(e))throw H1(),Error(N(418));for(;t;)U1(e,t),t=Hr(t.nextSibling)}if(ev(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){It=Hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}It=null}}else It=Bt?Hr(e.stateNode.nextSibling):null;return!0}function H1(){for(var e=It;e;)e=Hr(e.nextSibling)}function io(){It=Bt=null,Ee=!1}function kh(e){wn===null?wn=[e]:wn.push(e)}var DC=pr.ReactCurrentBatchConfig;function Oo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(N(309));var r=n.stateNode}if(!r)throw Error(N(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,e))}return e}function xl(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tv(e){var t=e._init;return t(e._payload)}function W1(e){function t(m,x){if(e){var w=m.deletions;w===null?(m.deletions=[x],m.flags|=16):w.push(x)}}function n(m,x){if(!e)return null;for(;x!==null;)t(m,x),x=x.sibling;return null}function r(m,x){for(m=new Map;x!==null;)x.key!==null?m.set(x.key,x):m.set(x.index,x),x=x.sibling;return m}function i(m,x){return m=Gr(m,x),m.index=0,m.sibling=null,m}function s(m,x,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<x?(m.flags|=2,x):w):(m.flags|=2,x)):(m.flags|=1048576,x)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,x,w,E){return x===null||x.tag!==6?(x=gd(w,m.mode,E),x.return=m,x):(x=i(x,w),x.return=m,x)}function l(m,x,w,E){var T=w.type;return T===ys?d(m,x,w.props.children,E,w.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&tv(T)===x.type)?(E=i(x,w.props),E.ref=Oo(m,x,w),E.return=m,E):(E=Gl(w.type,w.key,w.props,null,m.mode,E),E.ref=Oo(m,x,w),E.return=m,E)}function u(m,x,w,E){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=vd(w,m.mode,E),x.return=m,x):(x=i(x,w.children||[]),x.return=m,x)}function d(m,x,w,E,T){return x===null||x.tag!==7?(x=Ii(w,m.mode,E,T),x.return=m,x):(x=i(x,w),x.return=m,x)}function c(m,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=gd(""+x,m.mode,w),x.return=m,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ll:return w=Gl(x.type,x.key,x.props,null,m.mode,w),w.ref=Oo(m,null,x),w.return=m,w;case vs:return x=vd(x,m.mode,w),x.return=m,x;case kr:var E=x._init;return c(m,E(x._payload),w)}if($o(x)||_o(x))return x=Ii(x,m.mode,w,null),x.return=m,x;xl(m,x)}return null}function f(m,x,w,E){var T=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return T!==null?null:a(m,x,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:return w.key===T?l(m,x,w,E):null;case vs:return w.key===T?u(m,x,w,E):null;case kr:return T=w._init,f(m,x,T(w._payload),E)}if($o(w)||_o(w))return T!==null?null:d(m,x,w,E,null);xl(m,w)}return null}function p(m,x,w,E,T){if(typeof E=="string"&&E!==""||typeof E=="number")return m=m.get(w)||null,a(x,m,""+E,T);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case ll:return m=m.get(E.key===null?w:E.key)||null,l(x,m,E,T);case vs:return m=m.get(E.key===null?w:E.key)||null,u(x,m,E,T);case kr:var C=E._init;return p(m,x,w,C(E._payload),T)}if($o(E)||_o(E))return m=m.get(w)||null,d(x,m,E,T,null);xl(x,E)}return null}function h(m,x,w,E){for(var T=null,C=null,_=x,k=x=0,j=null;_!==null&&k<w.length;k++){_.index>k?(j=_,_=null):j=_.sibling;var R=f(m,_,w[k],E);if(R===null){_===null&&(_=j);break}e&&_&&R.alternate===null&&t(m,_),x=s(R,x,k),C===null?T=R:C.sibling=R,C=R,_=j}if(k===w.length)return n(m,_),Ee&&gi(m,k),T;if(_===null){for(;k<w.length;k++)_=c(m,w[k],E),_!==null&&(x=s(_,x,k),C===null?T=_:C.sibling=_,C=_);return Ee&&gi(m,k),T}for(_=r(m,_);k<w.length;k++)j=p(_,m,k,w[k],E),j!==null&&(e&&j.alternate!==null&&_.delete(j.key===null?k:j.key),x=s(j,x,k),C===null?T=j:C.sibling=j,C=j);return e&&_.forEach(function(M){return t(m,M)}),Ee&&gi(m,k),T}function v(m,x,w,E){var T=_o(w);if(typeof T!="function")throw Error(N(150));if(w=T.call(w),w==null)throw Error(N(151));for(var C=T=null,_=x,k=x=0,j=null,R=w.next();_!==null&&!R.done;k++,R=w.next()){_.index>k?(j=_,_=null):j=_.sibling;var M=f(m,_,R.value,E);if(M===null){_===null&&(_=j);break}e&&_&&M.alternate===null&&t(m,_),x=s(M,x,k),C===null?T=M:C.sibling=M,C=M,_=j}if(R.done)return n(m,_),Ee&&gi(m,k),T;if(_===null){for(;!R.done;k++,R=w.next())R=c(m,R.value,E),R!==null&&(x=s(R,x,k),C===null?T=R:C.sibling=R,C=R);return Ee&&gi(m,k),T}for(_=r(m,_);!R.done;k++,R=w.next())R=p(_,m,k,R.value,E),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?k:R.key),x=s(R,x,k),C===null?T=R:C.sibling=R,C=R);return e&&_.forEach(function(G){return t(m,G)}),Ee&&gi(m,k),T}function b(m,x,w,E){if(typeof w=="object"&&w!==null&&w.type===ys&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:e:{for(var T=w.key,C=x;C!==null;){if(C.key===T){if(T=w.type,T===ys){if(C.tag===7){n(m,C.sibling),x=i(C,w.props.children),x.return=m,m=x;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&tv(T)===C.type){n(m,C.sibling),x=i(C,w.props),x.ref=Oo(m,C,w),x.return=m,m=x;break e}n(m,C);break}else t(m,C);C=C.sibling}w.type===ys?(x=Ii(w.props.children,m.mode,E,w.key),x.return=m,m=x):(E=Gl(w.type,w.key,w.props,null,m.mode,E),E.ref=Oo(m,x,w),E.return=m,m=E)}return o(m);case vs:e:{for(C=w.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(m,x.sibling),x=i(x,w.children||[]),x.return=m,m=x;break e}else{n(m,x);break}else t(m,x);x=x.sibling}x=vd(w,m.mode,E),x.return=m,m=x}return o(m);case kr:return C=w._init,b(m,x,C(w._payload),E)}if($o(w))return h(m,x,w,E);if(_o(w))return v(m,x,w,E);xl(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(m,x.sibling),x=i(x,w),x.return=m,m=x):(n(m,x),x=gd(w,m.mode,E),x.return=m,m=x),o(m)):n(m,x)}return b}var so=W1(!0),q1=W1(!1),wu=oi(null),bu=null,Cs=null,Eh=null;function Th(){Eh=Cs=bu=null}function Ch(e){var t=wu.current;ke(wu),e._currentValue=t}function Pf(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){bu=e,Eh=Cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function an(e){var t=e._currentValue;if(Eh!==e)if(e={context:e,memoizedValue:t,next:null},Cs===null){if(bu===null)throw Error(N(308));Cs=e,bu.dependencies={lanes:0,firstContext:e}}else Cs=Cs.next=e;return t}var Ei=null;function _h(e){Ei===null?Ei=[e]:Ei.push(e)}function K1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,_h(t)):(n.next=i.next,i.next=n),t.interleaved=n,cr(e,r)}function cr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Er=!1;function Ph(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function G1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function or(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,cr(e,n)}return i=r.interleaved,i===null?(t.next=t,_h(r)):(t.next=i.next,i.next=t),r.interleaved=t,cr(e,n)}function Vl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ph(e,n)}}function nv(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 Su(e,t,n,r){var i=e.updateQueue;Er=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,d=u=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(f=t,p=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){c=h.call(p,c,f);break e}c=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,f=typeof h=="function"?h.call(p,c,f):h,f==null)break e;c=Ae({},c,f);break e;case 2:Er=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Wi|=o,e.lanes=o,e.memoizedState=c}}function rv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(N(191,i));i.call(r)}}}var Ga={},$n=oi(Ga),xa=oi(Ga),wa=oi(Ga);function Ti(e){if(e===Ga)throw Error(N(174));return e}function jh(e,t){switch(xe(wa,t),xe(xa,e),xe($n,Ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=lf(t,e)}ke($n),xe($n,t)}function oo(){ke($n),ke(xa),ke(wa)}function Q1(e){Ti(wa.current);var t=Ti($n.current),n=lf(t,e.type);t!==n&&(xe(xa,e),xe($n,n))}function Ah(e){xa.current===e&&(ke($n),ke(xa))}var _e=oi(0);function ku(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 cd=[];function Rh(){for(var e=0;e<cd.length;e++)cd[e]._workInProgressVersionPrimary=null;cd.length=0}var Ul=pr.ReactCurrentDispatcher,dd=pr.ReactCurrentBatchConfig,Hi=0,je=null,ze=null,Ke=null,Eu=!1,Xo=!1,ba=0,FC=0;function at(){throw Error(N(321))}function Oh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function Dh(e,t,n,r,i,s){if(Hi=s,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ul.current=e===null||e.memoizedState===null?IC:$C,e=n(r,i),Xo){s=0;do{if(Xo=!1,ba=0,25<=s)throw Error(N(301));s+=1,Ke=ze=null,t.updateQueue=null,Ul.current=zC,e=n(r,i)}while(Xo)}if(Ul.current=Tu,t=ze!==null&&ze.next!==null,Hi=0,Ke=ze=je=null,Eu=!1,t)throw Error(N(300));return e}function Fh(){var e=ba!==0;return ba=0,e}function Rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function ln(){if(ze===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ke===null?je.memoizedState:Ke.next;if(t!==null)Ke=t,ze=e;else{if(e===null)throw Error(N(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Sa(e,t){return typeof t=="function"?t(e):t}function fd(e){var t=ln(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=ze,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var d=u.lane;if((Hi&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,je.lanes|=d,Wi|=d}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,En(r,t.memoizedState)||(Pt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,je.lanes|=s,Wi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pd(e){var t=ln(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);En(s,t.memoizedState)||(Pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Y1(){}function X1(e,t){var n=je,r=ln(),i=t(),s=!En(r.memoizedState,i);if(s&&(r.memoizedState=i,Pt=!0),r=r.queue,Nh(ew.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,ka(9,J1.bind(null,n,r,i,t),void 0,null),Ge===null)throw Error(N(349));Hi&30||Z1(n,t,i)}return i}function Z1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function J1(e,t,n,r){t.value=n,t.getSnapshot=r,tw(t)&&nw(e)}function ew(e,t,n){return n(function(){tw(t)&&nw(e)})}function tw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function nw(e){var t=cr(e,1);t!==null&&kn(t,e,1,-1)}function iv(e){var t=Rn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:e},t.queue=e,e=e.dispatch=LC.bind(null,je,e),[t.memoizedState,e]}function ka(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function rw(){return ln().memoizedState}function Hl(e,t,n,r){var i=Rn();je.flags|=e,i.memoizedState=ka(1|t,n,void 0,r===void 0?null:r)}function nc(e,t,n,r){var i=ln();r=r===void 0?null:r;var s=void 0;if(ze!==null){var o=ze.memoizedState;if(s=o.destroy,r!==null&&Oh(r,o.deps)){i.memoizedState=ka(t,n,s,r);return}}je.flags|=e,i.memoizedState=ka(1|t,n,s,r)}function sv(e,t){return Hl(8390656,8,e,t)}function Nh(e,t){return nc(2048,8,e,t)}function iw(e,t){return nc(4,2,e,t)}function sw(e,t){return nc(4,4,e,t)}function ow(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 aw(e,t,n){return n=n!=null?n.concat([e]):null,nc(4,4,ow.bind(null,t,e),n)}function Mh(){}function lw(e,t){var n=ln();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function uw(e,t){var n=ln();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cw(e,t,n){return Hi&21?(En(n,t)||(n=m1(),je.lanes|=n,Wi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function NC(e,t){var n=pe;pe=n!==0&&4>n?n:4,e(!0);var r=dd.transition;dd.transition={};try{e(!1),t()}finally{pe=n,dd.transition=r}}function dw(){return ln().memoizedState}function MC(e,t,n){var r=Kr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fw(e))pw(t,n);else if(n=K1(e,t,n,r),n!==null){var i=yt();kn(n,e,r,i),hw(n,t,r)}}function LC(e,t,n){var r=Kr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fw(e))pw(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,En(a,o)){var l=t.interleaved;l===null?(i.next=i,_h(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=K1(e,t,i,r),n!==null&&(i=yt(),kn(n,e,r,i),hw(n,t,r))}}function fw(e){var t=e.alternate;return e===je||t!==null&&t===je}function pw(e,t){Xo=Eu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ph(e,n)}}var Tu={readContext:an,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},IC={readContext:an,useCallback:function(e,t){return Rn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:sv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hl(4194308,4,ow.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hl(4,2,e,t)},useMemo:function(e,t){var n=Rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=MC.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=Rn();return e={current:e},t.memoizedState=e},useState:iv,useDebugValue:Mh,useDeferredValue:function(e){return Rn().memoizedState=e},useTransition:function(){var e=iv(!1),t=e[0];return e=NC.bind(null,e[1]),Rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=Rn();if(Ee){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Ge===null)throw Error(N(349));Hi&30||Z1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,sv(ew.bind(null,r,s,e),[e]),r.flags|=2048,ka(9,J1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Rn(),t=Ge.identifierPrefix;if(Ee){var n=ir,r=rr;n=(r&~(1<<32-Sn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ba++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=FC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$C={readContext:an,useCallback:lw,useContext:an,useEffect:Nh,useImperativeHandle:aw,useInsertionEffect:iw,useLayoutEffect:sw,useMemo:uw,useReducer:fd,useRef:rw,useState:function(){return fd(Sa)},useDebugValue:Mh,useDeferredValue:function(e){var t=ln();return cw(t,ze.memoizedState,e)},useTransition:function(){var e=fd(Sa)[0],t=ln().memoizedState;return[e,t]},useMutableSource:Y1,useSyncExternalStore:X1,useId:dw,unstable_isNewReconciler:!1},zC={readContext:an,useCallback:lw,useContext:an,useEffect:Nh,useImperativeHandle:aw,useInsertionEffect:iw,useLayoutEffect:sw,useMemo:uw,useReducer:pd,useRef:rw,useState:function(){return pd(Sa)},useDebugValue:Mh,useDeferredValue:function(e){var t=ln();return ze===null?t.memoizedState=e:cw(t,ze.memoizedState,e)},useTransition:function(){var e=pd(Sa)[0],t=ln().memoizedState;return[e,t]},useMutableSource:Y1,useSyncExternalStore:X1,useId:dw,unstable_isNewReconciler:!1};function gn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var rc={isMounted:function(e){return(e=e._reactInternals)?Zi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(kn(t,e,i,r),Vl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(kn(t,e,i,r),Vl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),r=Kr(e),i=or(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wr(e,i,r),t!==null&&(kn(t,e,r,n),Vl(t,e,r))}};function ov(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?!ma(n,r)||!ma(i,s):!0}function mw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=an(s):(i=At(t)?Vi:pt.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=rc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function av(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&&rc.enqueueReplaceState(t,t.state,null)}function Af(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ph(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=an(s):(s=At(t)?Vi:pt.current,i.context=ro(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(jf(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&&rc.enqueueReplaceState(i,i.state,null),Su(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+=hT(r),r=r.return;while(r);var i=n}catch(s){i=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Gc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Io(e):""}function hT(e){switch(e.tag){case 5:return Io(e.type);case 16:return Io("Lazy");case 13:return Io("Suspense");case 19:return Io("SuspenseList");case 0:case 2:case 15:return e=Qc(e.type,!1),e;case 11:return e=Qc(e.type.render,!1),e;case 1:return e=Qc(e.type,!0),e;default:return""}}function nf(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 Jd:return"Profiler";case lh:return"StrictMode";case ef:return"Suspense";case tf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gx:return(e.displayName||"Context")+".Consumer";case Kx:return(e._context.displayName||"Context")+".Provider";case uh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ch:return t=e.displayName||null,t!==null?t:nf(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return nf(e(t))}catch{}}return null}function mT(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 nf(t);case 8:return t===lh?"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 Yx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gT(e){var t=Yx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ul(e){e._valueTracker||(e._valueTracker=gT(e))}function Xx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function au(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 rf(e,t){var n=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Eg(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 Zx(e,t){t=t.checked,t!=null&&ah(e,"checked",t,!1)}function sf(e,t){Zx(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")?of(e,t.type,n):t.hasOwnProperty("defaultValue")&&of(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tg(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 of(e,t,n){(t!=="number"||au(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $o=Array.isArray;function Ns(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ei(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function af(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if($o(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function Jx(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 _g(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function e1(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 lf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?e1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cl,t1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cl=cl||document.createElement("div"),cl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ua(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},vT=["Webkit","ms","Moz","O"];Object.keys(qo).forEach(function(e){vT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qo[t]=qo[e]})});function n1(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 r1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=n1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yT=Ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function uf(e,t){if(t){if(yT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function cf(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 df=null;function dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ff=null,Ms=null,Ls=null;function Pg(e){if(e=Ka(e)){if(typeof ff!="function")throw Error(N(280));var t=e.stateNode;t&&(t=ec(t),ff(e.stateNode,e.type,t))}}function i1(e){Ms?Ls?Ls.push(e):Ls=[e]:Ms=e}function s1(){if(Ms){var e=Ms,t=Ls;if(Ls=Ms=null,Pg(e),t)for(e=0;e<t.length;e++)Pg(t[e])}}function o1(e,t){return e(t)}function a1(){}var Yc=!1;function l1(e,t,n){if(Yc)return e(t,n);Yc=!0;try{return o1(e,t,n)}finally{Yc=!1,(Ms!==null||Ls!==null)&&(a1(),s1())}}function ca(e,t){var n=e.stateNode;if(n===null)return null;var r=ec(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(N(231,t,typeof n));return n}var pf=!1;if(lr)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){pf=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{pf=!1}function xT(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Ko=!1,lu=null,uu=!1,hf=null,wT={onError:function(e){Ko=!0,lu=e}};function bT(e,t,n,r,i,s,o,a,l){Ko=!1,lu=null,xT.apply(wT,arguments)}function ST(e,t,n,r,i,s,o,a,l){if(bT.apply(this,arguments),Ko){if(Ko){var u=lu;Ko=!1,lu=null}else throw Error(N(198));uu||(uu=!0,hf=u)}}function Zi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u1(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 jg(e){if(Zi(e)!==e)throw Error(N(188))}function kT(e){var t=e.alternate;if(!t){if(t=Zi(e),t===null)throw Error(N(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return jg(i),e;if(s===r)return jg(i),t;s=s.sibling}throw Error(N(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function c1(e){return e=kT(e),e!==null?d1(e):null}function d1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=d1(e);if(t!==null)return t;e=e.sibling}return null}var f1=Vt.unstable_scheduleCallback,Ag=Vt.unstable_cancelCallback,ET=Vt.unstable_shouldYield,TT=Vt.unstable_requestPaint,Me=Vt.unstable_now,CT=Vt.unstable_getCurrentPriorityLevel,fh=Vt.unstable_ImmediatePriority,p1=Vt.unstable_UserBlockingPriority,cu=Vt.unstable_NormalPriority,_T=Vt.unstable_LowPriority,h1=Vt.unstable_IdlePriority,Yu=null,$n=null;function PT(e){if($n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(Yu,e,void 0,(e.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:RT,jT=Math.log,AT=Math.LN2;function RT(e){return e>>>=0,e===0?32:31-(jT(e)/AT|0)|0}var dl=64,fl=4194304;function zo(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 du(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=zo(a):(s&=o,s!==0&&(r=zo(s)))}else o=n&~i,o!==0?r=zo(o):s!==0&&(r=zo(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 OT(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 DT(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]=OT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function mf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function m1(){var e=dl;return dl<<=1,!(dl&4194240)&&(dl=64),e}function Xc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kn(t),e[t]=n}function FT(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 ph(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var pe=0;function g1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var v1,hh,y1,x1,w1,gf=!1,pl=[],Br=null,Vr=null,Ur=null,da=new Map,fa=new Map,Cr=[],NT="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 Rg(e,t){switch(e){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":da.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(t.pointerId)}}function jo(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ka(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function MT(e,t,n,r,i){switch(t){case"focusin":return Br=jo(Br,e,t,n,r,i),!0;case"dragenter":return Vr=jo(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=jo(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return da.set(s,jo(da.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,fa.set(s,jo(fa.get(s)||null,e,t,n,r,i)),!0}return!1}function b1(e){var t=ki(e.target);if(t!==null){var n=Zi(t);if(n!==null){if(t=n.tag,t===13){if(t=u1(n),t!==null){e.blockedOn=t,w1(e.priority,function(){y1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);df=r,n.target.dispatchEvent(r),df=null}else return t=Ka(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Og(e,t,n){$l(e)&&n.delete(t)}function LT(){gf=!1,Br!==null&&$l(Br)&&(Br=null),Vr!==null&&$l(Vr)&&(Vr=null),Ur!==null&&$l(Ur)&&(Ur=null),da.forEach(Og),fa.forEach(Og)}function Ao(e,t){e.blockedOn===t&&(e.blockedOn=null,gf||(gf=!0,Vt.unstable_scheduleCallback(Vt.unstable_NormalPriority,LT)))}function pa(e){function t(i){return Ao(i,e)}if(0<pl.length){Ao(pl[0],e);for(var n=1;n<pl.length;n++){var r=pl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Br!==null&&Ao(Br,e),Vr!==null&&Ao(Vr,e),Ur!==null&&Ao(Ur,e),da.forEach(t),fa.forEach(t),n=0;n<Cr.length;n++)r=Cr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cr.length&&(n=Cr[0],n.blockedOn===null);)b1(n),n.blockedOn===null&&Cr.shift()}var Is=pr.ReactCurrentBatchConfig,fu=!0;function IT(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=1,mh(e,t,n,r)}finally{pe=i,Is.transition=s}}function $T(e,t,n,r){var i=pe,s=Is.transition;Is.transition=null;try{pe=4,mh(e,t,n,r)}finally{pe=i,Is.transition=s}}function mh(e,t,n,r){if(fu){var i=vf(e,t,n,r);if(i===null)ad(e,t,r,pu,n),Rg(e,r);else if(MT(i,e,t,n,r))r.stopPropagation();else if(Rg(e,r),t&4&&-1<NT.indexOf(e)){for(;i!==null;){var s=Ka(i);if(s!==null&&v1(s),s=vf(e,t,n,r),s===null&&ad(e,t,r,pu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ad(e,t,r,null,n)}}var pu=null;function vf(e,t,n,r){if(pu=null,e=dh(r),e=ki(e),e!==null)if(t=Zi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=u1(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 pu=e,null}function S1(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(CT()){case fh:return 1;case p1:return 4;case cu:case _T:return 16;case h1:return 536870912;default:return 16}default:return 16}}var Lr=null,gh=null,zl=null;function k1(){if(zl)return zl;var e,t=gh,n=t.length,r,i="value"in Lr?Lr.value:Lr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return zl=i.slice(e,1<r?1-r:void 0)}function Bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hl(){return!0}function Dg(){return!1}function Ht(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?hl:Dg,this.isPropagationStopped=Dg,this}return Ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),t}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vh=Ht(go),qa=Ae({},go,{view:0,detail:0}),zT=Ht(qa),Zc,Jc,Ro,Xu=Ae({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yh,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!==Ro&&(Ro&&e.type==="mousemove"?(Zc=e.screenX-Ro.screenX,Jc=e.screenY-Ro.screenY):Jc=Zc=0,Ro=e),Zc)},movementY:function(e){return"movementY"in e?e.movementY:Jc}}),Fg=Ht(Xu),BT=Ae({},Xu,{dataTransfer:0}),VT=Ht(BT),UT=Ae({},qa,{relatedTarget:0}),ed=Ht(UT),HT=Ae({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),WT=Ht(HT),qT=Ae({},go,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),KT=Ht(qT),GT=Ae({},go,{data:0}),Ng=Ht(GT),QT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YT={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"},XT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=XT[e])?!!t[e]:!1}function yh(){return ZT}var JT=Ae({},qa,{key:function(e){if(e.key){var t=QT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?YT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yh,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eC=Ht(JT),tC=Ae({},Xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mg=Ht(tC),nC=Ae({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yh}),rC=Ht(nC),iC=Ae({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),sC=Ht(iC),oC=Ae({},Xu,{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}),aC=Ht(oC),lC=[9,13,27,32],xh=lr&&"CompositionEvent"in window,Go=null;lr&&"documentMode"in document&&(Go=document.documentMode);var uC=lr&&"TextEvent"in window&&!Go,E1=lr&&(!xh||Go&&8<Go&&11>=Go),Lg=" ",Ig=!1;function T1(e,t){switch(e){case"keyup":return lC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function C1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function cC(e,t){switch(e){case"compositionend":return C1(t);case"keypress":return t.which!==32?null:(Ig=!0,Lg);case"textInput":return e=t.data,e===Lg&&Ig?null:e;default:return null}}function dC(e,t){if(xs)return e==="compositionend"||!xh&&T1(e,t)?(e=k1(),zl=gh=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 E1&&t.locale!=="ko"?null:t.data;default:return null}}var fC={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 $g(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fC[e.type]:t==="textarea"}function _1(e,t,n,r){i1(r),t=hu(t,"onChange"),0<t.length&&(n=new vh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qo=null,ha=null;function pC(e){I1(e,0)}function Zu(e){var t=Ss(e);if(Xx(t))return e}function hC(e,t){if(e==="change")return t}var P1=!1;if(lr){var td;if(lr){var nd="oninput"in document;if(!nd){var zg=document.createElement("div");zg.setAttribute("oninput","return;"),nd=typeof zg.oninput=="function"}td=nd}else td=!1;P1=td&&(!document.documentMode||9<document.documentMode)}function Bg(){Qo&&(Qo.detachEvent("onpropertychange",j1),ha=Qo=null)}function j1(e){if(e.propertyName==="value"&&Zu(ha)){var t=[];_1(t,ha,e,dh(e)),l1(pC,t)}}function mC(e,t,n){e==="focusin"?(Bg(),Qo=t,ha=n,Qo.attachEvent("onpropertychange",j1)):e==="focusout"&&Bg()}function gC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zu(ha)}function vC(e,t){if(e==="click")return Zu(t)}function yC(e,t){if(e==="input"||e==="change")return Zu(t)}function xC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:xC;function ma(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(!Zd.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function Vg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ug(e,t){var n=Vg(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=Vg(n)}}function A1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?A1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function R1(){for(var e=window,t=au();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=au(e.document)}return t}function wh(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 wC(e){var t=R1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&A1(n.ownerDocument.documentElement,n)){if(r!==null&&wh(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=Ug(n,s);var o=Ug(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 bC=lr&&"documentMode"in document&&11>=document.documentMode,ws=null,yf=null,Yo=null,xf=!1;function Hg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xf||ws==null||ws!==au(r)||(r=ws,"selectionStart"in r&&wh(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}),Yo&&ma(Yo,r)||(Yo=r,r=hu(yf,"onSelect"),0<r.length&&(t=new vh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ws)))}function ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bs={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionend:ml("Transition","TransitionEnd")},rd={},O1={};lr&&(O1=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 Ju(e){if(rd[e])return rd[e];if(!bs[e])return e;var t=bs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in O1)return rd[e]=t[n];return e}var D1=Ju("animationend"),F1=Ju("animationiteration"),N1=Ju("animationstart"),M1=Ju("transitionend"),L1=new Map,Wg="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){L1.set(e,t),Xi(t,[e])}for(var id=0;id<Wg.length;id++){var sd=Wg[id],SC=sd.toLowerCase(),kC=sd[0].toUpperCase()+sd.slice(1);si(SC,"on"+kC)}si(D1,"onAnimationEnd");si(F1,"onAnimationIteration");si(N1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(M1,"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 Bo="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(" "),EC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bo));function qg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ST(r,t,void 0,e),e.currentTarget=null}function I1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;qg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;qg(i,a,u),s=l}}}if(uu)throw e=hf,uu=!1,hf=null,e}function be(e,t){var n=t[Ef];n===void 0&&(n=t[Ef]=new Set);var r=e+"__bubble";n.has(r)||($1(t,e,2,!1),n.add(r))}function od(e,t,n){var r=0;t&&(r|=4),$1(n,e,r,t)}var gl="_reactListening"+Math.random().toString(36).slice(2);function ga(e){if(!e[gl]){e[gl]=!0,qx.forEach(function(n){n!=="selectionchange"&&(EC.has(n)||od(n,!1,e),od(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gl]||(t[gl]=!0,od("selectionchange",!1,t))}}function $1(e,t,n,r){switch(S1(t)){case 1:var i=IT;break;case 4:i=$T;break;default:i=mh}n=i.bind(null,t,n,e),i=void 0,!pf||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 ad(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}l1(function(){var u=s,d=dh(n),c=[];e:{var f=L1.get(e);if(f!==void 0){var p=vh,h=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":p=eC;break;case"focusin":h="focus",p=ed;break;case"focusout":h="blur",p=ed;break;case"beforeblur":case"afterblur":p=ed;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Fg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=VT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=rC;break;case D1:case F1:case N1:p=WT;break;case M1:p=sC;break;case"scroll":p=zT;break;case"wheel":p=aC;break;case"copy":case"cut":case"paste":p=KT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Mg}var v=(t&4)!==0,b=!v&&e==="scroll",m=v?f!==null?f+"Capture":null:f;v=[];for(var x=u,w;x!==null;){w=x;var E=w.stateNode;if(w.tag===5&&E!==null&&(w=E,m!==null&&(E=ca(x,m),E!=null&&v.push(va(x,E,w)))),b)break;x=x.return}0<v.length&&(f=new p(f,h,null,n,d),c.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==df&&(h=n.relatedTarget||n.fromElement)&&(ki(h)||h[ur]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?ki(h):null,h!==null&&(b=Zi(h),h!==b||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=u),p!==h)){if(v=Fg,E="onMouseLeave",m="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=Mg,E="onPointerLeave",m="onPointerEnter",x="pointer"),b=p==null?f:Ss(p),w=h==null?f:Ss(h),f=new v(E,x+"leave",p,n,d),f.target=b,f.relatedTarget=w,E=null,ki(d)===u&&(v=new v(m,x+"enter",h,n,d),v.target=w,v.relatedTarget=b,E=v),b=E,p&&h)t:{for(v=p,m=h,x=0,w=v;w;w=hs(w))x++;for(w=0,E=m;E;E=hs(E))w++;for(;0<x-w;)v=hs(v),x--;for(;0<w-x;)m=hs(m),w--;for(;x--;){if(v===m||m!==null&&v===m.alternate)break t;v=hs(v),m=hs(m)}v=null}else v=null;p!==null&&Kg(c,f,p,v,!1),h!==null&&b!==null&&Kg(c,b,h,v,!0)}}e:{if(f=u?Ss(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=hC;else if($g(f))if(P1)T=yC;else{T=gC;var C=mC}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=vC);if(T&&(T=T(e,u))){_1(c,T,n,d);break e}C&&C(e,f,u),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&of(f,"number",f.value)}switch(C=u?Ss(u):window,e){case"focusin":($g(C)||C.contentEditable==="true")&&(ws=C,yf=u,Yo=null);break;case"focusout":Yo=yf=ws=null;break;case"mousedown":xf=!0;break;case"contextmenu":case"mouseup":case"dragend":xf=!1,Hg(c,n,d);break;case"selectionchange":if(bC)break;case"keydown":case"keyup":Hg(c,n,d)}var _;if(xh)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else xs?T1(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(E1&&n.locale!=="ko"&&(xs||k!=="onCompositionStart"?k==="onCompositionEnd"&&xs&&(_=k1()):(Lr=d,gh="value"in Lr?Lr.value:Lr.textContent,xs=!0)),C=hu(u,k),0<C.length&&(k=new Ng(k,e,null,n,d),c.push({event:k,listeners:C}),_?k.data=_:(_=C1(n),_!==null&&(k.data=_)))),(_=uC?cC(e,n):dC(e,n))&&(u=hu(u,"onBeforeInput"),0<u.length&&(d=new Ng("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=_))}I1(c,t)})}function va(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ca(e,n),s!=null&&r.unshift(va(e,s,i)),s=ca(e,t),s!=null&&r.push(va(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 Kg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=ca(n,s),l!=null&&o.unshift(va(n,l,a))):i||(l=ca(n,s),l!=null&&o.push(va(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var TC=/\r\n?/g,CC=/\u0000|\uFFFD/g;function Gg(e){return(typeof e=="string"?e:""+e).replace(TC,`
38
+ `).replace(CC,"")}function vl(e,t,n){if(t=Gg(t),Gg(e)!==t&&n)throw Error(N(425))}function mu(){}var wf=null,bf=null;function Sf(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 kf=typeof setTimeout=="function"?setTimeout:void 0,_C=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,PC=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg<"u"?function(e){return Qg.resolve(null).then(e).catch(jC)}:kf;function jC(e){setTimeout(function(){throw e})}function ld(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),pa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);pa(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 Yg(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 vo=Math.random().toString(36).slice(2),In="__reactFiber$"+vo,ya="__reactProps$"+vo,ur="__reactContainer$"+vo,Ef="__reactEvents$"+vo,AC="__reactListeners$"+vo,RC="__reactHandles$"+vo;function ki(e){var t=e[In];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ur]||n[In]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Yg(e);e!==null;){if(n=e[In])return n;e=Yg(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){return e=e[In]||e[ur],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function ec(e){return e[ya]||null}var Tf=[],ks=-1;function oi(e){return{current:e}}function ke(e){0>ks||(e.current=Tf[ks],Tf[ks]=null,ks--)}function xe(e,t){ks++,Tf[ks]=e.current,e.current=t}var ti={},pt=oi(ti),jt=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 At(e){return e=e.childContextTypes,e!=null}function gu(){ke(jt),ke(pt)}function Xg(e,t,n){if(pt.current!==ti)throw Error(N(168));xe(pt,t),xe(jt,n)}function z1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(N(108,mT(e)||"Unknown",i));return Ae({},n,r)}function vu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Vi=pt.current,xe(pt,e),xe(jt,jt.current),!0}function Zg(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=z1(e,t,Vi),r.__reactInternalMemoizedMergedChildContext=e,ke(jt),ke(pt),xe(pt,e)):ke(jt),xe(jt,n)}var er=null,tc=!1,ud=!1;function B1(e){er===null?er=[e]:er.push(e)}function OC(e){tc=!0,B1(e)}function ai(){if(!ud&&er!==null){ud=!0;var e=0,t=pe;try{var n=er;for(pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}er=null,tc=!1}catch(i){throw er!==null&&(er=er.slice(e+1)),f1(fh,ai),i}finally{pe=t,ud=!1}}return null}var Es=[],Ts=0,yu=null,xu=0,Jt=[],en=0,Ui=null,rr=1,ir="";function gi(e,t){Es[Ts++]=xu,Es[Ts++]=yu,yu=e,xu=t}function V1(e,t,n){Jt[en++]=rr,Jt[en++]=ir,Jt[en++]=Ui,Ui=e;var r=rr;e=ir;var i=32-kn(r)-1;r&=~(1<<i),n+=1;var s=32-kn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,rr=1<<32-kn(t)+i|n<<i|r,ir=s+e}else rr=1<<s|n<<i|r,ir=e}function bh(e){e.return!==null&&(gi(e,1),V1(e,1,0))}function Sh(e){for(;e===yu;)yu=Es[--Ts],Es[Ts]=null,xu=Es[--Ts],Es[Ts]=null;for(;e===Ui;)Ui=Jt[--en],Jt[en]=null,ir=Jt[--en],Jt[en]=null,rr=Jt[--en],Jt[en]=null}var Bt=null,It=null,Ee=!1,bn=null;function U1(e,t){var n=nn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Jg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Bt=e,It=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Bt=e,It=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ui!==null?{id:rr,overflow:ir}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Bt=e,It=null,!0):!1;default:return!1}}function Cf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _f(e){if(Ee){var t=It;if(t){var n=t;if(!Jg(e,t)){if(Cf(e))throw Error(N(418));t=Hr(n.nextSibling);var r=Bt;t&&Jg(e,t)?U1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Bt=e)}}else{if(Cf(e))throw Error(N(418));e.flags=e.flags&-4097|2,Ee=!1,Bt=e}}}function ev(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Bt=e}function yl(e){if(e!==Bt)return!1;if(!Ee)return ev(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Sf(e.type,e.memoizedProps)),t&&(t=It)){if(Cf(e))throw H1(),Error(N(418));for(;t;)U1(e,t),t=Hr(t.nextSibling)}if(ev(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){It=Hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}It=null}}else It=Bt?Hr(e.stateNode.nextSibling):null;return!0}function H1(){for(var e=It;e;)e=Hr(e.nextSibling)}function io(){It=Bt=null,Ee=!1}function kh(e){bn===null?bn=[e]:bn.push(e)}var DC=pr.ReactCurrentBatchConfig;function Oo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(N(309));var r=n.stateNode}if(!r)throw Error(N(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,e))}return e}function xl(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tv(e){var t=e._init;return t(e._payload)}function W1(e){function t(m,x){if(e){var w=m.deletions;w===null?(m.deletions=[x],m.flags|=16):w.push(x)}}function n(m,x){if(!e)return null;for(;x!==null;)t(m,x),x=x.sibling;return null}function r(m,x){for(m=new Map;x!==null;)x.key!==null?m.set(x.key,x):m.set(x.index,x),x=x.sibling;return m}function i(m,x){return m=Gr(m,x),m.index=0,m.sibling=null,m}function s(m,x,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<x?(m.flags|=2,x):w):(m.flags|=2,x)):(m.flags|=1048576,x)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,x,w,E){return x===null||x.tag!==6?(x=gd(w,m.mode,E),x.return=m,x):(x=i(x,w),x.return=m,x)}function l(m,x,w,E){var T=w.type;return T===ys?d(m,x,w.props.children,E,w.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&tv(T)===x.type)?(E=i(x,w.props),E.ref=Oo(m,x,w),E.return=m,E):(E=Gl(w.type,w.key,w.props,null,m.mode,E),E.ref=Oo(m,x,w),E.return=m,E)}function u(m,x,w,E){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=vd(w,m.mode,E),x.return=m,x):(x=i(x,w.children||[]),x.return=m,x)}function d(m,x,w,E,T){return x===null||x.tag!==7?(x=Ii(w,m.mode,E,T),x.return=m,x):(x=i(x,w),x.return=m,x)}function c(m,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=gd(""+x,m.mode,w),x.return=m,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ll:return w=Gl(x.type,x.key,x.props,null,m.mode,w),w.ref=Oo(m,null,x),w.return=m,w;case vs:return x=vd(x,m.mode,w),x.return=m,x;case kr:var E=x._init;return c(m,E(x._payload),w)}if($o(x)||_o(x))return x=Ii(x,m.mode,w,null),x.return=m,x;xl(m,x)}return null}function f(m,x,w,E){var T=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return T!==null?null:a(m,x,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:return w.key===T?l(m,x,w,E):null;case vs:return w.key===T?u(m,x,w,E):null;case kr:return T=w._init,f(m,x,T(w._payload),E)}if($o(w)||_o(w))return T!==null?null:d(m,x,w,E,null);xl(m,w)}return null}function p(m,x,w,E,T){if(typeof E=="string"&&E!==""||typeof E=="number")return m=m.get(w)||null,a(x,m,""+E,T);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case ll:return m=m.get(E.key===null?w:E.key)||null,l(x,m,E,T);case vs:return m=m.get(E.key===null?w:E.key)||null,u(x,m,E,T);case kr:var C=E._init;return p(m,x,w,C(E._payload),T)}if($o(E)||_o(E))return m=m.get(w)||null,d(x,m,E,T,null);xl(x,E)}return null}function h(m,x,w,E){for(var T=null,C=null,_=x,k=x=0,j=null;_!==null&&k<w.length;k++){_.index>k?(j=_,_=null):j=_.sibling;var R=f(m,_,w[k],E);if(R===null){_===null&&(_=j);break}e&&_&&R.alternate===null&&t(m,_),x=s(R,x,k),C===null?T=R:C.sibling=R,C=R,_=j}if(k===w.length)return n(m,_),Ee&&gi(m,k),T;if(_===null){for(;k<w.length;k++)_=c(m,w[k],E),_!==null&&(x=s(_,x,k),C===null?T=_:C.sibling=_,C=_);return Ee&&gi(m,k),T}for(_=r(m,_);k<w.length;k++)j=p(_,m,k,w[k],E),j!==null&&(e&&j.alternate!==null&&_.delete(j.key===null?k:j.key),x=s(j,x,k),C===null?T=j:C.sibling=j,C=j);return e&&_.forEach(function(M){return t(m,M)}),Ee&&gi(m,k),T}function v(m,x,w,E){var T=_o(w);if(typeof T!="function")throw Error(N(150));if(w=T.call(w),w==null)throw Error(N(151));for(var C=T=null,_=x,k=x=0,j=null,R=w.next();_!==null&&!R.done;k++,R=w.next()){_.index>k?(j=_,_=null):j=_.sibling;var M=f(m,_,R.value,E);if(M===null){_===null&&(_=j);break}e&&_&&M.alternate===null&&t(m,_),x=s(M,x,k),C===null?T=M:C.sibling=M,C=M,_=j}if(R.done)return n(m,_),Ee&&gi(m,k),T;if(_===null){for(;!R.done;k++,R=w.next())R=c(m,R.value,E),R!==null&&(x=s(R,x,k),C===null?T=R:C.sibling=R,C=R);return Ee&&gi(m,k),T}for(_=r(m,_);!R.done;k++,R=w.next())R=p(_,m,k,R.value,E),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?k:R.key),x=s(R,x,k),C===null?T=R:C.sibling=R,C=R);return e&&_.forEach(function(G){return t(m,G)}),Ee&&gi(m,k),T}function b(m,x,w,E){if(typeof w=="object"&&w!==null&&w.type===ys&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ll:e:{for(var T=w.key,C=x;C!==null;){if(C.key===T){if(T=w.type,T===ys){if(C.tag===7){n(m,C.sibling),x=i(C,w.props.children),x.return=m,m=x;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&tv(T)===C.type){n(m,C.sibling),x=i(C,w.props),x.ref=Oo(m,C,w),x.return=m,m=x;break e}n(m,C);break}else t(m,C);C=C.sibling}w.type===ys?(x=Ii(w.props.children,m.mode,E,w.key),x.return=m,m=x):(E=Gl(w.type,w.key,w.props,null,m.mode,E),E.ref=Oo(m,x,w),E.return=m,m=E)}return o(m);case vs:e:{for(C=w.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(m,x.sibling),x=i(x,w.children||[]),x.return=m,m=x;break e}else{n(m,x);break}else t(m,x);x=x.sibling}x=vd(w,m.mode,E),x.return=m,m=x}return o(m);case kr:return C=w._init,b(m,x,C(w._payload),E)}if($o(w))return h(m,x,w,E);if(_o(w))return v(m,x,w,E);xl(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(m,x.sibling),x=i(x,w),x.return=m,m=x):(n(m,x),x=gd(w,m.mode,E),x.return=m,m=x),o(m)):n(m,x)}return b}var so=W1(!0),q1=W1(!1),wu=oi(null),bu=null,Cs=null,Eh=null;function Th(){Eh=Cs=bu=null}function Ch(e){var t=wu.current;ke(wu),e._currentValue=t}function Pf(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){bu=e,Eh=Cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function ln(e){var t=e._currentValue;if(Eh!==e)if(e={context:e,memoizedValue:t,next:null},Cs===null){if(bu===null)throw Error(N(308));Cs=e,bu.dependencies={lanes:0,firstContext:e}}else Cs=Cs.next=e;return t}var Ei=null;function _h(e){Ei===null?Ei=[e]:Ei.push(e)}function K1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,_h(t)):(n.next=i.next,i.next=n),t.interleaved=n,cr(e,r)}function cr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Er=!1;function Ph(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function G1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function or(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,cr(e,n)}return i=r.interleaved,i===null?(t.next=t,_h(r)):(t.next=i.next,i.next=t),r.interleaved=t,cr(e,n)}function Vl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ph(e,n)}}function nv(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 Su(e,t,n,r){var i=e.updateQueue;Er=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,d=u=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(f=t,p=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){c=h.call(p,c,f);break e}c=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,f=typeof h=="function"?h.call(p,c,f):h,f==null)break e;c=Ae({},c,f);break e;case 2:Er=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Wi|=o,e.lanes=o,e.memoizedState=c}}function rv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(N(191,i));i.call(r)}}}var Ga={},zn=oi(Ga),xa=oi(Ga),wa=oi(Ga);function Ti(e){if(e===Ga)throw Error(N(174));return e}function jh(e,t){switch(xe(wa,t),xe(xa,e),xe(zn,Ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=lf(t,e)}ke(zn),xe(zn,t)}function oo(){ke(zn),ke(xa),ke(wa)}function Q1(e){Ti(wa.current);var t=Ti(zn.current),n=lf(t,e.type);t!==n&&(xe(xa,e),xe(zn,n))}function Ah(e){xa.current===e&&(ke(zn),ke(xa))}var _e=oi(0);function ku(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 cd=[];function Rh(){for(var e=0;e<cd.length;e++)cd[e]._workInProgressVersionPrimary=null;cd.length=0}var Ul=pr.ReactCurrentDispatcher,dd=pr.ReactCurrentBatchConfig,Hi=0,je=null,ze=null,Ke=null,Eu=!1,Xo=!1,ba=0,FC=0;function at(){throw Error(N(321))}function Oh(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 Dh(e,t,n,r,i,s){if(Hi=s,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ul.current=e===null||e.memoizedState===null?IC:$C,e=n(r,i),Xo){s=0;do{if(Xo=!1,ba=0,25<=s)throw Error(N(301));s+=1,Ke=ze=null,t.updateQueue=null,Ul.current=zC,e=n(r,i)}while(Xo)}if(Ul.current=Tu,t=ze!==null&&ze.next!==null,Hi=0,Ke=ze=je=null,Eu=!1,t)throw Error(N(300));return e}function Fh(){var e=ba!==0;return ba=0,e}function On(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function un(){if(ze===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ke===null?je.memoizedState:Ke.next;if(t!==null)Ke=t,ze=e;else{if(e===null)throw Error(N(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ke===null?je.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Sa(e,t){return typeof t=="function"?t(e):t}function fd(e){var t=un(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=ze,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var d=u.lane;if((Hi&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,je.lanes|=d,Wi|=d}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Tn(r,t.memoizedState)||(Pt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,je.lanes|=s,Wi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pd(e){var t=un(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Tn(s,t.memoizedState)||(Pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Y1(){}function X1(e,t){var n=je,r=un(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,Pt=!0),r=r.queue,Nh(ew.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,ka(9,J1.bind(null,n,r,i,t),void 0,null),Ge===null)throw Error(N(349));Hi&30||Z1(n,t,i)}return i}function Z1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function J1(e,t,n,r){t.value=n,t.getSnapshot=r,tw(t)&&nw(e)}function ew(e,t,n){return n(function(){tw(t)&&nw(e)})}function tw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function nw(e){var t=cr(e,1);t!==null&&En(t,e,1,-1)}function iv(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:Sa,lastRenderedState:e},t.queue=e,e=e.dispatch=LC.bind(null,je,e),[t.memoizedState,e]}function ka(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function rw(){return un().memoizedState}function Hl(e,t,n,r){var i=On();je.flags|=e,i.memoizedState=ka(1|t,n,void 0,r===void 0?null:r)}function nc(e,t,n,r){var i=un();r=r===void 0?null:r;var s=void 0;if(ze!==null){var o=ze.memoizedState;if(s=o.destroy,r!==null&&Oh(r,o.deps)){i.memoizedState=ka(t,n,s,r);return}}je.flags|=e,i.memoizedState=ka(1|t,n,s,r)}function sv(e,t){return Hl(8390656,8,e,t)}function Nh(e,t){return nc(2048,8,e,t)}function iw(e,t){return nc(4,2,e,t)}function sw(e,t){return nc(4,4,e,t)}function ow(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 aw(e,t,n){return n=n!=null?n.concat([e]):null,nc(4,4,ow.bind(null,t,e),n)}function Mh(){}function lw(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function uw(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cw(e,t,n){return Hi&21?(Tn(n,t)||(n=m1(),je.lanes|=n,Wi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function NC(e,t){var n=pe;pe=n!==0&&4>n?n:4,e(!0);var r=dd.transition;dd.transition={};try{e(!1),t()}finally{pe=n,dd.transition=r}}function dw(){return un().memoizedState}function MC(e,t,n){var r=Kr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fw(e))pw(t,n);else if(n=K1(e,t,n,r),n!==null){var i=yt();En(n,e,r,i),hw(n,t,r)}}function LC(e,t,n){var r=Kr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fw(e))pw(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,_h(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=K1(e,t,i,r),n!==null&&(i=yt(),En(n,e,r,i),hw(n,t,r))}}function fw(e){var t=e.alternate;return e===je||t!==null&&t===je}function pw(e,t){Xo=Eu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ph(e,n)}}var Tu={readContext:ln,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},IC={readContext:ln,useCallback:function(e,t){return On().memoizedState=[e,t===void 0?null:t],e},useContext:ln,useEffect:sv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hl(4194308,4,ow.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hl(4,2,e,t)},useMemo:function(e,t){var n=On();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=On();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=MC.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=On();return e={current:e},t.memoizedState=e},useState:iv,useDebugValue:Mh,useDeferredValue:function(e){return On().memoizedState=e},useTransition:function(){var e=iv(!1),t=e[0];return e=NC.bind(null,e[1]),On().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=On();if(Ee){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Ge===null)throw Error(N(349));Hi&30||Z1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,sv(ew.bind(null,r,s,e),[e]),r.flags|=2048,ka(9,J1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=On(),t=Ge.identifierPrefix;if(Ee){var n=ir,r=rr;n=(r&~(1<<32-kn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ba++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=FC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$C={readContext:ln,useCallback:lw,useContext:ln,useEffect:Nh,useImperativeHandle:aw,useInsertionEffect:iw,useLayoutEffect:sw,useMemo:uw,useReducer:fd,useRef:rw,useState:function(){return fd(Sa)},useDebugValue:Mh,useDeferredValue:function(e){var t=un();return cw(t,ze.memoizedState,e)},useTransition:function(){var e=fd(Sa)[0],t=un().memoizedState;return[e,t]},useMutableSource:Y1,useSyncExternalStore:X1,useId:dw,unstable_isNewReconciler:!1},zC={readContext:ln,useCallback:lw,useContext:ln,useEffect:Nh,useImperativeHandle:aw,useInsertionEffect:iw,useLayoutEffect:sw,useMemo:uw,useReducer:pd,useRef:rw,useState:function(){return pd(Sa)},useDebugValue:Mh,useDeferredValue:function(e){var t=un();return ze===null?t.memoizedState=e:cw(t,ze.memoizedState,e)},useTransition:function(){var e=pd(Sa)[0],t=un().memoizedState;return[e,t]},useMutableSource:Y1,useSyncExternalStore:X1,useId:dw,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var rc={isMounted:function(e){return(e=e._reactInternals)?Zi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(En(t,e,i,r),Vl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yt(),i=Kr(e),s=or(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(En(t,e,i,r),Vl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),r=Kr(e),i=or(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wr(e,i,r),t!==null&&(En(t,e,r,n),Vl(t,e,r))}};function ov(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?!ma(n,r)||!ma(i,s):!0}function mw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=ln(s):(i=At(t)?Vi:pt.current,r=t.contextTypes,s=(r=r!=null)?ro(e,i):ti),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=rc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function av(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&&rc.enqueueReplaceState(t,t.state,null)}function Af(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ph(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=ln(s):(s=At(t)?Vi:pt.current,i.context=ro(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(jf(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&&rc.enqueueReplaceState(i,i.state,null),Su(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+=hT(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 hd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BC=typeof WeakMap=="function"?WeakMap:Map;function gw(e,t,n){n=or(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_u||(_u=!0,Bf=r),Rf(e,t)},n}function vw(e,t,n){n=or(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Rf(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function lv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new BC;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=t2.bind(null,e,t,n),t.then(e,e))}function uv(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 cv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=or(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var VC=pr.ReactCurrentOwner,Pt=!1;function gt(e,t,n,r){t.child=e===null?q1(t,null,n,r):so(t,e.child,n,r)}function dv(e,t,n,r,i){n=n.render;var s=t.ref;return $s(t,i),r=Dh(e,t,n,r,s,i),n=Fh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&n&&bh(t),t.flags|=1,gt(e,t,r,i),t.child)}function fv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Hh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,yw(e,t,s,r,i)):(e=Gl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ma,n(o,r)&&e.ref===t.ref)return dr(e,t,i)}return t.flags|=1,e=Gr(s,r),e.ref=t.ref,e.return=t,t.child=e}function yw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ma(s,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,dr(e,t,i)}return Of(e,t,n,r,i)}function xw(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(Ps,Lt),Lt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(Ps,Lt),Lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(Ps,Lt),Lt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(Ps,Lt),Lt|=r;return gt(e,t,i,n),t.child}function ww(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Of(e,t,n,r,i){var s=At(n)?Vi:pt.current;return s=ro(t,s),$s(t,i),n=Dh(e,t,n,r,s,i),r=Fh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&r&&bh(t),t.flags|=1,gt(e,t,n,i),t.child)}function pv(e,t,n,r,i){if(At(n)){var s=!0;vu(t)}else s=!1;if($s(t,i),t.stateNode===null)Wl(e,t),mw(t,n,r),Af(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=an(u):(u=At(n)?Vi:pt.current,u=ro(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&av(t,o,r,u),Er=!1;var f=t.memoizedState;o.state=f,Su(t,r,o,i),l=t.memoizedState,a!==r||f!==l||jt.current||Er?(typeof d=="function"&&(jf(t,n,d,r),l=t.memoizedState),(a=Er||ov(t,n,a,r,f,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,G1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:gn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=an(l):(l=At(n)?Vi:pt.current,l=ro(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&av(t,o,r,l),Er=!1,f=t.memoizedState,o.state=f,Su(t,r,o,i);var h=t.memoizedState;a!==c||f!==h||jt.current||Er?(typeof p=="function"&&(jf(t,n,p,r),h=t.memoizedState),(u=Er||ov(t,n,u,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Df(e,t,n,r,s,i)}function Df(e,t,n,r,i,s){ww(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Zg(t,n,!1),dr(e,t,s);r=t.stateNode,VC.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)):gt(e,t,a,s),t.memoizedState=r.state,i&&Zg(t,n,!0),t.child}function bw(e){var t=e.stateNode;t.pendingContext?Xg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Xg(e,t.context,!1),jh(e,t.containerInfo)}function hv(e,t,n,r,i){return io(),kh(i),t.flags|=256,gt(e,t,n,r),t.child}var Ff={dehydrated:null,treeContext:null,retryLane:0};function Nf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sw(e,t,n){var r=t.pendingProps,i=_e.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),xe(_e,i&1),e===null)return _f(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=oc(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=Nf(n),t.memoizedState=Ff,e):Lh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return UC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Gr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Gr(a,s):(s=Ii(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Nf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Ff,r}return s=e.child,e=s.sibling,r=Gr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Lh(e,t){return t=oc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wl(e,t,n,r){return r!==null&&kh(r),so(t,e.child,null,n),e=Lh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=hd(Error(N(422))),wl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=oc({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=Nf(o),t.memoizedState=Ff,s);if(!(t.mode&1))return wl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(N(419)),r=hd(s,r,void 0),wl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Pt||a){if(r=Ge,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,cr(e,i),kn(r,e,i,-1))}return Uh(),r=hd(Error(N(421))),wl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=n2.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,It=Hr(i.nextSibling),Bt=t,Ee=!0,wn=null,e!==null&&(Jt[en++]=rr,Jt[en++]=ir,Jt[en++]=Ui,rr=e.id,ir=e.overflow,Ui=t),t=Lh(t,r.children),t.flags|=4096,t)}function mv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Pf(e.return,t,n)}function md(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 kw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(gt(e,t,r.children,n),r=_e.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mv(e,n,t);else if(e.tag===19)mv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xe(_e,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ku(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),md(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&&ku(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}md(t,!0,n,null,s);break;case"together":md(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=Gr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function HC(e,t,n){switch(t.tag){case 3:bw(t),io();break;case 5:Q1(t);break;case 1:At(t.type)&&vu(t);break;case 4:jh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;xe(wu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(_e,_e.current&1),t.flags|=128,null):n&t.child.childLanes?Sw(e,t,n):(xe(_e,_e.current&1),e=dr(e,t,n),e!==null?e.sibling:null);xe(_e,_e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return kw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),xe(_e,_e.current),r)break;return null;case 22:case 23:return t.lanes=0,xw(e,t,n)}return dr(e,t,n)}var Ew,Mf,Tw,Cw;Ew=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}};Mf=function(){};Tw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti($n.current);var s=null;switch(n){case"input":i=rf(e,i),r=rf(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=af(e,i),r=af(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=mu)}uf(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(la.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(la.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&be("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Cw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Do(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WC(e,t,n){var r=t.pendingProps;switch(Sh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return At(t.type)&&gu(),lt(t),null;case 3:return r=t.stateNode,oo(),ke(jt),ke(pt),Rh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wn!==null&&(Hf(wn),wn=null))),Mf(e,t),lt(t),null;case 5:Ah(t);var i=Ti(wa.current);if(n=t.type,e!==null&&t.stateNode!=null)Tw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return lt(t),null}if(e=Ti($n.current),yl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ln]=t,r[ya]=s,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(i=0;i<Bo.length;i++)be(Bo[i],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":Eg(r,s),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},be("invalid",r);break;case"textarea":Cg(r,s),be("invalid",r)}uf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",""+a]):la.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&be("scroll",r)}switch(n){case"input":ul(r),Tg(r,s,!0);break;case"textarea":ul(r),_g(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=mu)}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=e1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ln]=t,e[ya]=r,Ew(e,t,!1,!1),t.stateNode=e;e:{switch(o=cf(n,r),n){case"dialog":be("cancel",e),be("close",e),i=r;break;case"iframe":case"object":case"embed":be("load",e),i=r;break;case"video":case"audio":for(i=0;i<Bo.length;i++)be(Bo[i],e);i=r;break;case"source":be("error",e),i=r;break;case"img":case"image":case"link":be("error",e),be("load",e),i=r;break;case"details":be("toggle",e),i=r;break;case"input":Eg(e,r),i=rf(e,r),be("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),be("invalid",e);break;case"textarea":Cg(e,r),i=af(e,r),be("invalid",e);break;default:i=r}uf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?r1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&t1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ua(e,l):typeof l=="number"&&ua(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(la.hasOwnProperty(s)?l!=null&&s==="onScroll"&&be("scroll",e):l!=null&&ah(e,s,l,o))}switch(n){case"input":ul(e),Tg(e,r,!1);break;case"textarea":ul(e),_g(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=mu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return lt(t),null;case 6:if(e&&t.stateNode!=null)Cw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Ti(wa.current),Ti($n.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ln]=t,(s=r.nodeValue!==n)&&(e=Bt,e!==null))switch(e.tag){case 3:vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ln]=t,t.stateNode=r}return lt(t),null;case 13:if(ke(_e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&It!==null&&t.mode&1&&!(t.flags&128))H1(),io(),t.flags|=98560,s=!1;else if(s=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(N(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(N(317));s[Ln]=t}else io(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;lt(t),s=!1}else wn!==null&&(Hf(wn),wn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||_e.current&1?Ve===0&&(Ve=3):Uh())),t.updateQueue!==null&&(t.flags|=4),lt(t),null);case 4:return oo(),Mf(e,t),e===null&&ga(t.stateNode.containerInfo),lt(t),null;case 10:return Ch(t.type._context),lt(t),null;case 17:return At(t.type)&&gu(),lt(t),null;case 19:if(ke(_e),s=t.memoizedState,s===null)return lt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Do(s,!1);else{if(Ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ku(e),o!==null){for(t.flags|=128,Do(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(_e,_e.current&1|2),t.child}e=e.sibling}s.tail!==null&&Me()>lo&&(t.flags|=128,r=!0,Do(s,!1),t.lanes=4194304)}else{if(!r)if(e=ku(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Do(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return lt(t),null}else 2*Me()-s.renderingStartTime>lo&&n!==1073741824&&(t.flags|=128,r=!0,Do(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Me(),t.sibling=null,n=_e.current,xe(_e,r?n&1|2:n&1),t):(lt(t),null);case 22:case 23:return Vh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Lt&1073741824&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function qC(e,t){switch(Sh(t),t.tag){case 1:return At(t.type)&&gu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oo(),ke(jt),ke(pt),Rh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ah(t),null;case 13:if(ke(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(_e),null;case 4:return oo(),null;case 10:return Ch(t.type._context),null;case 22:case 23:return Vh(),null;case 24:return null;default:return null}}var bl=!1,dt=!1,KC=typeof WeakSet=="function"?WeakSet:Set,z=null;function _s(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function Lf(e,t,n){try{n()}catch(r){De(e,t,r)}}var gv=!1;function GC(e,t){if(wf=fu,e=R1(),wh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var p;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)f=c,c=p;for(;;){if(c===e)break t;if(f===n&&++u===i&&(a=o),f===s&&++d===r&&(l=o),(p=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(bf={focusedElem:e,selectionRange:n},fu=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,b=h.memoizedState,m=t.stateNode,x=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:gn(t.type,v),b);m.__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(N(163))}}catch(E){De(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return h=gv,gv=!1,h}function Zo(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&&Lf(t,n,s)}i=i.next}while(i!==r)}}function ic(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 If(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 _w(e){var t=e.alternate;t!==null&&(e.alternate=null,_w(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ln],delete t[ya],delete t[Ef],delete t[AC],delete t[RC])),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 Pw(e){return e.tag===5||e.tag===3||e.tag===4}function vv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pw(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 $f(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=mu));else if(r!==4&&(e=e.child,e!==null))for($f(e,t,n),e=e.sibling;e!==null;)$f(e,t,n),e=e.sibling}function zf(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(zf(e,t,n),e=e.sibling;e!==null;)zf(e,t,n),e=e.sibling}var tt=null,yn=!1;function wr(e,t,n){for(n=n.child;n!==null;)jw(e,t,n),n=n.sibling}function jw(e,t,n){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(Yu,n)}catch{}switch(n.tag){case 5:dt||_s(n,t);case 6:var r=tt,i=yn;tt=null,wr(e,t,n),tt=r,yn=i,tt!==null&&(yn?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(yn?(e=tt,n=n.stateNode,e.nodeType===8?ld(e.parentNode,n):e.nodeType===1&&ld(e,n),pa(e)):ld(tt,n.stateNode));break;case 4:r=tt,i=yn,tt=n.stateNode.containerInfo,yn=!0,wr(e,t,n),tt=r,yn=i;break;case 0:case 11:case 14:case 15:if(!dt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Lf(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!dt&&(_s(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(dt=(r=dt)||n.memoizedState!==null,wr(e,t,n),dt=r):wr(e,t,n);break;default:wr(e,t,n)}}function yv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KC),t.forEach(function(r){var i=r2.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function pn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:tt=a.stateNode,yn=!1;break e;case 3:tt=a.stateNode.containerInfo,yn=!0;break e;case 4:tt=a.stateNode.containerInfo,yn=!0;break e}a=a.return}if(tt===null)throw Error(N(160));jw(s,o,i),tt=null,yn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){De(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Aw(t,e),t=t.sibling}function Aw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pn(t,e),Pn(e),r&4){try{Zo(3,e,e.return),ic(3,e)}catch(v){De(e,e.return,v)}try{Zo(5,e,e.return)}catch(v){De(e,e.return,v)}}break;case 1:pn(t,e),Pn(e),r&512&&n!==null&&_s(n,n.return);break;case 5:if(pn(t,e),Pn(e),r&512&&n!==null&&_s(n,n.return),e.flags&32){var i=e.stateNode;try{ua(i,"")}catch(v){De(e,e.return,v)}}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&&Zx(i,s),cf(a,o);var u=cf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?r1(i,c):d==="dangerouslySetInnerHTML"?t1(i,c):d==="children"?ua(i,c):ah(i,d,c,u)}switch(a){case"input":sf(i,s);break;case"textarea":Jx(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ns(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[ya]=s}catch(v){De(e,e.return,v)}}break;case 6:if(pn(t,e),Pn(e),r&4){if(e.stateNode===null)throw Error(N(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(v){De(e,e.return,v)}}break;case 3:if(pn(t,e),Pn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pa(t.containerInfo)}catch(v){De(e,e.return,v)}break;case 4:pn(t,e),Pn(e);break;case 13:pn(t,e),Pn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(zh=Me())),r&4&&yv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(dt=(u=dt)||d,pn(t,e),dt=u):pn(t,e),Pn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(z=e,d=e.child;d!==null;){for(c=z=d;z!==null;){switch(f=z,p=f.child,f.tag){case 0:case 11:case 14:case 15:Zo(4,f,f.return);break;case 1:_s(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(v){De(r,n,v)}}break;case 5:_s(f,f.return);break;case 22:if(f.memoizedState!==null){wv(c);continue}}p!==null?(p.return=f,z=p):wv(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=n1("display",o))}catch(v){De(e,e.return,v)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(v){De(e,e.return,v)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:pn(t,e),Pn(e),r&4&&yv(e);break;case 21:break;default:pn(t,e),Pn(e)}}function Pn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Pw(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ua(i,""),r.flags&=-33);var s=vv(e);zf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=vv(e);$f(e,a,o);break;default:throw Error(N(161))}}catch(l){De(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QC(e,t,n){z=e,Rw(e)}function Rw(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var i=z,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||bl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||dt;a=bl;var u=dt;if(bl=o,(dt=l)&&!u)for(z=i;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?bv(i):l!==null?(l.return=o,z=l):bv(i);for(;s!==null;)z=s,Rw(s),s=s.sibling;z=i,bl=a,dt=u}xv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,z=s):xv(e)}}function xv(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:dt||ic(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!dt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&rv(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}rv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&pa(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}dt||t.flags&512&&If(t)}catch(f){De(t,t.return,f)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function wv(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function bv(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ic(4,t)}catch(l){De(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){De(t,i,l)}}var s=t.return;try{If(t)}catch(l){De(t,s,l)}break;case 5:var o=t.return;try{If(t)}catch(l){De(t,o,l)}}}catch(l){De(t,t.return,l)}if(t===e){z=null;break}var a=t.sibling;if(a!==null){a.return=t.return,z=a;break}z=t.return}}var YC=Math.ceil,Cu=pr.ReactCurrentDispatcher,Ih=pr.ReactCurrentOwner,sn=pr.ReactCurrentBatchConfig,ce=0,Ge=null,Le=null,it=0,Lt=0,Ps=oi(0),Ve=0,Ea=null,Wi=0,sc=0,$h=0,Jo=null,Ct=null,zh=0,lo=1/0,Jn=null,_u=!1,Bf=null,qr=null,Sl=!1,Ir=null,Pu=0,ea=0,Vf=null,ql=-1,Kl=0;function yt(){return ce&6?Me():ql!==-1?ql:ql=Me()}function Kr(e){return e.mode&1?ce&2&&it!==0?it&-it:DC.transition!==null?(Kl===0&&(Kl=m1()),Kl):(e=pe,e!==0||(e=window.event,e=e===void 0?16:S1(e.type)),e):1}function kn(e,t,n,r){if(50<ea)throw ea=0,Vf=null,Error(N(185));Wa(e,n,r),(!(ce&2)||e!==Ge)&&(e===Ge&&(!(ce&2)&&(sc|=n),Ve===4&&_r(e,it)),Rt(e,r),n===1&&ce===0&&!(t.mode&1)&&(lo=Me()+500,tc&&ai()))}function Rt(e,t){var n=e.callbackNode;DT(e,t);var r=du(e,e===Ge?it:0);if(r===0)n!==null&&Ag(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ag(n),t===1)e.tag===0?OC(Sv.bind(null,e)):B1(Sv.bind(null,e)),PC(function(){!(ce&6)&&ai()}),n=null;else{switch(g1(r)){case 1:n=fh;break;case 4:n=p1;break;case 16:n=cu;break;case 536870912:n=h1;break;default:n=cu}n=$w(n,Ow.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ow(e,t){if(ql=-1,Kl=0,ce&6)throw Error(N(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=du(e,e===Ge?it:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ju(e,r);else{t=r;var i=ce;ce|=2;var s=Fw();(Ge!==e||it!==t)&&(Jn=null,lo=Me()+500,Li(e,t));do try{JC();break}catch(a){Dw(e,a)}while(!0);Th(),Cu.current=s,ce=i,Le!==null?t=0:(Ge=null,it=0,t=Ve)}if(t!==0){if(t===2&&(i=mf(e),i!==0&&(r=i,t=Uf(e,i))),t===1)throw n=Ea,Li(e,0),_r(e,r),Rt(e,Me()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!XC(i)&&(t=ju(e,r),t===2&&(s=mf(e),s!==0&&(r=s,t=Uf(e,s))),t===1))throw n=Ea,Li(e,0),_r(e,r),Rt(e,Me()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:vi(e,Ct,Jn);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=zh+500-Me(),10<t)){if(du(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){yt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=kf(vi.bind(null,e,Ct,Jn),t);break}vi(e,Ct,Jn);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Sn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*YC(r/1960))-r,10<r){e.timeoutHandle=kf(vi.bind(null,e,Ct,Jn),r);break}vi(e,Ct,Jn);break;case 5:vi(e,Ct,Jn);break;default:throw Error(N(329))}}}return Rt(e,Me()),e.callbackNode===n?Ow.bind(null,e):null}function Uf(e,t){var n=Jo;return e.current.memoizedState.isDehydrated&&(Li(e,t).flags|=256),e=ju(e,t),e!==2&&(t=Ct,Ct=n,t!==null&&Hf(t)),e}function Hf(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function XC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!En(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _r(e,t){for(t&=~$h,t&=~sc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Sn(t),r=1<<n;e[n]=-1,t&=~r}}function Sv(e){if(ce&6)throw Error(N(327));zs();var t=du(e,0);if(!(t&1))return Rt(e,Me()),null;var n=ju(e,t);if(e.tag!==0&&n===2){var r=mf(e);r!==0&&(t=r,n=Uf(e,r))}if(n===1)throw n=Ea,Li(e,0),_r(e,t),Rt(e,Me()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vi(e,Ct,Jn),Rt(e,Me()),null}function Bh(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(lo=Me()+500,tc&&ai())}}function qi(e){Ir!==null&&Ir.tag===0&&!(ce&6)&&zs();var t=ce;ce|=1;var n=sn.transition,r=pe;try{if(sn.transition=null,pe=1,e)return e()}finally{pe=r,sn.transition=n,ce=t,!(ce&6)&&ai()}}function Vh(){Lt=Ps.current,ke(Ps)}function Li(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_C(n)),Le!==null)for(n=Le.return;n!==null;){var r=n;switch(Sh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&gu();break;case 3:oo(),ke(jt),ke(pt),Rh();break;case 5:Ah(r);break;case 4:oo();break;case 13:ke(_e);break;case 19:ke(_e);break;case 10:Ch(r.type._context);break;case 22:case 23:Vh()}n=n.return}if(Ge=e,Le=e=Gr(e.current,null),it=Lt=t,Ve=0,Ea=null,$h=sc=Wi=0,Ct=Jo=null,Ei!==null){for(t=0;t<Ei.length;t++)if(n=Ei[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ei=null}return e}function Dw(e,t){do{var n=Le;try{if(Th(),Ul.current=Tu,Eu){for(var r=je.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Eu=!1}if(Hi=0,Ke=ze=je=null,Xo=!1,ba=0,Ih.current=null,n===null||n.return===null){Ve=1,Ea=t,Le=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=it,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=uv(o);if(p!==null){p.flags&=-257,cv(p,o,a,s,t),p.mode&1&&lv(s,u,t),t=p,l=u;var h=t.updateQueue;if(h===null){var v=new Set;v.add(l),t.updateQueue=v}else h.add(l);break e}else{if(!(t&1)){lv(s,u,t),Uh();break e}l=Error(N(426))}}else if(Ee&&a.mode&1){var b=uv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),cv(b,o,a,s,t),kh(ao(l,a));break e}}s=l=ao(l,a),Ve!==4&&(Ve=2),Jo===null?Jo=[s]:Jo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=gw(s,l,t);nv(s,m);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"&&(qr===null||!qr.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=vw(s,a,t);nv(s,E);break e}}s=s.return}while(s!==null)}Mw(n)}catch(T){t=T,Le===n&&n!==null&&(Le=n=n.return);continue}break}while(!0)}function Fw(){var e=Cu.current;return Cu.current=Tu,e===null?Tu:e}function Uh(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Ge===null||!(Wi&268435455)&&!(sc&268435455)||_r(Ge,it)}function ju(e,t){var n=ce;ce|=2;var r=Fw();(Ge!==e||it!==t)&&(Jn=null,Li(e,t));do try{ZC();break}catch(i){Dw(e,i)}while(!0);if(Th(),ce=n,Cu.current=r,Le!==null)throw Error(N(261));return Ge=null,it=0,Ve}function ZC(){for(;Le!==null;)Nw(Le)}function JC(){for(;Le!==null&&!ET();)Nw(Le)}function Nw(e){var t=Iw(e.alternate,e,Lt);e.memoizedProps=e.pendingProps,t===null?Mw(e):Le=t,Ih.current=null}function Mw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=qC(n,t),n!==null){n.flags&=32767,Le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,Le=null;return}}else if(n=WC(n,t,Lt),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);Ve===0&&(Ve=5)}function vi(e,t,n){var r=pe,i=sn.transition;try{sn.transition=null,pe=1,e2(e,t,n,r)}finally{sn.transition=i,pe=r}return null}function e2(e,t,n,r){do zs();while(Ir!==null);if(ce&6)throw Error(N(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(FT(e,s),e===Ge&&(Le=Ge=null,it=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sl||(Sl=!0,$w(cu,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=sn.transition,sn.transition=null;var o=pe;pe=1;var a=ce;ce|=4,Ih.current=null,GC(e,n),Aw(n,e),wC(bf),fu=!!wf,bf=wf=null,e.current=n,QC(n),TT(),ce=a,pe=o,sn.transition=s}else e.current=n;if(Sl&&(Sl=!1,Ir=e,Pu=i),s=e.pendingLanes,s===0&&(qr=null),PT(n.stateNode),Rt(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(_u)throw _u=!1,e=Bf,Bf=null,e;return Pu&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Vf?ea++:(ea=0,Vf=e):ea=0,ai(),null}function zs(){if(Ir!==null){var e=g1(Pu),t=sn.transition,n=pe;try{if(sn.transition=null,pe=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,Pu=0,ce&6)throw Error(N(331));var i=ce;for(ce|=4,z=e.current;z!==null;){var s=z,o=s.child;if(z.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var d=z;switch(d.tag){case 0:case 11:case 15:Zo(8,d,s)}var c=d.child;if(c!==null)c.return=d,z=c;else for(;z!==null;){d=z;var f=d.sibling,p=d.return;if(_w(d),d===u){z=null;break}if(f!==null){f.return=p,z=f;break}z=p}}}var h=s.alternate;if(h!==null){var v=h.child;if(v!==null){h.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}z=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,z=o;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Zo(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,z=m;break e}z=s.return}}var x=e.current;for(z=x;z!==null;){o=z;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,z=w;else e:for(o=x;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ic(9,a)}}catch(T){De(a,a.return,T)}if(a===o){z=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,z=E;break e}z=a.return}}if(ce=i,ai(),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(Yu,e)}catch{}r=!0}return r}finally{pe=n,sn.transition=t}}return!1}function kv(e,t,n){t=ao(n,t),t=gw(e,t,1),e=Wr(e,t,1),t=yt(),e!==null&&(Wa(e,1,t),Rt(e,t))}function De(e,t,n){if(e.tag===3)kv(e,e,n);else for(;t!==null;){if(t.tag===3){kv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=ao(n,e),e=vw(t,e,1),t=Wr(t,e,1),e=yt(),t!==null&&(Wa(t,1,e),Rt(t,e));break}}t=t.return}}function t2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&n,Ge===e&&(it&n)===n&&(Ve===4||Ve===3&&(it&130023424)===it&&500>Me()-zh?Li(e,0):$h|=n),Rt(e,t)}function Lw(e,t){t===0&&(e.mode&1?(t=fl,fl<<=1,!(fl&130023424)&&(fl=4194304)):t=1);var n=yt();e=cr(e,t),e!==null&&(Wa(e,t,n),Rt(e,n))}function n2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Lw(e,n)}function r2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Lw(e,n)}var Iw;Iw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,HC(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,Ee&&t.flags&1048576&&V1(t,xu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var i=ro(t,pt.current);$s(t,n),i=Dh(null,t,r,e,i,n);var s=Fh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,At(r)?(s=!0,vu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ph(t),i.updater=rc,t.stateNode=i,i._reactInternals=t,Af(t,r,e,n),t=Df(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&bh(t),gt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=s2(r),e=gn(r,e),i){case 0:t=Of(null,t,r,e,n);break e;case 1:t=pv(null,t,r,e,n);break e;case 11:t=dv(null,t,r,e,n);break e;case 14:t=fv(null,t,r,gn(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),Of(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),pv(e,t,r,i,n);case 3:e:{if(bw(t),e===null)throw Error(N(387));r=t.pendingProps,s=t.memoizedState,i=s.element,G1(e,t),Su(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(N(423)),t),t=hv(e,t,r,n,i);break e}else if(r!==i){i=ao(Error(N(424)),t),t=hv(e,t,r,n,i);break e}else for(It=Hr(t.stateNode.containerInfo.firstChild),Bt=t,Ee=!0,wn=null,n=q1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(io(),r===i){t=dr(e,t,n);break e}gt(e,t,r,n)}t=t.child}return t;case 5:return Q1(t),e===null&&_f(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Sf(r,i)?o=null:s!==null&&Sf(r,s)&&(t.flags|=32),ww(e,t),gt(e,t,o,n),t.child;case 6:return e===null&&_f(t),null;case 13:return Sw(e,t,n);case 4:return jh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(t,null,r,n):gt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),dv(e,t,r,i,n);case 7:return gt(e,t,t.pendingProps,n),t.child;case 8:return gt(e,t,t.pendingProps.children,n),t.child;case 12:return gt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,xe(wu,r._currentValue),r._currentValue=o,s!==null)if(En(s.value,o)){if(s.children===i.children&&!jt.current){t=dr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=or(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Pf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Pf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$s(t,n),i=an(i),r=r(i),t.flags|=1,gt(e,t,r,n),t.child;case 14:return r=t.type,i=gn(r,t.pendingProps),i=gn(r.type,i),fv(e,t,r,i,n);case 15:return yw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gn(r,i),Wl(e,t),t.tag=1,At(r)?(e=!0,vu(t)):e=!1,$s(t,n),mw(t,r,i),Af(t,r,i,n),Df(null,t,r,!0,e,n);case 19:return kw(e,t,n);case 22:return xw(e,t,n)}throw Error(N(156,t.tag))};function $w(e,t){return f1(e,t)}function i2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,n,r){return new i2(e,t,n,r)}function Hh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function s2(e){if(typeof e=="function")return Hh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uh)return 11;if(e===ch)return 14}return 2}function Gr(e,t){var n=e.alternate;return n===null?(n=nn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Hh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ys:return Ii(n.children,i,s,t);case lh:o=8,i|=8;break;case Jd:return e=nn(12,n,t,i|2),e.elementType=Jd,e.lanes=s,e;case ef:return e=nn(13,n,t,i),e.elementType=ef,e.lanes=s,e;case tf:return e=nn(19,n,t,i),e.elementType=tf,e.lanes=s,e;case Qx:return oc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Kx:o=10;break e;case Gx:o=9;break e;case uh:o=11;break e;case ch:o=14;break e;case kr:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=nn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ii(e,t,n,r){return e=nn(7,e,r,t),e.lanes=n,e}function oc(e,t,n,r){return e=nn(22,e,r,t),e.elementType=Qx,e.lanes=n,e.stateNode={isHidden:!1},e}function gd(e,t,n){return e=nn(6,e,null,t),e.lanes=n,e}function vd(e,t,n){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o2(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=Xc(0),this.expirationTimes=Xc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Wh(e,t,n,r,i,s,o,a,l){return e=new o2(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=nn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ph(s),e}function a2(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 zw(e){if(!e)return ti;e=e._reactInternals;e:{if(Zi(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(At(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(At(n))return z1(e,n,t)}return t}function Bw(e,t,n,r,i,s,o,a,l){return e=Wh(n,r,!0,e,i,s,o,a,l),e.context=zw(null),n=e.current,r=yt(),i=Kr(n),s=or(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Wa(e,i,r),Rt(e,r),e}function ac(e,t,n,r){var i=t.current,s=yt(),o=Kr(i);return n=zw(n),t.context===null?t.context=n:t.pendingContext=n,t=or(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(kn(e,i,o,s),Vl(e,i,o)),o}function Au(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 Ev(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function qh(e,t){Ev(e,t),(e=e.alternate)&&Ev(e,t)}function l2(){return null}var Vw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Kh(e){this._internalRoot=e}lc.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));ac(e,t,null,null)};lc.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qi(function(){ac(null,e,null,null)}),t[ur]=null}};function lc(e){this._internalRoot=e}lc.prototype.unstable_scheduleHydration=function(e){if(e){var t=x1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cr.length&&t!==0&&t<Cr[n].priority;n++);Cr.splice(n,0,e),n===0&&b1(e)}};function Gh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function uc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Tv(){}function u2(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Au(o);s.call(u)}}var o=Bw(t,r,e,0,null,!1,!1,"",Tv);return e._reactRootContainer=o,e[ur]=o.current,ga(e.nodeType===8?e.parentNode:e),qi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Au(l);a.call(u)}}var l=Wh(e,0,!1,null,null,!1,!1,"",Tv);return e._reactRootContainer=l,e[ur]=l.current,ga(e.nodeType===8?e.parentNode:e),qi(function(){ac(t,l,n,r)}),l}function cc(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=Au(o);a.call(l)}}ac(t,o,e,i)}else o=u2(n,t,e,i,r);return Au(o)}v1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=zo(t.pendingLanes);n!==0&&(ph(t,n|1),Rt(t,Me()),!(ce&6)&&(lo=Me()+500,ai()))}break;case 13:qi(function(){var r=cr(e,1);if(r!==null){var i=yt();kn(r,e,1,i)}}),qh(e,1)}};hh=function(e){if(e.tag===13){var t=cr(e,134217728);if(t!==null){var n=yt();kn(t,e,134217728,n)}qh(e,134217728)}};y1=function(e){if(e.tag===13){var t=Kr(e),n=cr(e,t);if(n!==null){var r=yt();kn(n,e,t,r)}qh(e,t)}};x1=function(){return pe};w1=function(e,t){var n=pe;try{return pe=e,t()}finally{pe=n}};ff=function(e,t,n){switch(t){case"input":if(sf(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=ec(r);if(!i)throw Error(N(90));Xx(r),sf(r,i)}}}break;case"textarea":Jx(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};o1=Bh;a1=qi;var c2={usingClientEntryPoint:!1,Events:[Ka,Ss,ec,i1,s1,Bh]},Fo={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d2={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:pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=c1(e),e===null?null:e.stateNode},findFiberByHostInstance:Fo.findFiberByHostInstance||l2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kl.isDisabled&&kl.supportsFiber)try{Yu=kl.inject(d2),In=kl}catch{}}Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=c2;Ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gh(t))throw Error(N(200));return a2(e,t,null,n)};Ut.createRoot=function(e,t){if(!Gh(e))throw Error(N(299));var n=!1,r="",i=Vw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Wh(e,1,!1,null,null,n,!1,r,i),e[ur]=t.current,ga(e.nodeType===8?e.parentNode:e),new Kh(t)};Ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=c1(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e){return qi(e)};Ut.hydrate=function(e,t,n){if(!uc(t))throw Error(N(200));return cc(null,e,t,!0,n)};Ut.hydrateRoot=function(e,t,n){if(!Gh(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Vw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Bw(t,null,e,1,n??null,i,!1,s,o),e[ur]=t.current,ga(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 lc(t)};Ut.render=function(e,t,n){if(!uc(t))throw Error(N(200));return cc(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!uc(e))throw Error(N(40));return e._reactRootContainer?(qi(function(){cc(null,null,e,!1,function(){e._reactRootContainer=null,e[ur]=null})}),!0):!1};Ut.unstable_batchedUpdates=Bh;Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!uc(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return cc(e,t,n,!1,r)};Ut.version="18.3.1-next-f1338f8080-20240426";function Uw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uw)}catch(e){console.error(e)}}Uw(),Ux.exports=Ut;var Hw=Ux.exports;const f2=Yi(Hw);var Ww,Cv=Hw;Ww=Cv.createRoot,Cv.hydrateRoot;const p2="@alfatech/livechat",h2="v2025.07.05.1",m2="module",g2="https://api-live.alfatek.dev",v2="wss://api-live.alfatek.dev",y2=["dist","README.md"],x2="dist/widget.js",w2={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},b2={"@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"},S2={"@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"},qw={name:p2,private:!1,version:h2,type:m2,apiURL:g2,wsURL:v2,files:y2,main:x2,scripts:w2,dependencies:b2,devDependencies:S2,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},k2=qw.apiURL,E2=qw.wsURL,T2=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],C2=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],_2={429:T2,404:C2};async function yo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${k2}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=_2[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 dc=e=>[200,201,204].includes(e),P2=(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 xo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ki=typeof window>"u"||"Deno"in globalThis;function Zt(){}function j2(e,t){return typeof e=="function"?e(t):e}function Wf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Kw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bs(e,t){return typeof e=="function"?e(t):e}function bn(e,t){return typeof e=="function"?e(t):e}function _v(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Qh(o,t.options))return!1}else if(!Ta(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 Pv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gi(t.options.mutationKey)!==Gi(s))return!1}else if(!Ta(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Qh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gi)(e)}function Gi(e){return JSON.stringify(e,(t,n)=>qf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ta(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ta(e[n],t[n])):!1}function Gw(e,t){if(e===t)return e;const n=jv(e)&&jv(t);if(n||qf(e)&&qf(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const d=n?u:s[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=Gw(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Ru(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 jv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qf(e){if(!Av(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Av(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Av(e){return Object.prototype.toString.call(e)==="[object Object]"}function A2(e){return new Promise(t=>{setTimeout(t,e)})}function Kf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Gw(e,t):t}function R2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function O2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Yh=Symbol();function Qw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Yh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Us,Sx,D2=(Sx=class extends xo{constructor(){super();W(this,Ai);W(this,Pr);W(this,Us);$(this,Us,t=>{if(!Ki&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Us))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),$(this,Pr,void 0))}setEventListener(t){var n;$(this,Us,t),(n=S(this,Pr))==null||n.call(this),$(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&($(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Us=new WeakMap,Sx),Xh=new D2,Hs,jr,Ws,kx,F2=(kx=class extends xo{constructor(){super();W(this,Hs,!0);W(this,jr);W(this,Ws);$(this,Ws,t=>{if(!Ki&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,jr)||this.setEventListener(S(this,Ws))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),$(this,jr,void 0))}setEventListener(t){var n;$(this,Ws,t),(n=S(this,jr))==null||n.call(this),$(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Hs)!==t&&($(this,Hs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Hs)}},Hs=new WeakMap,jr=new WeakMap,Ws=new WeakMap,kx),Ou=new F2;function Gf(){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 N2(e){return Math.min(1e3*2**e,3e4)}function Yw(e){return(e??"online")==="online"?Ou.isOnline():!0}var Xw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function yd(e){return e instanceof Xw}function Zw(e){let t=!1,n=0,r=!1,i;const s=Gf(),o=v=>{var b;r||(f(new Xw(v)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Xh.isFocused()&&(e.networkMode==="always"||Ou.isOnline())&&e.canRun(),d=()=>Yw(e.networkMode)&&e.canRun(),c=v=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,v),i==null||i(),s.resolve(v))},f=v=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,v),i==null||i(),s.reject(v))},p=()=>new Promise(v=>{var b;i=m=>{(r||u())&&v(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),h=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(m){v=Promise.reject(m)}Promise.resolve(v).then(c).catch(m=>{var C;if(r)return;const x=e.retry??(Ki?0:3),w=e.retryDelay??N2,E=typeof w=="function"?w(n,m):w,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,m);if(t||!T){f(m);return}n++,(C=e.onFail)==null||C.call(e,n,m),A2(E).then(()=>u()?void 0:p()).then(()=>{t?f(m):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function M2(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Be=M2(),Ri,Ex,Jw=(Ex=class{constructor(){W(this,Ri)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wf(this.gcTime)&&$(this,Ri,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ki?1/0:5*60*1e3))}clearGcTimeout(){S(this,Ri)&&(clearTimeout(S(this,Ri)),$(this,Ri,void 0))}},Ri=new WeakMap,Ex),qs,Ks,Xt,ut,za,Oi,vn,Zn,Tx,L2=(Tx=class extends Jw{constructor(t){super();W(this,vn);W(this,qs);W(this,Ks);W(this,Xt);W(this,ut);W(this,za);W(this,Oi);$(this,Oi,!1),$(this,za,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,Xt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,qs,I2(this.options)),this.state=t.state??S(this,qs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,ut))==null?void 0:t.promise}setOptions(t){this.options={...S(this,za),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Xt).remove(this)}setData(t,n){const r=Kf(this.state.data,t,this.options);return ie(this,vn,Zn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ie(this,vn,Zn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,ut))==null?void 0:r.promise;return(i=S(this,ut))==null||i.cancel(t),n?n.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,qs))}isActive(){return this.observers.some(t=>bn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yh||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||!Kw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Xt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,ut)&&(S(this,Oi)?S(this,ut).cancel({revert:!0}):S(this,ut).cancelRetry()),this.scheduleGc()),S(this,Xt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ie(this,vn,Zn).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,ut))return S(this,ut).continueRetry(),S(this,ut).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>($(this,Oi,!0),r.signal)})},s=()=>{const c=Qw(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),$(this,Oi,!1),this.options.persister?this.options.persister(c,f,this):c(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),$(this,Ks,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&ie(this,vn,Zn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,p,h,v;yd(c)&&c.silent||ie(this,vn,Zn).call(this,{type:"error",error:c}),yd(c)||((p=(f=S(this,Xt).config).onError)==null||p.call(f,c,this),(v=(h=S(this,Xt).config).onSettled)==null||v.call(h,this.state.data,c,this)),this.scheduleGc()};return $(this,ut,Zw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,p,h,v;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(p=(f=S(this,Xt).config).onSuccess)==null||p.call(f,c,this),(v=(h=S(this,Xt).config).onSettled)==null||v.call(h,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,f)=>{ie(this,vn,Zn).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{ie(this,vn,Zn).call(this,{type:"pause"})},onContinue:()=>{ie(this,vn,Zn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,ut).start()}},qs=new WeakMap,Ks=new WeakMap,Xt=new WeakMap,ut=new WeakMap,za=new WeakMap,Oi=new WeakMap,vn=new WeakSet,Zn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...eb(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 yd(i)&&i.revert&&S(this,Ks)?{...S(this,Ks),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Be.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Xt).notify({query:this,type:"updated",action:t})})},Tx);function eb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Dn,Cx,$2=(Cx=class extends xo{constructor(t={}){super();W(this,Dn);this.config=t,$(this,Dn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Qh(i,n);let o=this.get(s);return o||(o=new L2({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Dn).has(t.queryHash)||(S(this,Dn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Dn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Dn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Dn).get(t)}getAll(){return[...S(this,Dn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>_v(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>_v(t,r)):n}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Dn=new WeakMap,Cx),Fn,ht,Di,Nn,br,_x,z2=(_x=class extends Jw{constructor(t){super();W(this,Nn);W(this,Fn);W(this,ht);W(this,Di);this.mutationId=t.mutationId,$(this,ht,t.mutationCache),$(this,Fn,[]),this.state=t.state||tb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Fn).includes(t)||(S(this,Fn).push(t),this.clearGcTimeout(),S(this,ht).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Fn,S(this,Fn).filter(n=>n!==t)),this.scheduleGc(),S(this,ht).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Fn).length||(this.state.status==="pending"?this.scheduleGc():S(this,ht).remove(this))}continue(){var t;return((t=S(this,Di))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,d,c,f,p,h,v,b,m,x,w,E,T,C,_;$(this,Di,Zw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,j)=>{ie(this,Nn,br).call(this,{type:"failed",failureCount:k,error:j})},onPause:()=>{ie(this,Nn,br).call(this,{type:"pause"})},onContinue:()=>{ie(this,Nn,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,ht).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Di).canStart();try{if(!n){ie(this,Nn,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,ht).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&ie(this,Nn,br).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const k=await S(this,Di).start();return await((u=(l=S(this,ht).config).onSuccess)==null?void 0:u.call(l,k,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,k,t,this.state.context)),await((p=(f=S(this,ht).config).onSettled)==null?void 0:p.call(f,k,null,this.state.variables,this.state.context,this)),await((v=(h=this.options).onSettled)==null?void 0:v.call(h,k,null,t,this.state.context)),ie(this,Nn,br).call(this,{type:"success",data:k}),k}catch(k){try{throw await((m=(b=S(this,ht).config).onError)==null?void 0:m.call(b,k,t,this.state.context,this)),await((w=(x=this.options).onError)==null?void 0:w.call(x,k,t,this.state.context)),await((T=(E=S(this,ht).config).onSettled)==null?void 0:T.call(E,void 0,k,this.state.variables,this.state.context,this)),await((_=(C=this.options).onSettled)==null?void 0:_.call(C,void 0,k,t,this.state.context)),k}finally{ie(this,Nn,br).call(this,{type:"error",error:k})}}finally{S(this,ht).runNext(this)}}},Fn=new WeakMap,ht=new WeakMap,Di=new WeakMap,Nn=new WeakSet,br=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Be.batch(()=>{S(this,Fn).forEach(r=>{r.onMutationUpdate(t)}),S(this,ht).notify({mutation:this,type:"updated",action:t})})},_x);function tb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mt,Ba,Px,B2=(Px=class extends xo{constructor(t={}){super();W(this,Mt);W(this,Ba);this.config=t,$(this,Mt,new Map),$(this,Ba,Date.now())}build(t,n,r){const i=new z2({mutationCache:this,mutationId:++ol(this,Ba)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=El(t),r=S(this,Mt).get(n)??[];r.push(t),S(this,Mt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=El(t);if(S(this,Mt).has(n)){const i=(r=S(this,Mt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,Mt).delete(n):S(this,Mt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,Mt).get(El(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,Mt).get(El(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,Mt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pv(n,r))}findAll(t={}){return this.getAll().filter(n=>Pv(t,n))}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Be.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zt))))}},Mt=new WeakMap,Ba=new WeakMap,Px);function El(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Rv(e){return{onFetch:(t,n)=>{var d,c,f,p,h;const r=t.options,i=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},m=Qw(t.options,t.fetchOptions),x=async(w,E,T)=>{if(v)return Promise.reject();if(E==null&&w.pages.length)return Promise.resolve(w);const C={queryKey:t.queryKey,pageParam:E,direction:T?"backward":"forward",meta:t.options.meta};b(C);const _=await m(C),{maxPages:k}=t.options,j=T?O2:R2;return{pages:j(w.pages,_,k),pageParams:j(w.pageParams,E,k)}};if(i&&s.length){const w=i==="backward",E=w?V2:Ov,T={pages:s,pageParams:o},C=E(r,T);a=await x(T,C,w)}else{const w=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:Ov(r,a);if(l>0&&E==null)break;a=await x(a,E),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ov(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 V2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Re,Ar,Rr,Gs,Qs,Or,Ys,Xs,jx,U2=(jx=class{constructor(e={}){W(this,Re);W(this,Ar);W(this,Rr);W(this,Gs);W(this,Qs);W(this,Or);W(this,Ys);W(this,Xs);$(this,Re,e.queryCache||new $2),$(this,Ar,e.mutationCache||new B2),$(this,Rr,e.defaultOptions||{}),$(this,Gs,new Map),$(this,Qs,new Map),$(this,Or,0)}mount(){ol(this,Or)._++,S(this,Or)===1&&($(this,Ys,Xh.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onFocus())})),$(this,Xs,Ou.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onOnline())})))}unmount(){var e,t;ol(this,Or)._--,S(this,Or)===0&&((e=S(this,Ys))==null||e.call(this),$(this,Ys,void 0),(t=S(this,Xs))==null||t.call(this),$(this,Xs,void 0))}isFetching(e){return S(this,Re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ar).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=S(this,Re).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Bs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,Re).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=S(this,Re).get(r.queryHash),s=i==null?void 0:i.state.data,o=j2(t,s);if(o!==void 0)return S(this,Re).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Be.batch(()=>S(this,Re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Re);Be.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Re),r={type:"active",...e};return Be.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Be.batch(()=>S(this,Re).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Zt).catch(Zt)}invalidateQueries(e,t={}){return Be.batch(()=>{if(S(this,Re).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Be.batch(()=>S(this,Re).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Zt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Re).build(this,t);return n.isStaleByTime(Bs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zt).catch(Zt)}fetchInfiniteQuery(e){return e.behavior=Rv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zt).catch(Zt)}ensureInfiniteQueryData(e){return e.behavior=Rv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ou.isOnline()?S(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Re)}getMutationCache(){return S(this,Ar)}getDefaultOptions(){return S(this,Rr)}setDefaultOptions(e){$(this,Rr,e)}setQueryDefaults(e,t){S(this,Gs).set(Gi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Gs).values()],n={};return t.forEach(r=>{Ta(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Qs).set(Gi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Qs).values()];let n={};return t.forEach(r=>{Ta(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=Qh(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===Yh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Re).clear(),S(this,Ar).clear()}},Re=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Gs=new WeakMap,Qs=new WeakMap,Or=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,jx),kt,ae,Va,mt,Fi,Zs,Dr,Mn,Ua,Js,eo,Ni,Mi,Fr,to,de,Vo,Qf,Yf,Xf,Zf,Jf,ep,tp,nb,Ax,H2=(Ax=class extends xo{constructor(t,n){super();W(this,de);W(this,kt);W(this,ae);W(this,Va);W(this,mt);W(this,Fi);W(this,Zs);W(this,Dr);W(this,Mn);W(this,Ua);W(this,Js);W(this,eo);W(this,Ni);W(this,Mi);W(this,Fr);W(this,to,new Set);this.options=n,$(this,kt,t),$(this,Mn,null),$(this,Dr,Gf()),this.options.experimental_prefetchInRender||S(this,Dr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,ae).addObserver(this),Dv(S(this,ae),this.options)?ie(this,de,Vo).call(this):this.updateResult(),ie(this,de,Zf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return np(S(this,ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return np(S(this,ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ie(this,de,Jf).call(this),ie(this,de,ep).call(this),S(this,ae).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,ae);if(this.options=S(this,kt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bn(this.options.enabled,S(this,ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ie(this,de,tp).call(this),S(this,ae).setOptions(this.options),r._defaulted&&!Ru(this.options,r)&&S(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ae),observer:this});const s=this.hasListeners();s&&Fv(S(this,ae),i,this.options,r)&&ie(this,de,Vo).call(this),this.updateResult(n),s&&(S(this,ae)!==i||bn(this.options.enabled,S(this,ae))!==bn(r.enabled,S(this,ae))||Bs(this.options.staleTime,S(this,ae))!==Bs(r.staleTime,S(this,ae)))&&ie(this,de,Qf).call(this);const o=ie(this,de,Yf).call(this);s&&(S(this,ae)!==i||bn(this.options.enabled,S(this,ae))!==bn(r.enabled,S(this,ae))||o!==S(this,Fr))&&ie(this,de,Xf).call(this,o)}getOptimisticResult(t){const n=S(this,kt).getQueryCache().build(S(this,kt),t),r=this.createResult(n,t);return q2(this,r)&&($(this,mt,r),$(this,Zs,this.options),$(this,Fi,S(this,ae).state)),r}getCurrentResult(){return S(this,mt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){S(this,to).add(t)}getCurrentQuery(){return S(this,ae)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,kt).defaultQueryOptions(t),r=S(this,kt).getQueryCache().build(S(this,kt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ie(this,de,Vo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,mt)))}createResult(t,n){var k;const r=S(this,ae),i=this.options,s=S(this,mt),o=S(this,Fi),a=S(this,Zs),u=t!==r?t.state:S(this,Va),{state:d}=t;let c={...d},f=!1,p;if(n._optimisticResults){const j=this.hasListeners(),R=!j&&Dv(t,n),M=j&&Fv(t,r,n,i);(R||M)&&(c={...c,...eb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:h,errorUpdatedAt:v,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===S(this,Ua))p=S(this,Js);else try{$(this,Ua,n.select),p=n.select(c.data),p=Kf(s==null?void 0:s.data,p,n),$(this,Js,p),$(this,Mn,null)}catch(j){$(this,Mn,j)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((k=S(this,eo))==null?void 0:k.state.data,S(this,eo)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),$(this,Mn,null)}catch(R){$(this,Mn,R)}j!==void 0&&(b="success",p=Kf(s==null?void 0:s.data,j,n),f=!0)}S(this,Mn)&&(h=S(this,Mn),p=S(this,Js),v=Date.now(),b="error");const m=c.fetchStatus==="fetching",x=b==="pending",w=b==="error",E=x&&m,T=p!==void 0,_={status:b,fetchStatus:c.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:v,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!x,isLoadingError:w&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&T,isStale:Zh(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const j=G=>{_.status==="error"?G.reject(_.error):_.data!==void 0&&G.resolve(_.data)},R=()=>{const G=$(this,Dr,_.promise=Gf());j(G)},M=S(this,Dr);switch(M.status){case"pending":t.queryHash===r.queryHash&&j(M);break;case"fulfilled":(_.status==="error"||_.data!==M.value)&&R();break;case"rejected":(_.status!=="error"||_.error!==M.reason)&&R();break}}return _}updateResult(t){const n=S(this,mt),r=this.createResult(S(this,ae),this.options);if($(this,Fi,S(this,ae).state),$(this,Zs,this.options),S(this,Fi).data!==void 0&&$(this,eo,S(this,ae)),Ru(r,n))return;$(this,mt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,to).size)return!0;const l=new Set(a??S(this,to));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,mt)).some(u=>{const d=u;return S(this,mt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),ie(this,de,nb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ie(this,de,Zf).call(this)}},kt=new WeakMap,ae=new WeakMap,Va=new WeakMap,mt=new WeakMap,Fi=new WeakMap,Zs=new WeakMap,Dr=new WeakMap,Mn=new WeakMap,Ua=new WeakMap,Js=new WeakMap,eo=new WeakMap,Ni=new WeakMap,Mi=new WeakMap,Fr=new WeakMap,to=new WeakMap,de=new WeakSet,Vo=function(t){ie(this,de,tp).call(this);let n=S(this,ae).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zt)),n},Qf=function(){ie(this,de,Jf).call(this);const t=Bs(this.options.staleTime,S(this,ae));if(Ki||S(this,mt).isStale||!Wf(t))return;const r=Kw(S(this,mt).dataUpdatedAt,t)+1;$(this,Ni,setTimeout(()=>{S(this,mt).isStale||this.updateResult()},r))},Yf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ae)):this.options.refetchInterval)??!1},Xf=function(t){ie(this,de,ep).call(this),$(this,Fr,t),!(Ki||bn(this.options.enabled,S(this,ae))===!1||!Wf(S(this,Fr))||S(this,Fr)===0)&&$(this,Mi,setInterval(()=>{(this.options.refetchIntervalInBackground||Xh.isFocused())&&ie(this,de,Vo).call(this)},S(this,Fr)))},Zf=function(){ie(this,de,Qf).call(this),ie(this,de,Xf).call(this,ie(this,de,Yf).call(this))},Jf=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),$(this,Ni,void 0))},ep=function(){S(this,Mi)&&(clearInterval(S(this,Mi)),$(this,Mi,void 0))},tp=function(){const t=S(this,kt).getQueryCache().build(S(this,kt),this.options);if(t===S(this,ae))return;const n=S(this,ae);$(this,ae,t),$(this,Va,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},nb=function(t){Be.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,mt))}),S(this,kt).getQueryCache().notify({query:S(this,ae),type:"observerResultsUpdated"})})},Ax);function W2(e,t){return bn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Dv(e,t){return W2(e,t)||e.state.data!==void 0&&np(e,t,t.refetchOnMount)}function np(e,t,n){if(bn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Zh(e,t)}return!1}function Fv(e,t,n,r){return(e!==t||bn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Zh(e,n)}function Zh(e,t){return bn(t.enabled,e)!==!1&&e.isStaleByTime(Bs(t.staleTime,e))}function q2(e,t){return!Ru(e.getCurrentResult(),t)}var Nr,Mr,Et,nr,ar,Ql,rp,Rx,K2=(Rx=class extends xo{constructor(t,n){super();W(this,ar);W(this,Nr);W(this,Mr);W(this,Et);W(this,nr);$(this,Nr,t),this.setOptions(n),this.bindMethods(),ie(this,ar,Ql).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=S(this,Nr).defaultMutationOptions(t),Ru(this.options,n)||S(this,Nr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Et),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Gi(n.mutationKey)!==Gi(this.options.mutationKey)?this.reset():((r=S(this,Et))==null?void 0:r.state.status)==="pending"&&S(this,Et).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,Et))==null||t.removeObserver(this)}onMutationUpdate(t){ie(this,ar,Ql).call(this),ie(this,ar,rp).call(this,t)}getCurrentResult(){return S(this,Mr)}reset(){var t;(t=S(this,Et))==null||t.removeObserver(this),$(this,Et,void 0),ie(this,ar,Ql).call(this),ie(this,ar,rp).call(this)}mutate(t,n){var r;return $(this,nr,n),(r=S(this,Et))==null||r.removeObserver(this),$(this,Et,S(this,Nr).getMutationCache().build(S(this,Nr),this.options)),S(this,Et).addObserver(this),S(this,Et).execute(t)}},Nr=new WeakMap,Mr=new WeakMap,Et=new WeakMap,nr=new WeakMap,ar=new WeakSet,Ql=function(){var n;const t=((n=S(this,Et))==null?void 0:n.state)??tb();$(this,Mr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},rp=function(t){Be.batch(()=>{var n,r,i,s,o,a,l,u;if(S(this,nr)&&this.hasListeners()){const d=S(this,Mr).variables,c=S(this,Mr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,nr)).onSuccess)==null||r.call(n,t.data,d,c),(s=(i=S(this,nr)).onSettled)==null||s.call(i,t.data,null,d,c)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,nr)).onError)==null||a.call(o,t.error,d,c),(u=(l=S(this,nr)).onSettled)==null||u.call(l,void 0,t.error,d,c))}this.listeners.forEach(d=>{d(S(this,Mr))})})},Rx),rb=g.createContext(void 0),ib=e=>{const t=g.useContext(rb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},G2=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(rb.Provider,{value:e,children:t})),sb=g.createContext(!1),Q2=()=>g.useContext(sb);sb.Provider;function Y2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var X2=g.createContext(Y2()),Z2=()=>g.useContext(X2);function ob(e,t){return typeof e=="function"?e(...t):!!e}function ip(){}var J2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},e_=e=>{g.useEffect(()=>{e.clearReset()},[e])},t_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&ob(n,[e.error,r]),n_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},r_=(e,t)=>e.isLoading&&e.isFetching&&!t,i_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Nv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function s_(e,t,n){var d,c,f,p,h;const r=ib(),i=Q2(),s=Z2(),o=r.defaultQueryOptions(e);(c=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||c.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",n_(o),J2(o,s),e_(s);const a=!r.getQueryCache().get(o.queryHash),[l]=g.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(g.useSyncExternalStore(g.useCallback(v=>{const b=i?ip:l.subscribe(Be.batchCalls(v));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),g.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),i_(o,u))throw Nv(o,l,s);if(t_({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,u),o.experimental_prefetchInRender&&!Ki&&r_(u,i)){const v=a?Nv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;v==null||v.catch(ip).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function o_(e,t){return s_(e,H2)}function Jh(e,t){const n=ib(),[r]=g.useState(()=>new K2(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const i=g.useSyncExternalStore(g.useCallback(o=>r.subscribe(Be.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=g.useCallback((o,a)=>{r.mutate(o,a).catch(ip)},[r]);if(i.error&&ob(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const a_=e=>o_({queryKey:["widgets",e],queryFn:()=>l_(e)}),l_=e=>yo(`widgets/with-link/${e}`);var Y=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(Y||{});function u_(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 hd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BC=typeof WeakMap=="function"?WeakMap:Map;function gw(e,t,n){n=or(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_u||(_u=!0,Bf=r),Rf(e,t)},n}function vw(e,t,n){n=or(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Rf(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function lv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new BC;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=t2.bind(null,e,t,n),t.then(e,e))}function uv(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 cv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=or(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var VC=pr.ReactCurrentOwner,Pt=!1;function gt(e,t,n,r){t.child=e===null?q1(t,null,n,r):so(t,e.child,n,r)}function dv(e,t,n,r,i){n=n.render;var s=t.ref;return $s(t,i),r=Dh(e,t,n,r,s,i),n=Fh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&n&&bh(t),t.flags|=1,gt(e,t,r,i),t.child)}function fv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Hh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,yw(e,t,s,r,i)):(e=Gl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ma,n(o,r)&&e.ref===t.ref)return dr(e,t,i)}return t.flags|=1,e=Gr(s,r),e.ref=t.ref,e.return=t,t.child=e}function yw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ma(s,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,dr(e,t,i)}return Of(e,t,n,r,i)}function xw(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(Ps,Lt),Lt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(Ps,Lt),Lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(Ps,Lt),Lt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(Ps,Lt),Lt|=r;return gt(e,t,i,n),t.child}function ww(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Of(e,t,n,r,i){var s=At(n)?Vi:pt.current;return s=ro(t,s),$s(t,i),n=Dh(e,t,n,r,s,i),r=Fh(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,dr(e,t,i)):(Ee&&r&&bh(t),t.flags|=1,gt(e,t,n,i),t.child)}function pv(e,t,n,r,i){if(At(n)){var s=!0;vu(t)}else s=!1;if($s(t,i),t.stateNode===null)Wl(e,t),mw(t,n,r),Af(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=ln(u):(u=At(n)?Vi:pt.current,u=ro(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&av(t,o,r,u),Er=!1;var f=t.memoizedState;o.state=f,Su(t,r,o,i),l=t.memoizedState,a!==r||f!==l||jt.current||Er?(typeof d=="function"&&(jf(t,n,d,r),l=t.memoizedState),(a=Er||ov(t,n,a,r,f,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,G1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:vn(t.type,a),o.props=u,c=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ln(l):(l=At(n)?Vi:pt.current,l=ro(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||f!==l)&&av(t,o,r,l),Er=!1,f=t.memoizedState,o.state=f,Su(t,r,o,i);var h=t.memoizedState;a!==c||f!==h||jt.current||Er?(typeof p=="function"&&(jf(t,n,p,r),h=t.memoizedState),(u=Er||ov(t,n,u,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Df(e,t,n,r,s,i)}function Df(e,t,n,r,i,s){ww(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Zg(t,n,!1),dr(e,t,s);r=t.stateNode,VC.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)):gt(e,t,a,s),t.memoizedState=r.state,i&&Zg(t,n,!0),t.child}function bw(e){var t=e.stateNode;t.pendingContext?Xg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Xg(e,t.context,!1),jh(e,t.containerInfo)}function hv(e,t,n,r,i){return io(),kh(i),t.flags|=256,gt(e,t,n,r),t.child}var Ff={dehydrated:null,treeContext:null,retryLane:0};function Nf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sw(e,t,n){var r=t.pendingProps,i=_e.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),xe(_e,i&1),e===null)return _f(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=oc(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=Nf(n),t.memoizedState=Ff,e):Lh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return UC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Gr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Gr(a,s):(s=Ii(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Nf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Ff,r}return s=e.child,e=s.sibling,r=Gr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Lh(e,t){return t=oc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wl(e,t,n,r){return r!==null&&kh(r),so(t,e.child,null,n),e=Lh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=hd(Error(N(422))),wl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=oc({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=Nf(o),t.memoizedState=Ff,s);if(!(t.mode&1))return wl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(N(419)),r=hd(s,r,void 0),wl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Pt||a){if(r=Ge,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,cr(e,i),En(r,e,i,-1))}return Uh(),r=hd(Error(N(421))),wl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=n2.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,It=Hr(i.nextSibling),Bt=t,Ee=!0,bn=null,e!==null&&(Jt[en++]=rr,Jt[en++]=ir,Jt[en++]=Ui,rr=e.id,ir=e.overflow,Ui=t),t=Lh(t,r.children),t.flags|=4096,t)}function mv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Pf(e.return,t,n)}function md(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 kw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(gt(e,t,r.children,n),r=_e.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mv(e,n,t);else if(e.tag===19)mv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xe(_e,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ku(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),md(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&&ku(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}md(t,!0,n,null,s);break;case"together":md(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function dr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=Gr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function HC(e,t,n){switch(t.tag){case 3:bw(t),io();break;case 5:Q1(t);break;case 1:At(t.type)&&vu(t);break;case 4:jh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;xe(wu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(_e,_e.current&1),t.flags|=128,null):n&t.child.childLanes?Sw(e,t,n):(xe(_e,_e.current&1),e=dr(e,t,n),e!==null?e.sibling:null);xe(_e,_e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return kw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),xe(_e,_e.current),r)break;return null;case 22:case 23:return t.lanes=0,xw(e,t,n)}return dr(e,t,n)}var Ew,Mf,Tw,Cw;Ew=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}};Mf=function(){};Tw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti(zn.current);var s=null;switch(n){case"input":i=rf(e,i),r=rf(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=af(e,i),r=af(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=mu)}uf(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(la.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(la.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&be("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Cw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Do(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WC(e,t,n){var r=t.pendingProps;switch(Sh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return At(t.type)&&gu(),lt(t),null;case 3:return r=t.stateNode,oo(),ke(jt),ke(pt),Rh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bn!==null&&(Hf(bn),bn=null))),Mf(e,t),lt(t),null;case 5:Ah(t);var i=Ti(wa.current);if(n=t.type,e!==null&&t.stateNode!=null)Tw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return lt(t),null}if(e=Ti(zn.current),yl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[In]=t,r[ya]=s,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(i=0;i<Bo.length;i++)be(Bo[i],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":Eg(r,s),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},be("invalid",r);break;case"textarea":Cg(r,s),be("invalid",r)}uf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",""+a]):la.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&be("scroll",r)}switch(n){case"input":ul(r),Tg(r,s,!0);break;case"textarea":ul(r),_g(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=mu)}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=e1(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[ya]=r,Ew(e,t,!1,!1),t.stateNode=e;e:{switch(o=cf(n,r),n){case"dialog":be("cancel",e),be("close",e),i=r;break;case"iframe":case"object":case"embed":be("load",e),i=r;break;case"video":case"audio":for(i=0;i<Bo.length;i++)be(Bo[i],e);i=r;break;case"source":be("error",e),i=r;break;case"img":case"image":case"link":be("error",e),be("load",e),i=r;break;case"details":be("toggle",e),i=r;break;case"input":Eg(e,r),i=rf(e,r),be("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),be("invalid",e);break;case"textarea":Cg(e,r),i=af(e,r),be("invalid",e);break;default:i=r}uf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?r1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&t1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ua(e,l):typeof l=="number"&&ua(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(la.hasOwnProperty(s)?l!=null&&s==="onScroll"&&be("scroll",e):l!=null&&ah(e,s,l,o))}switch(n){case"input":ul(e),Tg(e,r,!1);break;case"textarea":ul(e),_g(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=mu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return lt(t),null;case 6:if(e&&t.stateNode!=null)Cw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Ti(wa.current),Ti(zn.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[In]=t,(s=r.nodeValue!==n)&&(e=Bt,e!==null))switch(e.tag){case 3:vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[In]=t,t.stateNode=r}return lt(t),null;case 13:if(ke(_e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&It!==null&&t.mode&1&&!(t.flags&128))H1(),io(),t.flags|=98560,s=!1;else if(s=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(N(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(N(317));s[In]=t}else io(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;lt(t),s=!1}else bn!==null&&(Hf(bn),bn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||_e.current&1?Ve===0&&(Ve=3):Uh())),t.updateQueue!==null&&(t.flags|=4),lt(t),null);case 4:return oo(),Mf(e,t),e===null&&ga(t.stateNode.containerInfo),lt(t),null;case 10:return Ch(t.type._context),lt(t),null;case 17:return At(t.type)&&gu(),lt(t),null;case 19:if(ke(_e),s=t.memoizedState,s===null)return lt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Do(s,!1);else{if(Ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ku(e),o!==null){for(t.flags|=128,Do(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(_e,_e.current&1|2),t.child}e=e.sibling}s.tail!==null&&Me()>lo&&(t.flags|=128,r=!0,Do(s,!1),t.lanes=4194304)}else{if(!r)if(e=ku(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Do(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return lt(t),null}else 2*Me()-s.renderingStartTime>lo&&n!==1073741824&&(t.flags|=128,r=!0,Do(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Me(),t.sibling=null,n=_e.current,xe(_e,r?n&1|2:n&1),t):(lt(t),null);case 22:case 23:return Vh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Lt&1073741824&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function qC(e,t){switch(Sh(t),t.tag){case 1:return At(t.type)&&gu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oo(),ke(jt),ke(pt),Rh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ah(t),null;case 13:if(ke(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(_e),null;case 4:return oo(),null;case 10:return Ch(t.type._context),null;case 22:case 23:return Vh(),null;case 24:return null;default:return null}}var bl=!1,dt=!1,KC=typeof WeakSet=="function"?WeakSet:Set,z=null;function _s(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function Lf(e,t,n){try{n()}catch(r){De(e,t,r)}}var gv=!1;function GC(e,t){if(wf=fu,e=R1(),wh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var p;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)f=c,c=p;for(;;){if(c===e)break t;if(f===n&&++u===i&&(a=o),f===s&&++d===r&&(l=o),(p=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(bf={focusedElem:e,selectionRange:n},fu=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,b=h.memoizedState,m=t.stateNode,x=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:vn(t.type,v),b);m.__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(N(163))}}catch(E){De(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return h=gv,gv=!1,h}function Zo(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&&Lf(t,n,s)}i=i.next}while(i!==r)}}function ic(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 If(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 _w(e){var t=e.alternate;t!==null&&(e.alternate=null,_w(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[In],delete t[ya],delete t[Ef],delete t[AC],delete t[RC])),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 Pw(e){return e.tag===5||e.tag===3||e.tag===4}function vv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pw(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 $f(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=mu));else if(r!==4&&(e=e.child,e!==null))for($f(e,t,n),e=e.sibling;e!==null;)$f(e,t,n),e=e.sibling}function zf(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(zf(e,t,n),e=e.sibling;e!==null;)zf(e,t,n),e=e.sibling}var tt=null,xn=!1;function wr(e,t,n){for(n=n.child;n!==null;)jw(e,t,n),n=n.sibling}function jw(e,t,n){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(Yu,n)}catch{}switch(n.tag){case 5:dt||_s(n,t);case 6:var r=tt,i=xn;tt=null,wr(e,t,n),tt=r,xn=i,tt!==null&&(xn?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(xn?(e=tt,n=n.stateNode,e.nodeType===8?ld(e.parentNode,n):e.nodeType===1&&ld(e,n),pa(e)):ld(tt,n.stateNode));break;case 4:r=tt,i=xn,tt=n.stateNode.containerInfo,xn=!0,wr(e,t,n),tt=r,xn=i;break;case 0:case 11:case 14:case 15:if(!dt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Lf(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!dt&&(_s(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(dt=(r=dt)||n.memoizedState!==null,wr(e,t,n),dt=r):wr(e,t,n);break;default:wr(e,t,n)}}function yv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KC),t.forEach(function(r){var i=r2.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:tt=a.stateNode,xn=!1;break e;case 3:tt=a.stateNode.containerInfo,xn=!0;break e;case 4:tt=a.stateNode.containerInfo,xn=!0;break e}a=a.return}if(tt===null)throw Error(N(160));jw(s,o,i),tt=null,xn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){De(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Aw(t,e),t=t.sibling}function Aw(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{Zo(3,e,e.return),ic(3,e)}catch(v){De(e,e.return,v)}try{Zo(5,e,e.return)}catch(v){De(e,e.return,v)}}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{ua(i,"")}catch(v){De(e,e.return,v)}}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&&Zx(i,s),cf(a,o);var u=cf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],c=l[o+1];d==="style"?r1(i,c):d==="dangerouslySetInnerHTML"?t1(i,c):d==="children"?ua(i,c):ah(i,d,c,u)}switch(a){case"input":sf(i,s);break;case"textarea":Jx(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ns(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[ya]=s}catch(v){De(e,e.return,v)}}break;case 6:if(hn(t,e),jn(e),r&4){if(e.stateNode===null)throw Error(N(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(v){De(e,e.return,v)}}break;case 3:if(hn(t,e),jn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pa(t.containerInfo)}catch(v){De(e,e.return,v)}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||(zh=Me())),r&4&&yv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(dt=(u=dt)||d,hn(t,e),dt=u):hn(t,e),jn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(z=e,d=e.child;d!==null;){for(c=z=d;z!==null;){switch(f=z,p=f.child,f.tag){case 0:case 11:case 14:case 15:Zo(4,f,f.return);break;case 1:_s(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(v){De(r,n,v)}}break;case 5:_s(f,f.return);break;case 22:if(f.memoizedState!==null){wv(c);continue}}p!==null?(p.return=f,z=p):wv(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=n1("display",o))}catch(v){De(e,e.return,v)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(v){De(e,e.return,v)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:hn(t,e),jn(e),r&4&&yv(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(Pw(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ua(i,""),r.flags&=-33);var s=vv(e);zf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=vv(e);$f(e,a,o);break;default:throw Error(N(161))}}catch(l){De(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QC(e,t,n){z=e,Rw(e)}function Rw(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var i=z,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||bl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||dt;a=bl;var u=dt;if(bl=o,(dt=l)&&!u)for(z=i;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?bv(i):l!==null?(l.return=o,z=l):bv(i);for(;s!==null;)z=s,Rw(s),s=s.sibling;z=i,bl=a,dt=u}xv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,z=s):xv(e)}}function xv(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:dt||ic(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!dt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&rv(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}rv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&pa(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}dt||t.flags&512&&If(t)}catch(f){De(t,t.return,f)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function wv(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function bv(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ic(4,t)}catch(l){De(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){De(t,i,l)}}var s=t.return;try{If(t)}catch(l){De(t,s,l)}break;case 5:var o=t.return;try{If(t)}catch(l){De(t,o,l)}}}catch(l){De(t,t.return,l)}if(t===e){z=null;break}var a=t.sibling;if(a!==null){a.return=t.return,z=a;break}z=t.return}}var YC=Math.ceil,Cu=pr.ReactCurrentDispatcher,Ih=pr.ReactCurrentOwner,sn=pr.ReactCurrentBatchConfig,ce=0,Ge=null,Le=null,it=0,Lt=0,Ps=oi(0),Ve=0,Ea=null,Wi=0,sc=0,$h=0,Jo=null,Ct=null,zh=0,lo=1/0,Jn=null,_u=!1,Bf=null,qr=null,Sl=!1,Ir=null,Pu=0,ea=0,Vf=null,ql=-1,Kl=0;function yt(){return ce&6?Me():ql!==-1?ql:ql=Me()}function Kr(e){return e.mode&1?ce&2&&it!==0?it&-it:DC.transition!==null?(Kl===0&&(Kl=m1()),Kl):(e=pe,e!==0||(e=window.event,e=e===void 0?16:S1(e.type)),e):1}function En(e,t,n,r){if(50<ea)throw ea=0,Vf=null,Error(N(185));Wa(e,n,r),(!(ce&2)||e!==Ge)&&(e===Ge&&(!(ce&2)&&(sc|=n),Ve===4&&_r(e,it)),Rt(e,r),n===1&&ce===0&&!(t.mode&1)&&(lo=Me()+500,tc&&ai()))}function Rt(e,t){var n=e.callbackNode;DT(e,t);var r=du(e,e===Ge?it:0);if(r===0)n!==null&&Ag(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ag(n),t===1)e.tag===0?OC(Sv.bind(null,e)):B1(Sv.bind(null,e)),PC(function(){!(ce&6)&&ai()}),n=null;else{switch(g1(r)){case 1:n=fh;break;case 4:n=p1;break;case 16:n=cu;break;case 536870912:n=h1;break;default:n=cu}n=$w(n,Ow.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ow(e,t){if(ql=-1,Kl=0,ce&6)throw Error(N(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=du(e,e===Ge?it:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ju(e,r);else{t=r;var i=ce;ce|=2;var s=Fw();(Ge!==e||it!==t)&&(Jn=null,lo=Me()+500,Li(e,t));do try{JC();break}catch(a){Dw(e,a)}while(!0);Th(),Cu.current=s,ce=i,Le!==null?t=0:(Ge=null,it=0,t=Ve)}if(t!==0){if(t===2&&(i=mf(e),i!==0&&(r=i,t=Uf(e,i))),t===1)throw n=Ea,Li(e,0),_r(e,r),Rt(e,Me()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!XC(i)&&(t=ju(e,r),t===2&&(s=mf(e),s!==0&&(r=s,t=Uf(e,s))),t===1))throw n=Ea,Li(e,0),_r(e,r),Rt(e,Me()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:vi(e,Ct,Jn);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=zh+500-Me(),10<t)){if(du(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){yt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=kf(vi.bind(null,e,Ct,Jn),t);break}vi(e,Ct,Jn);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-kn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*YC(r/1960))-r,10<r){e.timeoutHandle=kf(vi.bind(null,e,Ct,Jn),r);break}vi(e,Ct,Jn);break;case 5:vi(e,Ct,Jn);break;default:throw Error(N(329))}}}return Rt(e,Me()),e.callbackNode===n?Ow.bind(null,e):null}function Uf(e,t){var n=Jo;return e.current.memoizedState.isDehydrated&&(Li(e,t).flags|=256),e=ju(e,t),e!==2&&(t=Ct,Ct=n,t!==null&&Hf(t)),e}function Hf(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function XC(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&=~$h,t&=~sc,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 Sv(e){if(ce&6)throw Error(N(327));zs();var t=du(e,0);if(!(t&1))return Rt(e,Me()),null;var n=ju(e,t);if(e.tag!==0&&n===2){var r=mf(e);r!==0&&(t=r,n=Uf(e,r))}if(n===1)throw n=Ea,Li(e,0),_r(e,t),Rt(e,Me()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vi(e,Ct,Jn),Rt(e,Me()),null}function Bh(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(lo=Me()+500,tc&&ai())}}function qi(e){Ir!==null&&Ir.tag===0&&!(ce&6)&&zs();var t=ce;ce|=1;var n=sn.transition,r=pe;try{if(sn.transition=null,pe=1,e)return e()}finally{pe=r,sn.transition=n,ce=t,!(ce&6)&&ai()}}function Vh(){Lt=Ps.current,ke(Ps)}function Li(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_C(n)),Le!==null)for(n=Le.return;n!==null;){var r=n;switch(Sh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&gu();break;case 3:oo(),ke(jt),ke(pt),Rh();break;case 5:Ah(r);break;case 4:oo();break;case 13:ke(_e);break;case 19:ke(_e);break;case 10:Ch(r.type._context);break;case 22:case 23:Vh()}n=n.return}if(Ge=e,Le=e=Gr(e.current,null),it=Lt=t,Ve=0,Ea=null,$h=sc=Wi=0,Ct=Jo=null,Ei!==null){for(t=0;t<Ei.length;t++)if(n=Ei[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ei=null}return e}function Dw(e,t){do{var n=Le;try{if(Th(),Ul.current=Tu,Eu){for(var r=je.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Eu=!1}if(Hi=0,Ke=ze=je=null,Xo=!1,ba=0,Ih.current=null,n===null||n.return===null){Ve=1,Ea=t,Le=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=it,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=uv(o);if(p!==null){p.flags&=-257,cv(p,o,a,s,t),p.mode&1&&lv(s,u,t),t=p,l=u;var h=t.updateQueue;if(h===null){var v=new Set;v.add(l),t.updateQueue=v}else h.add(l);break e}else{if(!(t&1)){lv(s,u,t),Uh();break e}l=Error(N(426))}}else if(Ee&&a.mode&1){var b=uv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),cv(b,o,a,s,t),kh(ao(l,a));break e}}s=l=ao(l,a),Ve!==4&&(Ve=2),Jo===null?Jo=[s]:Jo.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=gw(s,l,t);nv(s,m);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"&&(qr===null||!qr.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=vw(s,a,t);nv(s,E);break e}}s=s.return}while(s!==null)}Mw(n)}catch(T){t=T,Le===n&&n!==null&&(Le=n=n.return);continue}break}while(!0)}function Fw(){var e=Cu.current;return Cu.current=Tu,e===null?Tu:e}function Uh(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Ge===null||!(Wi&268435455)&&!(sc&268435455)||_r(Ge,it)}function ju(e,t){var n=ce;ce|=2;var r=Fw();(Ge!==e||it!==t)&&(Jn=null,Li(e,t));do try{ZC();break}catch(i){Dw(e,i)}while(!0);if(Th(),ce=n,Cu.current=r,Le!==null)throw Error(N(261));return Ge=null,it=0,Ve}function ZC(){for(;Le!==null;)Nw(Le)}function JC(){for(;Le!==null&&!ET();)Nw(Le)}function Nw(e){var t=Iw(e.alternate,e,Lt);e.memoizedProps=e.pendingProps,t===null?Mw(e):Le=t,Ih.current=null}function Mw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=qC(n,t),n!==null){n.flags&=32767,Le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,Le=null;return}}else if(n=WC(n,t,Lt),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);Ve===0&&(Ve=5)}function vi(e,t,n){var r=pe,i=sn.transition;try{sn.transition=null,pe=1,e2(e,t,n,r)}finally{sn.transition=i,pe=r}return null}function e2(e,t,n,r){do zs();while(Ir!==null);if(ce&6)throw Error(N(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(FT(e,s),e===Ge&&(Le=Ge=null,it=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sl||(Sl=!0,$w(cu,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=sn.transition,sn.transition=null;var o=pe;pe=1;var a=ce;ce|=4,Ih.current=null,GC(e,n),Aw(n,e),wC(bf),fu=!!wf,bf=wf=null,e.current=n,QC(n),TT(),ce=a,pe=o,sn.transition=s}else e.current=n;if(Sl&&(Sl=!1,Ir=e,Pu=i),s=e.pendingLanes,s===0&&(qr=null),PT(n.stateNode),Rt(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(_u)throw _u=!1,e=Bf,Bf=null,e;return Pu&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Vf?ea++:(ea=0,Vf=e):ea=0,ai(),null}function zs(){if(Ir!==null){var e=g1(Pu),t=sn.transition,n=pe;try{if(sn.transition=null,pe=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,Pu=0,ce&6)throw Error(N(331));var i=ce;for(ce|=4,z=e.current;z!==null;){var s=z,o=s.child;if(z.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var d=z;switch(d.tag){case 0:case 11:case 15:Zo(8,d,s)}var c=d.child;if(c!==null)c.return=d,z=c;else for(;z!==null;){d=z;var f=d.sibling,p=d.return;if(_w(d),d===u){z=null;break}if(f!==null){f.return=p,z=f;break}z=p}}}var h=s.alternate;if(h!==null){var v=h.child;if(v!==null){h.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}z=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,z=o;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Zo(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,z=m;break e}z=s.return}}var x=e.current;for(z=x;z!==null;){o=z;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,z=w;else e:for(o=x;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ic(9,a)}}catch(T){De(a,a.return,T)}if(a===o){z=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,z=E;break e}z=a.return}}if(ce=i,ai(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(Yu,e)}catch{}r=!0}return r}finally{pe=n,sn.transition=t}}return!1}function kv(e,t,n){t=ao(n,t),t=gw(e,t,1),e=Wr(e,t,1),t=yt(),e!==null&&(Wa(e,1,t),Rt(e,t))}function De(e,t,n){if(e.tag===3)kv(e,e,n);else for(;t!==null;){if(t.tag===3){kv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=ao(n,e),e=vw(t,e,1),t=Wr(t,e,1),e=yt(),t!==null&&(Wa(t,1,e),Rt(t,e));break}}t=t.return}}function t2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&n,Ge===e&&(it&n)===n&&(Ve===4||Ve===3&&(it&130023424)===it&&500>Me()-zh?Li(e,0):$h|=n),Rt(e,t)}function Lw(e,t){t===0&&(e.mode&1?(t=fl,fl<<=1,!(fl&130023424)&&(fl=4194304)):t=1);var n=yt();e=cr(e,t),e!==null&&(Wa(e,t,n),Rt(e,n))}function n2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Lw(e,n)}function r2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Lw(e,n)}var Iw;Iw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,HC(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,Ee&&t.flags&1048576&&V1(t,xu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var i=ro(t,pt.current);$s(t,n),i=Dh(null,t,r,e,i,n);var s=Fh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,At(r)?(s=!0,vu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ph(t),i.updater=rc,t.stateNode=i,i._reactInternals=t,Af(t,r,e,n),t=Df(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&bh(t),gt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=s2(r),e=vn(r,e),i){case 0:t=Of(null,t,r,e,n);break e;case 1:t=pv(null,t,r,e,n);break e;case 11:t=dv(null,t,r,e,n);break e;case 14:t=fv(null,t,r,vn(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Of(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),pv(e,t,r,i,n);case 3:e:{if(bw(t),e===null)throw Error(N(387));r=t.pendingProps,s=t.memoizedState,i=s.element,G1(e,t),Su(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(N(423)),t),t=hv(e,t,r,n,i);break e}else if(r!==i){i=ao(Error(N(424)),t),t=hv(e,t,r,n,i);break e}else for(It=Hr(t.stateNode.containerInfo.firstChild),Bt=t,Ee=!0,bn=null,n=q1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(io(),r===i){t=dr(e,t,n);break e}gt(e,t,r,n)}t=t.child}return t;case 5:return Q1(t),e===null&&_f(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Sf(r,i)?o=null:s!==null&&Sf(r,s)&&(t.flags|=32),ww(e,t),gt(e,t,o,n),t.child;case 6:return e===null&&_f(t),null;case 13:return Sw(e,t,n);case 4:return jh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(t,null,r,n):gt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),dv(e,t,r,i,n);case 7:return gt(e,t,t.pendingProps,n),t.child;case 8:return gt(e,t,t.pendingProps.children,n),t.child;case 12:return gt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,xe(wu,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!jt.current){t=dr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=or(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Pf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Pf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$s(t,n),i=ln(i),r=r(i),t.flags|=1,gt(e,t,r,n),t.child;case 14:return r=t.type,i=vn(r,t.pendingProps),i=vn(r.type,i),fv(e,t,r,i,n);case 15:return yw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Wl(e,t),t.tag=1,At(r)?(e=!0,vu(t)):e=!1,$s(t,n),mw(t,r,i),Af(t,r,i,n),Df(null,t,r,!0,e,n);case 19:return kw(e,t,n);case 22:return xw(e,t,n)}throw Error(N(156,t.tag))};function $w(e,t){return f1(e,t)}function i2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,n,r){return new i2(e,t,n,r)}function Hh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function s2(e){if(typeof e=="function")return Hh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uh)return 11;if(e===ch)return 14}return 2}function Gr(e,t){var n=e.alternate;return n===null?(n=nn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Hh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ys:return Ii(n.children,i,s,t);case lh:o=8,i|=8;break;case Jd:return e=nn(12,n,t,i|2),e.elementType=Jd,e.lanes=s,e;case ef:return e=nn(13,n,t,i),e.elementType=ef,e.lanes=s,e;case tf:return e=nn(19,n,t,i),e.elementType=tf,e.lanes=s,e;case Qx:return oc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Kx:o=10;break e;case Gx:o=9;break e;case uh:o=11;break e;case ch:o=14;break e;case kr:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=nn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Ii(e,t,n,r){return e=nn(7,e,r,t),e.lanes=n,e}function oc(e,t,n,r){return e=nn(22,e,r,t),e.elementType=Qx,e.lanes=n,e.stateNode={isHidden:!1},e}function gd(e,t,n){return e=nn(6,e,null,t),e.lanes=n,e}function vd(e,t,n){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o2(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=Xc(0),this.expirationTimes=Xc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Wh(e,t,n,r,i,s,o,a,l){return e=new o2(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=nn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ph(s),e}function a2(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 zw(e){if(!e)return ti;e=e._reactInternals;e:{if(Zi(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(At(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(At(n))return z1(e,n,t)}return t}function Bw(e,t,n,r,i,s,o,a,l){return e=Wh(n,r,!0,e,i,s,o,a,l),e.context=zw(null),n=e.current,r=yt(),i=Kr(n),s=or(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Wa(e,i,r),Rt(e,r),e}function ac(e,t,n,r){var i=t.current,s=yt(),o=Kr(i);return n=zw(n),t.context===null?t.context=n:t.pendingContext=n,t=or(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(En(e,i,o,s),Vl(e,i,o)),o}function Au(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 Ev(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function qh(e,t){Ev(e,t),(e=e.alternate)&&Ev(e,t)}function l2(){return null}var Vw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Kh(e){this._internalRoot=e}lc.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));ac(e,t,null,null)};lc.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qi(function(){ac(null,e,null,null)}),t[ur]=null}};function lc(e){this._internalRoot=e}lc.prototype.unstable_scheduleHydration=function(e){if(e){var t=x1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cr.length&&t!==0&&t<Cr[n].priority;n++);Cr.splice(n,0,e),n===0&&b1(e)}};function Gh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function uc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Tv(){}function u2(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Au(o);s.call(u)}}var o=Bw(t,r,e,0,null,!1,!1,"",Tv);return e._reactRootContainer=o,e[ur]=o.current,ga(e.nodeType===8?e.parentNode:e),qi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Au(l);a.call(u)}}var l=Wh(e,0,!1,null,null,!1,!1,"",Tv);return e._reactRootContainer=l,e[ur]=l.current,ga(e.nodeType===8?e.parentNode:e),qi(function(){ac(t,l,n,r)}),l}function cc(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=Au(o);a.call(l)}}ac(t,o,e,i)}else o=u2(n,t,e,i,r);return Au(o)}v1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=zo(t.pendingLanes);n!==0&&(ph(t,n|1),Rt(t,Me()),!(ce&6)&&(lo=Me()+500,ai()))}break;case 13:qi(function(){var r=cr(e,1);if(r!==null){var i=yt();En(r,e,1,i)}}),qh(e,1)}};hh=function(e){if(e.tag===13){var t=cr(e,134217728);if(t!==null){var n=yt();En(t,e,134217728,n)}qh(e,134217728)}};y1=function(e){if(e.tag===13){var t=Kr(e),n=cr(e,t);if(n!==null){var r=yt();En(n,e,t,r)}qh(e,t)}};x1=function(){return pe};w1=function(e,t){var n=pe;try{return pe=e,t()}finally{pe=n}};ff=function(e,t,n){switch(t){case"input":if(sf(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=ec(r);if(!i)throw Error(N(90));Xx(r),sf(r,i)}}}break;case"textarea":Jx(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};o1=Bh;a1=qi;var c2={usingClientEntryPoint:!1,Events:[Ka,Ss,ec,i1,s1,Bh]},Fo={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d2={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:pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=c1(e),e===null?null:e.stateNode},findFiberByHostInstance:Fo.findFiberByHostInstance||l2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kl.isDisabled&&kl.supportsFiber)try{Yu=kl.inject(d2),$n=kl}catch{}}Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=c2;Ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gh(t))throw Error(N(200));return a2(e,t,null,n)};Ut.createRoot=function(e,t){if(!Gh(e))throw Error(N(299));var n=!1,r="",i=Vw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Wh(e,1,!1,null,null,n,!1,r,i),e[ur]=t.current,ga(e.nodeType===8?e.parentNode:e),new Kh(t)};Ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=c1(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e){return qi(e)};Ut.hydrate=function(e,t,n){if(!uc(t))throw Error(N(200));return cc(null,e,t,!0,n)};Ut.hydrateRoot=function(e,t,n){if(!Gh(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Vw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Bw(t,null,e,1,n??null,i,!1,s,o),e[ur]=t.current,ga(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 lc(t)};Ut.render=function(e,t,n){if(!uc(t))throw Error(N(200));return cc(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!uc(e))throw Error(N(40));return e._reactRootContainer?(qi(function(){cc(null,null,e,!1,function(){e._reactRootContainer=null,e[ur]=null})}),!0):!1};Ut.unstable_batchedUpdates=Bh;Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!uc(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return cc(e,t,n,!1,r)};Ut.version="18.3.1-next-f1338f8080-20240426";function Uw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uw)}catch(e){console.error(e)}}Uw(),Ux.exports=Ut;var Hw=Ux.exports;const f2=Yi(Hw);var Ww,Cv=Hw;Ww=Cv.createRoot,Cv.hydrateRoot;const p2="@alfatech/livechat",h2="v2025.07.09.2",m2="module",g2="https://api-live.alfatek.dev",v2="wss://api-live.alfatek.dev",y2=["dist","README.md"],x2="dist/widget.js",w2={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"},b2={"@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"},S2={"@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"},qw={name:p2,private:!1,version:h2,type:m2,apiURL:g2,wsURL:v2,files:y2,main:x2,scripts:w2,dependencies:b2,devDependencies:S2,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},k2=qw.apiURL,E2=qw.wsURL;var on=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(on||{});const yd=(e,t)=>{localStorage.setItem(e,t)},Bs=e=>localStorage.getItem(e),_v=()=>{localStorage.removeItem("lc:customer:token"),localStorage.removeItem("lc:customer:refresh_token"),localStorage.removeItem("lc:device:id")},T2=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],C2=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],_2={429:T2,404:C2};async function yo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=localStorage.getItem(on.CustomerToken),i=localStorage.getItem(on.CustomerRefreshToken);r&&(n["X-Customer-Token"]=r),i&&(n["X-Customer-Refresh-Token"]=i);const s=await fetch(`${k2}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(a=>new Response(null,{status:500}));if(!s.ok){let a={};try{return a=await s.json(),[a,s.status]}catch{}const l=_2[s.status];return l?l(s,a):[{},s.status]}const o=s.headers.get("Content-Type");return o&&o.includes("application/json")?[await s.json(),s.status]:[await s.text(),s.status]}const dc=e=>[200,201,204].includes(e),P2=(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 xo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ki=typeof window>"u"||"Deno"in globalThis;function Zt(){}function j2(e,t){return typeof e=="function"?e(t):e}function Wf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Kw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Pv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Qh(o,t.options))return!1}else if(!Ta(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 jv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gi(t.options.mutationKey)!==Gi(s))return!1}else if(!Ta(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Qh(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gi)(e)}function Gi(e){return JSON.stringify(e,(t,n)=>qf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ta(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ta(e[n],t[n])):!1}function Gw(e,t){if(e===t)return e;const n=Av(e)&&Av(t);if(n||qf(e)&&qf(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const d=n?u:s[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=Gw(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Ru(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 Av(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qf(e){if(!Rv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Rv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Rv(e){return Object.prototype.toString.call(e)==="[object Object]"}function A2(e){return new Promise(t=>{setTimeout(t,e)})}function Kf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Gw(e,t):t}function R2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function O2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Yh=Symbol();function Qw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Yh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Us,Sx,D2=(Sx=class extends xo{constructor(){super();W(this,Ai);W(this,Pr);W(this,Us);$(this,Us,t=>{if(!Ki&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Us))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),$(this,Pr,void 0))}setEventListener(t){var n;$(this,Us,t),(n=S(this,Pr))==null||n.call(this),$(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&($(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Us=new WeakMap,Sx),Xh=new D2,Hs,jr,Ws,kx,F2=(kx=class extends xo{constructor(){super();W(this,Hs,!0);W(this,jr);W(this,Ws);$(this,Ws,t=>{if(!Ki&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,jr)||this.setEventListener(S(this,Ws))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),$(this,jr,void 0))}setEventListener(t){var n;$(this,Ws,t),(n=S(this,jr))==null||n.call(this),$(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Hs)!==t&&($(this,Hs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Hs)}},Hs=new WeakMap,jr=new WeakMap,Ws=new WeakMap,kx),Ou=new F2;function Gf(){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 N2(e){return Math.min(1e3*2**e,3e4)}function Yw(e){return(e??"online")==="online"?Ou.isOnline():!0}var Xw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xd(e){return e instanceof Xw}function Zw(e){let t=!1,n=0,r=!1,i;const s=Gf(),o=v=>{var b;r||(f(new Xw(v)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Xh.isFocused()&&(e.networkMode==="always"||Ou.isOnline())&&e.canRun(),d=()=>Yw(e.networkMode)&&e.canRun(),c=v=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,v),i==null||i(),s.resolve(v))},f=v=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,v),i==null||i(),s.reject(v))},p=()=>new Promise(v=>{var b;i=m=>{(r||u())&&v(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),h=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(m){v=Promise.reject(m)}Promise.resolve(v).then(c).catch(m=>{var C;if(r)return;const x=e.retry??(Ki?0:3),w=e.retryDelay??N2,E=typeof w=="function"?w(n,m):w,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,m);if(t||!T){f(m);return}n++,(C=e.onFail)==null||C.call(e,n,m),A2(E).then(()=>u()?void 0:p()).then(()=>{t?f(m):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function M2(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Be=M2(),Ri,Ex,Jw=(Ex=class{constructor(){W(this,Ri)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wf(this.gcTime)&&$(this,Ri,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ki?1/0:5*60*1e3))}clearGcTimeout(){S(this,Ri)&&(clearTimeout(S(this,Ri)),$(this,Ri,void 0))}},Ri=new WeakMap,Ex),qs,Ks,Xt,ut,za,Oi,yn,Zn,Tx,L2=(Tx=class extends Jw{constructor(t){super();W(this,yn);W(this,qs);W(this,Ks);W(this,Xt);W(this,ut);W(this,za);W(this,Oi);$(this,Oi,!1),$(this,za,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,Xt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,qs,I2(this.options)),this.state=t.state??S(this,qs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,ut))==null?void 0:t.promise}setOptions(t){this.options={...S(this,za),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Xt).remove(this)}setData(t,n){const r=Kf(this.state.data,t,this.options);return ie(this,yn,Zn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ie(this,yn,Zn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,ut))==null?void 0:r.promise;return(i=S(this,ut))==null||i.cancel(t),n?n.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,qs))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yh||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||!Kw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Xt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,ut)&&(S(this,Oi)?S(this,ut).cancel({revert:!0}):S(this,ut).cancelRetry()),this.scheduleGc()),S(this,Xt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ie(this,yn,Zn).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,ut))return S(this,ut).continueRetry(),S(this,ut).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>($(this,Oi,!0),r.signal)})},s=()=>{const c=Qw(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),$(this,Oi,!1),this.options.persister?this.options.persister(c,f,this):c(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),$(this,Ks,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&ie(this,yn,Zn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=c=>{var f,p,h,v;xd(c)&&c.silent||ie(this,yn,Zn).call(this,{type:"error",error:c}),xd(c)||((p=(f=S(this,Xt).config).onError)==null||p.call(f,c,this),(v=(h=S(this,Xt).config).onSettled)==null||v.call(h,this.state.data,c,this)),this.scheduleGc()};return $(this,ut,Zw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var f,p,h,v;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(p=(f=S(this,Xt).config).onSuccess)==null||p.call(f,c,this),(v=(h=S(this,Xt).config).onSettled)==null||v.call(h,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,f)=>{ie(this,yn,Zn).call(this,{type:"failed",failureCount:c,error:f})},onPause:()=>{ie(this,yn,Zn).call(this,{type:"pause"})},onContinue:()=>{ie(this,yn,Zn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,ut).start()}},qs=new WeakMap,Ks=new WeakMap,Xt=new WeakMap,ut=new WeakMap,za=new WeakMap,Oi=new WeakMap,yn=new WeakSet,Zn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...eb(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 xd(i)&&i.revert&&S(this,Ks)?{...S(this,Ks),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Be.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Xt).notify({query:this,type:"updated",action:t})})},Tx);function eb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Fn,Cx,$2=(Cx=class extends xo{constructor(t={}){super();W(this,Fn);this.config=t,$(this,Fn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Qh(i,n);let o=this.get(s);return o||(o=new L2({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){S(this,Fn).has(t.queryHash)||(S(this,Fn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Fn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Fn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Fn).get(t)}getAll(){return[...S(this,Fn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Pv(t,r)):n}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fn=new WeakMap,Cx),Nn,ht,Di,Mn,br,_x,z2=(_x=class extends Jw{constructor(t){super();W(this,Mn);W(this,Nn);W(this,ht);W(this,Di);this.mutationId=t.mutationId,$(this,ht,t.mutationCache),$(this,Nn,[]),this.state=t.state||tb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,ht).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,ht).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,ht).remove(this))}continue(){var t;return((t=S(this,Di))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,d,c,f,p,h,v,b,m,x,w,E,T,C,_;$(this,Di,Zw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,j)=>{ie(this,Mn,br).call(this,{type:"failed",failureCount:k,error:j})},onPause:()=>{ie(this,Mn,br).call(this,{type:"pause"})},onContinue:()=>{ie(this,Mn,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,ht).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Di).canStart();try{if(!n){ie(this,Mn,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,ht).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&ie(this,Mn,br).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const k=await S(this,Di).start();return await((u=(l=S(this,ht).config).onSuccess)==null?void 0:u.call(l,k,t,this.state.context,this)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,k,t,this.state.context)),await((p=(f=S(this,ht).config).onSettled)==null?void 0:p.call(f,k,null,this.state.variables,this.state.context,this)),await((v=(h=this.options).onSettled)==null?void 0:v.call(h,k,null,t,this.state.context)),ie(this,Mn,br).call(this,{type:"success",data:k}),k}catch(k){try{throw await((m=(b=S(this,ht).config).onError)==null?void 0:m.call(b,k,t,this.state.context,this)),await((w=(x=this.options).onError)==null?void 0:w.call(x,k,t,this.state.context)),await((T=(E=S(this,ht).config).onSettled)==null?void 0:T.call(E,void 0,k,this.state.variables,this.state.context,this)),await((_=(C=this.options).onSettled)==null?void 0:_.call(C,void 0,k,t,this.state.context)),k}finally{ie(this,Mn,br).call(this,{type:"error",error:k})}}finally{S(this,ht).runNext(this)}}},Nn=new WeakMap,ht=new WeakMap,Di=new WeakMap,Mn=new WeakSet,br=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Be.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,ht).notify({mutation:this,type:"updated",action:t})})},_x);function tb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mt,Ba,Px,B2=(Px=class extends xo{constructor(t={}){super();W(this,Mt);W(this,Ba);this.config=t,$(this,Mt,new Map),$(this,Ba,Date.now())}build(t,n,r){const i=new z2({mutationCache:this,mutationId:++ol(this,Ba)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=El(t),r=S(this,Mt).get(n)??[];r.push(t),S(this,Mt).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=El(t);if(S(this,Mt).has(n)){const i=(r=S(this,Mt).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,Mt).delete(n):S(this,Mt).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,Mt).get(El(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,Mt).get(El(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,Mt).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jv(n,r))}findAll(t={}){return this.getAll().filter(n=>jv(t,n))}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Be.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zt))))}},Mt=new WeakMap,Ba=new WeakMap,Px);function El(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Ov(e){return{onFetch:(t,n)=>{var d,c,f,p,h;const r=t.options,i=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},m=Qw(t.options,t.fetchOptions),x=async(w,E,T)=>{if(v)return Promise.reject();if(E==null&&w.pages.length)return Promise.resolve(w);const C={queryKey:t.queryKey,pageParam:E,direction:T?"backward":"forward",meta:t.options.meta};b(C);const _=await m(C),{maxPages:k}=t.options,j=T?O2:R2;return{pages:j(w.pages,_,k),pageParams:j(w.pageParams,E,k)}};if(i&&s.length){const w=i==="backward",E=w?V2:Dv,T={pages:s,pageParams:o},C=E(r,T);a=await x(T,C,w)}else{const w=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:Dv(r,a);if(l>0&&E==null)break;a=await x(a,E),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Dv(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 V2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Re,Ar,Rr,Gs,Qs,Or,Ys,Xs,jx,U2=(jx=class{constructor(e={}){W(this,Re);W(this,Ar);W(this,Rr);W(this,Gs);W(this,Qs);W(this,Or);W(this,Ys);W(this,Xs);$(this,Re,e.queryCache||new $2),$(this,Ar,e.mutationCache||new B2),$(this,Rr,e.defaultOptions||{}),$(this,Gs,new Map),$(this,Qs,new Map),$(this,Or,0)}mount(){ol(this,Or)._++,S(this,Or)===1&&($(this,Ys,Xh.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onFocus())})),$(this,Xs,Ou.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Re).onOnline())})))}unmount(){var e,t;ol(this,Or)._--,S(this,Or)===0&&((e=S(this,Ys))==null||e.call(this),$(this,Ys,void 0),(t=S(this,Xs))==null||t.call(this),$(this,Xs,void 0))}isFetching(e){return S(this,Re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ar).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=S(this,Re).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Vs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,Re).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=S(this,Re).get(r.queryHash),s=i==null?void 0:i.state.data,o=j2(t,s);if(o!==void 0)return S(this,Re).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Be.batch(()=>S(this,Re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Re);Be.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Re),r={type:"active",...e};return Be.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Be.batch(()=>S(this,Re).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Zt).catch(Zt)}invalidateQueries(e,t={}){return Be.batch(()=>{if(S(this,Re).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Be.batch(()=>S(this,Re).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Zt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Re).build(this,t);return n.isStaleByTime(Vs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zt).catch(Zt)}fetchInfiniteQuery(e){return e.behavior=Ov(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zt).catch(Zt)}ensureInfiniteQueryData(e){return e.behavior=Ov(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ou.isOnline()?S(this,Ar).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Re)}getMutationCache(){return S(this,Ar)}getDefaultOptions(){return S(this,Rr)}setDefaultOptions(e){$(this,Rr,e)}setQueryDefaults(e,t){S(this,Gs).set(Gi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Gs).values()],n={};return t.forEach(r=>{Ta(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Qs).set(Gi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Qs).values()];let n={};return t.forEach(r=>{Ta(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=Qh(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===Yh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Re).clear(),S(this,Ar).clear()}},Re=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Gs=new WeakMap,Qs=new WeakMap,Or=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,jx),kt,ae,Va,mt,Fi,Zs,Dr,Ln,Ua,Js,eo,Ni,Mi,Fr,to,de,Vo,Qf,Yf,Xf,Zf,Jf,ep,tp,nb,Ax,H2=(Ax=class extends xo{constructor(t,n){super();W(this,de);W(this,kt);W(this,ae);W(this,Va);W(this,mt);W(this,Fi);W(this,Zs);W(this,Dr);W(this,Ln);W(this,Ua);W(this,Js);W(this,eo);W(this,Ni);W(this,Mi);W(this,Fr);W(this,to,new Set);this.options=n,$(this,kt,t),$(this,Ln,null),$(this,Dr,Gf()),this.options.experimental_prefetchInRender||S(this,Dr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,ae).addObserver(this),Fv(S(this,ae),this.options)?ie(this,de,Vo).call(this):this.updateResult(),ie(this,de,Zf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return np(S(this,ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return np(S(this,ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ie(this,de,Jf).call(this),ie(this,de,ep).call(this),S(this,ae).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,ae);if(this.options=S(this,kt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,S(this,ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ie(this,de,tp).call(this),S(this,ae).setOptions(this.options),r._defaulted&&!Ru(this.options,r)&&S(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,ae),observer:this});const s=this.hasListeners();s&&Nv(S(this,ae),i,this.options,r)&&ie(this,de,Vo).call(this),this.updateResult(n),s&&(S(this,ae)!==i||Sn(this.options.enabled,S(this,ae))!==Sn(r.enabled,S(this,ae))||Vs(this.options.staleTime,S(this,ae))!==Vs(r.staleTime,S(this,ae)))&&ie(this,de,Qf).call(this);const o=ie(this,de,Yf).call(this);s&&(S(this,ae)!==i||Sn(this.options.enabled,S(this,ae))!==Sn(r.enabled,S(this,ae))||o!==S(this,Fr))&&ie(this,de,Xf).call(this,o)}getOptimisticResult(t){const n=S(this,kt).getQueryCache().build(S(this,kt),t),r=this.createResult(n,t);return q2(this,r)&&($(this,mt,r),$(this,Zs,this.options),$(this,Fi,S(this,ae).state)),r}getCurrentResult(){return S(this,mt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){S(this,to).add(t)}getCurrentQuery(){return S(this,ae)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,kt).defaultQueryOptions(t),r=S(this,kt).getQueryCache().build(S(this,kt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ie(this,de,Vo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,mt)))}createResult(t,n){var k;const r=S(this,ae),i=this.options,s=S(this,mt),o=S(this,Fi),a=S(this,Zs),u=t!==r?t.state:S(this,Va),{state:d}=t;let c={...d},f=!1,p;if(n._optimisticResults){const j=this.hasListeners(),R=!j&&Fv(t,n),M=j&&Nv(t,r,n,i);(R||M)&&(c={...c,...eb(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:h,errorUpdatedAt:v,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===S(this,Ua))p=S(this,Js);else try{$(this,Ua,n.select),p=n.select(c.data),p=Kf(s==null?void 0:s.data,p,n),$(this,Js,p),$(this,Ln,null)}catch(j){$(this,Ln,j)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((k=S(this,eo))==null?void 0:k.state.data,S(this,eo)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),$(this,Ln,null)}catch(R){$(this,Ln,R)}j!==void 0&&(b="success",p=Kf(s==null?void 0:s.data,j,n),f=!0)}S(this,Ln)&&(h=S(this,Ln),p=S(this,Js),v=Date.now(),b="error");const m=c.fetchStatus==="fetching",x=b==="pending",w=b==="error",E=x&&m,T=p!==void 0,_={status:b,fetchStatus:c.fetchStatus,isPending:x,isSuccess:b==="success",isError:w,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:v,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!x,isLoadingError:w&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&T,isStale:Zh(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const j=G=>{_.status==="error"?G.reject(_.error):_.data!==void 0&&G.resolve(_.data)},R=()=>{const G=$(this,Dr,_.promise=Gf());j(G)},M=S(this,Dr);switch(M.status){case"pending":t.queryHash===r.queryHash&&j(M);break;case"fulfilled":(_.status==="error"||_.data!==M.value)&&R();break;case"rejected":(_.status!=="error"||_.error!==M.reason)&&R();break}}return _}updateResult(t){const n=S(this,mt),r=this.createResult(S(this,ae),this.options);if($(this,Fi,S(this,ae).state),$(this,Zs,this.options),S(this,Fi).data!==void 0&&$(this,eo,S(this,ae)),Ru(r,n))return;$(this,mt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,to).size)return!0;const l=new Set(a??S(this,to));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,mt)).some(u=>{const d=u;return S(this,mt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),ie(this,de,nb).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ie(this,de,Zf).call(this)}},kt=new WeakMap,ae=new WeakMap,Va=new WeakMap,mt=new WeakMap,Fi=new WeakMap,Zs=new WeakMap,Dr=new WeakMap,Ln=new WeakMap,Ua=new WeakMap,Js=new WeakMap,eo=new WeakMap,Ni=new WeakMap,Mi=new WeakMap,Fr=new WeakMap,to=new WeakMap,de=new WeakSet,Vo=function(t){ie(this,de,tp).call(this);let n=S(this,ae).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zt)),n},Qf=function(){ie(this,de,Jf).call(this);const t=Vs(this.options.staleTime,S(this,ae));if(Ki||S(this,mt).isStale||!Wf(t))return;const r=Kw(S(this,mt).dataUpdatedAt,t)+1;$(this,Ni,setTimeout(()=>{S(this,mt).isStale||this.updateResult()},r))},Yf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,ae)):this.options.refetchInterval)??!1},Xf=function(t){ie(this,de,ep).call(this),$(this,Fr,t),!(Ki||Sn(this.options.enabled,S(this,ae))===!1||!Wf(S(this,Fr))||S(this,Fr)===0)&&$(this,Mi,setInterval(()=>{(this.options.refetchIntervalInBackground||Xh.isFocused())&&ie(this,de,Vo).call(this)},S(this,Fr)))},Zf=function(){ie(this,de,Qf).call(this),ie(this,de,Xf).call(this,ie(this,de,Yf).call(this))},Jf=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),$(this,Ni,void 0))},ep=function(){S(this,Mi)&&(clearInterval(S(this,Mi)),$(this,Mi,void 0))},tp=function(){const t=S(this,kt).getQueryCache().build(S(this,kt),this.options);if(t===S(this,ae))return;const n=S(this,ae);$(this,ae,t),$(this,Va,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},nb=function(t){Be.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,mt))}),S(this,kt).getQueryCache().notify({query:S(this,ae),type:"observerResultsUpdated"})})},Ax);function W2(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Fv(e,t){return W2(e,t)||e.state.data!==void 0&&np(e,t,t.refetchOnMount)}function np(e,t,n){if(Sn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Zh(e,t)}return!1}function Nv(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Zh(e,n)}function Zh(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Vs(t.staleTime,e))}function q2(e,t){return!Ru(e.getCurrentResult(),t)}var Nr,Mr,Et,nr,ar,Ql,rp,Rx,K2=(Rx=class extends xo{constructor(t,n){super();W(this,ar);W(this,Nr);W(this,Mr);W(this,Et);W(this,nr);$(this,Nr,t),this.setOptions(n),this.bindMethods(),ie(this,ar,Ql).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=S(this,Nr).defaultMutationOptions(t),Ru(this.options,n)||S(this,Nr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Et),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Gi(n.mutationKey)!==Gi(this.options.mutationKey)?this.reset():((r=S(this,Et))==null?void 0:r.state.status)==="pending"&&S(this,Et).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,Et))==null||t.removeObserver(this)}onMutationUpdate(t){ie(this,ar,Ql).call(this),ie(this,ar,rp).call(this,t)}getCurrentResult(){return S(this,Mr)}reset(){var t;(t=S(this,Et))==null||t.removeObserver(this),$(this,Et,void 0),ie(this,ar,Ql).call(this),ie(this,ar,rp).call(this)}mutate(t,n){var r;return $(this,nr,n),(r=S(this,Et))==null||r.removeObserver(this),$(this,Et,S(this,Nr).getMutationCache().build(S(this,Nr),this.options)),S(this,Et).addObserver(this),S(this,Et).execute(t)}},Nr=new WeakMap,Mr=new WeakMap,Et=new WeakMap,nr=new WeakMap,ar=new WeakSet,Ql=function(){var n;const t=((n=S(this,Et))==null?void 0:n.state)??tb();$(this,Mr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},rp=function(t){Be.batch(()=>{var n,r,i,s,o,a,l,u;if(S(this,nr)&&this.hasListeners()){const d=S(this,Mr).variables,c=S(this,Mr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,nr)).onSuccess)==null||r.call(n,t.data,d,c),(s=(i=S(this,nr)).onSettled)==null||s.call(i,t.data,null,d,c)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,nr)).onError)==null||a.call(o,t.error,d,c),(u=(l=S(this,nr)).onSettled)==null||u.call(l,void 0,t.error,d,c))}this.listeners.forEach(d=>{d(S(this,Mr))})})},Rx),rb=g.createContext(void 0),ib=e=>{const t=g.useContext(rb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},G2=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(rb.Provider,{value:e,children:t})),sb=g.createContext(!1),Q2=()=>g.useContext(sb);sb.Provider;function Y2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var X2=g.createContext(Y2()),Z2=()=>g.useContext(X2);function ob(e,t){return typeof e=="function"?e(...t):!!e}function ip(){}var J2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},e_=e=>{g.useEffect(()=>{e.clearReset()},[e])},t_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&ob(n,[e.error,r]),n_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},r_=(e,t)=>e.isLoading&&e.isFetching&&!t,i_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Mv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function s_(e,t,n){var d,c,f,p,h;const r=ib(),i=Q2(),s=Z2(),o=r.defaultQueryOptions(e);(c=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||c.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",n_(o),J2(o,s),e_(s);const a=!r.getQueryCache().get(o.queryHash),[l]=g.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(g.useSyncExternalStore(g.useCallback(v=>{const b=i?ip:l.subscribe(Be.batchCalls(v));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),g.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),i_(o,u))throw Mv(o,l,s);if(t_({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,u),o.experimental_prefetchInRender&&!Ki&&r_(u,i)){const v=a?Mv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;v==null||v.catch(ip).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function o_(e,t){return s_(e,H2)}function Jh(e,t){const n=ib(),[r]=g.useState(()=>new K2(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const i=g.useSyncExternalStore(g.useCallback(o=>r.subscribe(Be.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=g.useCallback((o,a)=>{r.mutate(o,a).catch(ip)},[r]);if(i.error&&ob(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const a_=e=>o_({queryKey:["widgets",e],queryFn:()=>l_(e)}),l_=e=>yo(`widgets/with-link/${e}`);var Y=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(Y||{});function u_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
41
41
  * @remix-run/router v1.21.0
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -46,7 +46,7 @@ Error generating stack: `+s.message+`
46
46
  * LICENSE.md file in the root directory of this source tree.
47
47
  *
48
48
  * @license MIT
49
- */function Du(){return Du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Du.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));function c_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((p,h)=>d(p,typeof p=="string"?null:p.state,h===0?"default":void 0));let s=l(n??i.length-1),o=$r.Pop,a=null;function l(p){return Math.min(Math.max(p,0),i.length-1)}function u(){return i[s]}function d(p,h,v){h===void 0&&(h=null);let b=f_(i?u().pathname:"/",p,h,v);return em(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),b}function c(p){return typeof p=="string"?p:sp(p)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(p){return new URL(c(p),"http://localhost")},encodeLocation(p){let h=typeof p=="string"?Ji(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){o=$r.Push;let v=d(p,h);s+=1,i.splice(s,i.length,v),r&&a&&a({action:o,location:v,delta:1})},replace(p,h){o=$r.Replace;let v=d(p,h);i[s]=v,r&&a&&a({action:o,location:v,delta:0})},go(p){o=$r.Pop;let h=l(s+p),v=i[h];s=h,a&&a({action:o,location:v,delta:p})},listen(p){return a=p,()=>{a=null}}}}function Ue(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function em(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function d_(){return Math.random().toString(36).substr(2,8)}function f_(e,t,n,r){return n===void 0&&(n=null),Du({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:n,key:t&&t.key||r||d_()})}function sp(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Mv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Mv||(Mv={}));function p_(e,t,n){return n===void 0&&(n="/"),h_(e,t,n,!1)}function h_(e,t,n,r){let i=typeof t=="string"?Ji(t):t,s=tm(i.pathname||"/",n);if(s==null)return null;let o=ab(e);m_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=C_(s);a=E_(o[l],u,r)}return a}function ab(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Ue(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Qr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ue(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ab(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:S_(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of lb(s.path))i(s,o,l)}),t}function lb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=lb(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function m_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:k_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const g_=/^:[\w-]+$/,v_=3,y_=2,x_=1,w_=10,b_=-2,Lv=e=>e==="*";function S_(e,t){let n=e.split("/"),r=n.length;return n.some(Lv)&&(r+=b_),t&&(r+=y_),n.filter(i=>!Lv(i)).reduce((i,s)=>i+(g_.test(s)?v_:s===""?x_:w_),r)}function k_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function E_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",c=Iv({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=Iv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Qr([s,c.pathname]),pathnameBase:A_(Qr([s,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(s=Qr([s,c.pathnameBase]))}return o}function Iv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=T_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,d,c)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let v=a[c]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const h=a[c];return p&&!h?u[f]=void 0:u[f]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function T_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),em(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function C_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return em(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function __(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ji(e):e;return{pathname:n?n.startsWith("/")?n:P_(n,t):t,search:R_(r),hash:O_(i)}}function P_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function xd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function j_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ub(e,t){let n=j_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function cb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ji(e):(i=Du({},e),Ue(!i.pathname||!i.pathname.includes("?"),xd("?","pathname","search",i)),Ue(!i.pathname||!i.pathname.includes("#"),xd("#","pathname","hash",i)),Ue(!i.search||!i.search.includes("#"),xd("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),c-=1;i.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=__(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Qr=e=>e.join("/").replace(/\/\/+/g,"/"),A_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function D_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const db=["post","put","patch","delete"];new Set(db);const F_=["get",...db];new Set(F_);/**
49
+ */function Du(){return Du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Du.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));function c_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((p,h)=>d(p,typeof p=="string"?null:p.state,h===0?"default":void 0));let s=l(n??i.length-1),o=$r.Pop,a=null;function l(p){return Math.min(Math.max(p,0),i.length-1)}function u(){return i[s]}function d(p,h,v){h===void 0&&(h=null);let b=f_(i?u().pathname:"/",p,h,v);return em(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),b}function c(p){return typeof p=="string"?p:sp(p)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(p){return new URL(c(p),"http://localhost")},encodeLocation(p){let h=typeof p=="string"?Ji(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){o=$r.Push;let v=d(p,h);s+=1,i.splice(s,i.length,v),r&&a&&a({action:o,location:v,delta:1})},replace(p,h){o=$r.Replace;let v=d(p,h);i[s]=v,r&&a&&a({action:o,location:v,delta:0})},go(p){o=$r.Pop;let h=l(s+p),v=i[h];s=h,a&&a({action:o,location:v,delta:p})},listen(p){return a=p,()=>{a=null}}}}function Ue(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function em(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function d_(){return Math.random().toString(36).substr(2,8)}function f_(e,t,n,r){return n===void 0&&(n=null),Du({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:n,key:t&&t.key||r||d_()})}function sp(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Lv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Lv||(Lv={}));function p_(e,t,n){return n===void 0&&(n="/"),h_(e,t,n,!1)}function h_(e,t,n,r){let i=typeof t=="string"?Ji(t):t,s=tm(i.pathname||"/",n);if(s==null)return null;let o=ab(e);m_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=C_(s);a=E_(o[l],u,r)}return a}function ab(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Ue(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Qr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ue(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ab(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:S_(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of lb(s.path))i(s,o,l)}),t}function lb(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=lb(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function m_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:k_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const g_=/^:[\w-]+$/,v_=3,y_=2,x_=1,w_=10,b_=-2,Iv=e=>e==="*";function S_(e,t){let n=e.split("/"),r=n.length;return n.some(Iv)&&(r+=b_),t&&(r+=y_),n.filter(i=>!Iv(i)).reduce((i,s)=>i+(g_.test(s)?v_:s===""?x_:w_),r)}function k_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function E_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",c=$v({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=$v({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Qr([s,c.pathname]),pathnameBase:A_(Qr([s,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(s=Qr([s,c.pathnameBase]))}return o}function $v(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=T_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,d,c)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let v=a[c]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const h=a[c];return p&&!h?u[f]=void 0:u[f]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function T_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),em(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function C_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return em(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function __(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ji(e):e;return{pathname:n?n.startsWith("/")?n:P_(n,t):t,search:R_(r),hash:O_(i)}}function P_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function wd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function j_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ub(e,t){let n=j_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function cb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ji(e):(i=Du({},e),Ue(!i.pathname||!i.pathname.includes("?"),wd("?","pathname","search",i)),Ue(!i.pathname||!i.pathname.includes("#"),wd("#","pathname","hash",i)),Ue(!i.search||!i.search.includes("#"),wd("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),c-=1;i.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=__(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Qr=e=>e.join("/").replace(/\/\/+/g,"/"),A_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function D_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const db=["post","put","patch","delete"];new Set(db);const F_=["get",...db];new Set(F_);/**
50
50
  * React Router v6.28.0
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,7 +55,7 @@ Error generating stack: `+s.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ca.apply(this,arguments)}const nm=g.createContext(null),N_=g.createContext(null),es=g.createContext(null),fc=g.createContext(null),ts=g.createContext({outlet:null,matches:[],isDataRoute:!1}),fb=g.createContext(null);function M_(e,t){let{relative:n}=t===void 0?{}:t;Qa()||Ue(!1);let{basename:r,navigator:i}=g.useContext(es),{hash:s,pathname:o,search:a}=mb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Qr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Qa(){return g.useContext(fc)!=null}function Ya(){return Qa()||Ue(!1),g.useContext(fc).location}function pb(e){g.useContext(es).static||g.useLayoutEffect(e)}function hb(){let{isDataRoute:e}=g.useContext(ts);return e?Q_():L_()}function L_(){Qa()||Ue(!1);let e=g.useContext(nm),{basename:t,future:n,navigator:r}=g.useContext(es),{matches:i}=g.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(ub(i,n.v7_relativeSplatPath)),a=g.useRef(!1);return pb(()=>{a.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=cb(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Qr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,s,e])}function mb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(es),{matches:i}=g.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(ub(i,r.v7_relativeSplatPath));return g.useMemo(()=>cb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function I_(e,t){return $_(e,t)}function $_(e,t,n,r){Qa()||Ue(!1);let{navigator:i}=g.useContext(es),{matches:s}=g.useContext(ts),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ya(),d;if(t){var c;let b=typeof t=="string"?Ji(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||Ue(!1),d=b}else d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let h=p_(e,{pathname:p}),v=H_(h&&h.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Qr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Qr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&v?g.createElement(fc.Provider,{value:{location:Ca({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:$r.Pop}},v):v}function z_(){let e=G_(),t=D_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,null)}const B_=g.createElement(z_,null);class V_ extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(ts.Provider,{value:this.props.routeContext},g.createElement(fb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function U_(e){let{routeContext:t,match:n,children:r}=e,i=g.useContext(nm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(ts.Provider,{value:t},r)}function H_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Ue(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:p}=n,h=c.route.loader&&f[c.route.id]===void 0&&(!p||p[c.route.id]===void 0);if(c.route.lazy||h){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,f)=>{let p,h=!1,v=null,b=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,v=c.route.errorElement||B_,l&&(u<0&&f===0?(h=!0,b=null):u===f&&(h=!0,b=c.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,f+1)),x=()=>{let w;return p?w=v:h?w=b:c.route.Component?w=g.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,g.createElement(U_,{match:c,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?g.createElement(V_,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:x(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):x()},null)}var gb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(gb||{}),Fu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Fu||{});function W_(e){let t=g.useContext(nm);return t||Ue(!1),t}function q_(e){let t=g.useContext(N_);return t||Ue(!1),t}function K_(e){let t=g.useContext(ts);return t||Ue(!1),t}function vb(e){let t=K_(),n=t.matches[t.matches.length-1];return n.route.id||Ue(!1),n.route.id}function G_(){var e;let t=g.useContext(fb),n=q_(Fu.UseRouteError),r=vb(Fu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Q_(){let{router:e}=W_(gb.UseNavigateStable),t=vb(Fu.UseNavigateStable),n=g.useRef(!1);return pb(()=>{n.current=!0}),g.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ca({fromRouteId:t},s)))},[e,t])}const $v={};function Y_(e,t){$v[t]||($v[t]=!0,console.warn(t))}const zv=(e,t,n)=>Y_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function X_(e,t){e!=null&&e.v7_startTransition||zv("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&zv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const Z_="startTransition",Bv=Xd[Z_];function J_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=g.useRef();o.current==null&&(o.current=c_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=g.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},c=g.useCallback(f=>{d&&Bv?Bv(()=>u(f)):u(f)},[u,d]);return g.useLayoutEffect(()=>a.listen(c),[a,c]),g.useEffect(()=>X_(s),[s]),g.createElement(eP,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function op(e){Ue(!1)}function eP(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:s,static:o=!1,future:a}=e;Qa()&&Ue(!1);let l=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:l,navigator:s,static:o,future:Ca({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Ji(r));let{pathname:d="/",search:c="",hash:f="",state:p=null,key:h="default"}=r,v=g.useMemo(()=>{let b=tm(d,l);return b==null?null:{location:{pathname:b,search:c,hash:f,state:p,key:h},navigationType:i}},[l,d,c,f,p,h,i]);return v==null?null:g.createElement(es.Provider,{value:u},g.createElement(fc.Provider,{children:n,value:v}))}function tP(e){let{children:t,location:n}=e;return I_(ap(t),n)}new Promise(()=>{});function ap(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,i)=>{if(!g.isValidElement(r))return;let s=[...t,i];if(r.type===g.Fragment){n.push.apply(n,ap(r.props.children,s));return}r.type!==op&&Ue(!1),!r.props.index||!r.props.children||Ue(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ap(r.props.children,s)),n.push(o)}),n}/**
58
+ */function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ca.apply(this,arguments)}const nm=g.createContext(null),N_=g.createContext(null),es=g.createContext(null),fc=g.createContext(null),ts=g.createContext({outlet:null,matches:[],isDataRoute:!1}),fb=g.createContext(null);function M_(e,t){let{relative:n}=t===void 0?{}:t;Qa()||Ue(!1);let{basename:r,navigator:i}=g.useContext(es),{hash:s,pathname:o,search:a}=mb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Qr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Qa(){return g.useContext(fc)!=null}function Ya(){return Qa()||Ue(!1),g.useContext(fc).location}function pb(e){g.useContext(es).static||g.useLayoutEffect(e)}function hb(){let{isDataRoute:e}=g.useContext(ts);return e?Q_():L_()}function L_(){Qa()||Ue(!1);let e=g.useContext(nm),{basename:t,future:n,navigator:r}=g.useContext(es),{matches:i}=g.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(ub(i,n.v7_relativeSplatPath)),a=g.useRef(!1);return pb(()=>{a.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=cb(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Qr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,s,e])}function mb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(es),{matches:i}=g.useContext(ts),{pathname:s}=Ya(),o=JSON.stringify(ub(i,r.v7_relativeSplatPath));return g.useMemo(()=>cb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function I_(e,t){return $_(e,t)}function $_(e,t,n,r){Qa()||Ue(!1);let{navigator:i}=g.useContext(es),{matches:s}=g.useContext(ts),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ya(),d;if(t){var c;let b=typeof t=="string"?Ji(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||Ue(!1),d=b}else d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let h=p_(e,{pathname:p}),v=H_(h&&h.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Qr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Qr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&v?g.createElement(fc.Provider,{value:{location:Ca({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:$r.Pop}},v):v}function z_(){let e=G_(),t=D_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,null)}const B_=g.createElement(z_,null);class V_ extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(ts.Provider,{value:this.props.routeContext},g.createElement(fb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function U_(e){let{routeContext:t,match:n,children:r}=e,i=g.useContext(nm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(ts.Provider,{value:t},r)}function H_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Ue(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:p}=n,h=c.route.loader&&f[c.route.id]===void 0&&(!p||p[c.route.id]===void 0);if(c.route.lazy||h){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,f)=>{let p,h=!1,v=null,b=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,v=c.route.errorElement||B_,l&&(u<0&&f===0?(h=!0,b=null):u===f&&(h=!0,b=c.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,f+1)),x=()=>{let w;return p?w=v:h?w=b:c.route.Component?w=g.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,g.createElement(U_,{match:c,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?g.createElement(V_,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:x(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):x()},null)}var gb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(gb||{}),Fu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Fu||{});function W_(e){let t=g.useContext(nm);return t||Ue(!1),t}function q_(e){let t=g.useContext(N_);return t||Ue(!1),t}function K_(e){let t=g.useContext(ts);return t||Ue(!1),t}function vb(e){let t=K_(),n=t.matches[t.matches.length-1];return n.route.id||Ue(!1),n.route.id}function G_(){var e;let t=g.useContext(fb),n=q_(Fu.UseRouteError),r=vb(Fu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Q_(){let{router:e}=W_(gb.UseNavigateStable),t=vb(Fu.UseNavigateStable),n=g.useRef(!1);return pb(()=>{n.current=!0}),g.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ca({fromRouteId:t},s)))},[e,t])}const zv={};function Y_(e,t){zv[t]||(zv[t]=!0,console.warn(t))}const Bv=(e,t,n)=>Y_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function X_(e,t){e!=null&&e.v7_startTransition||Bv("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&Bv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const Z_="startTransition",Vv=Xd[Z_];function J_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=g.useRef();o.current==null&&(o.current=c_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=g.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},c=g.useCallback(f=>{d&&Vv?Vv(()=>u(f)):u(f)},[u,d]);return g.useLayoutEffect(()=>a.listen(c),[a,c]),g.useEffect(()=>X_(s),[s]),g.createElement(eP,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function op(e){Ue(!1)}function eP(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:s,static:o=!1,future:a}=e;Qa()&&Ue(!1);let l=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:l,navigator:s,static:o,future:Ca({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Ji(r));let{pathname:d="/",search:c="",hash:f="",state:p=null,key:h="default"}=r,v=g.useMemo(()=>{let b=tm(d,l);return b==null?null:{location:{pathname:b,search:c,hash:f,state:p,key:h},navigationType:i}},[l,d,c,f,p,h,i]);return v==null?null:g.createElement(es.Provider,{value:u},g.createElement(fc.Provider,{children:n,value:v}))}function tP(e){let{children:t,location:n}=e;return I_(ap(t),n)}new Promise(()=>{});function ap(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,i)=>{if(!g.isValidElement(r))return;let s=[...t,i];if(r.type===g.Fragment){n.push.apply(n,ap(r.props.children,s));return}r.type!==op&&Ue(!1),!r.props.index||!r.props.children||Ue(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ap(r.props.children,s)),n.push(o)}),n}/**
59
59
  * React Router DOM v6.28.0
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,7 +64,7 @@ Error generating stack: `+s.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lp.apply(this,arguments)}function nP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function rP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iP(e,t){return e.button===0&&(!t||t==="_self")&&!rP(e)}const sP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oP="6";try{window.__reactRouterVersion=oP}catch{}const aP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uP=g.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,f=nP(t,sP),{basename:p}=g.useContext(es),h,v=!1;if(typeof u=="string"&&lP.test(u)&&(h=u,aP))try{let w=new URL(window.location.href),E=u.startsWith("//")?new URL(w.protocol+u):new URL(u),T=tm(E.pathname,p);E.origin===w.origin&&T!=null?u=T+E.search+E.hash:v=!0}catch{}let b=M_(u,{relative:i}),m=cP(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:c});function x(w){r&&r(w),w.defaultPrevented||m(w)}return g.createElement("a",lp({},f,{href:h||b,onClick:v||s?r:x,ref:n,target:l}))});var Vv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Vv||(Vv={}));var Uv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Uv||(Uv={}));function cP(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=hb(),u=Ya(),d=mb(e,{relative:o});return g.useCallback(c=>{if(iP(c,n)){c.preventDefault();let f=r!==void 0?r:sp(u)===sp(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,r,i,n,e,s,o,a])}const dP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Hv=e=>{let t;const n=new Set,r=(d,c)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const p=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(dP?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},fP=e=>e?Hv(e):Hv;var yb={exports:{}},xb={},wb={exports:{}},bb={};/**
67
+ */function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lp.apply(this,arguments)}function nP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function rP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iP(e,t){return e.button===0&&(!t||t==="_self")&&!rP(e)}const sP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oP="6";try{window.__reactRouterVersion=oP}catch{}const aP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uP=g.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,f=nP(t,sP),{basename:p}=g.useContext(es),h,v=!1;if(typeof u=="string"&&lP.test(u)&&(h=u,aP))try{let w=new URL(window.location.href),E=u.startsWith("//")?new URL(w.protocol+u):new URL(u),T=tm(E.pathname,p);E.origin===w.origin&&T!=null?u=T+E.search+E.hash:v=!0}catch{}let b=M_(u,{relative:i}),m=cP(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:c});function x(w){r&&r(w),w.defaultPrevented||m(w)}return g.createElement("a",lp({},f,{href:h||b,onClick:v||s?r:x,ref:n,target:l}))});var Uv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Uv||(Uv={}));var Hv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hv||(Hv={}));function cP(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=hb(),u=Ya(),d=mb(e,{relative:o});return g.useCallback(c=>{if(iP(c,n)){c.preventDefault();let f=r!==void 0?r:sp(u)===sp(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,r,i,n,e,s,o,a])}const dP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Wv=e=>{let t;const n=new Set,r=(d,c)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const p=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(dP?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},fP=e=>e?Wv(e):Wv;var yb={exports:{}},xb={},wb={exports:{}},bb={};/**
68
68
  * @license React
69
69
  * use-sync-external-store-shim.production.min.js
70
70
  *
@@ -72,7 +72,7 @@ Error generating stack: `+s.message+`
72
72
  *
73
73
  * This source code is licensed under the MIT license found in the
74
74
  * LICENSE file in the root directory of this source tree.
75
- */var uo=g;function pP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hP=typeof Object.is=="function"?Object.is:pP,mP=uo.useState,gP=uo.useEffect,vP=uo.useLayoutEffect,yP=uo.useDebugValue;function xP(e,t){var n=t(),r=mP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return vP(function(){i.value=n,i.getSnapshot=t,wd(i)&&s({inst:i})},[e,n,t]),gP(function(){return wd(i)&&s({inst:i}),e(function(){wd(i)&&s({inst:i})})},[e]),yP(n),n}function wd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hP(e,n)}catch{return!0}}function wP(e,t){return t()}var bP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wP:xP;bb.useSyncExternalStore=uo.useSyncExternalStore!==void 0?uo.useSyncExternalStore:bP;wb.exports=bb;var SP=wb.exports;/**
75
+ */var uo=g;function pP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hP=typeof Object.is=="function"?Object.is:pP,mP=uo.useState,gP=uo.useEffect,vP=uo.useLayoutEffect,yP=uo.useDebugValue;function xP(e,t){var n=t(),r=mP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return vP(function(){i.value=n,i.getSnapshot=t,bd(i)&&s({inst:i})},[e,n,t]),gP(function(){return bd(i)&&s({inst:i}),e(function(){bd(i)&&s({inst:i})})},[e]),yP(n),n}function bd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hP(e,n)}catch{return!0}}function wP(e,t){return t()}var bP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wP:xP;bb.useSyncExternalStore=uo.useSyncExternalStore!==void 0?uo.useSyncExternalStore:bP;wb.exports=bb;var SP=wb.exports;/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim/with-selector.production.min.js
78
78
  *
@@ -80,7 +80,7 @@ Error generating stack: `+s.message+`
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var pc=g,kP=SP;function EP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TP=typeof Object.is=="function"?Object.is:EP,CP=kP.useSyncExternalStore,_P=pc.useRef,PP=pc.useEffect,jP=pc.useMemo,AP=pc.useDebugValue;xb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=_P(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=jP(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var h=o.value;if(i(h,p))return c=h}return c=p}if(h=c,TP(d,p))return h;var v=r(p);return i!==void 0&&i(h,v)?h:(d=p,c=v)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=CP(e,s[0],s[1]);return PP(function(){o.hasValue=!0,o.value=a},[a]),AP(a),a};yb.exports=xb;var RP=yb.exports;const OP=Yi(RP),Sb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:DP}=F,{useSyncExternalStoreWithSelector:FP}=OP;let Wv=!1;const NP=e=>e;function MP(e,t=NP,n){(Sb?"production":void 0)!=="production"&&n&&!Wv&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Wv=!0);const r=FP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return DP(r),r}const qv=e=>{(Sb?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?fP(e):e,n=(r,i)=>MP(t,r,i);return Object.assign(n,t),n},LP=e=>e?qv(e):qv,un=LP(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})}})),IP={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},Kv={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var kb={exports:{}};/*!
83
+ */var pc=g,kP=SP;function EP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var TP=typeof Object.is=="function"?Object.is:EP,CP=kP.useSyncExternalStore,_P=pc.useRef,PP=pc.useEffect,jP=pc.useMemo,AP=pc.useDebugValue;xb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=_P(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=jP(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var h=o.value;if(i(h,p))return c=h}return c=p}if(h=c,TP(d,p))return h;var v=r(p);return i!==void 0&&i(h,v)?h:(d=p,c=v)}var u=!1,d,c,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=CP(e,s[0],s[1]);return PP(function(){o.hasValue=!0,o.value=a},[a]),AP(a),a};yb.exports=xb;var RP=yb.exports;const OP=Yi(RP),Sb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:DP}=F,{useSyncExternalStoreWithSelector:FP}=OP;let qv=!1;const NP=e=>e;function MP(e,t=NP,n){(Sb?"production":void 0)!=="production"&&n&&!qv&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),qv=!0);const r=FP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return DP(r),r}const Kv=e=>{(Sb?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?fP(e):e,n=(r,i)=>MP(t,r,i);return Object.assign(n,t),n},LP=e=>e?Kv(e):Kv,cn=LP(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())},setSoundPath:t=>{e({soundPath:t})}})),IP={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},Gv={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var kb={exports:{}};/*!
84
84
  Copyright (c) 2018 Jed Watson.
85
85
  Licensed under the MIT License (MIT), see
86
86
  http://jedwatson.github.io/classnames
@@ -92,21 +92,21 @@ Error generating stack: `+s.message+`
92
92
  ${f}px !important;
93
93
  top: ${u}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(p)}},[t]),y.jsx(zP,{isPresent:t,childRef:i,sizeRef:s,children:g.cloneElement(e,{ref:i})})}const VP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=hc(UP),u=g.useId();let d=!0,c=g.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const p of l.values())if(!p)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(c={...c}),g.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),g.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=y.jsx(BP,{isPresent:n,anchorX:a,children:e})),y.jsx(mc.Provider,{value:c,children:e})};function UP(){return new Map}function Tb(e=!0){const t=g.useContext(mc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=g.useId();g.useEffect(()=>{if(e)return i(s)},[e]);const o=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Tl=e=>e.key||"";function Gv(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const Yr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Tb(o),d=g.useMemo(()=>Gv(e),[e]),c=o&&!l?[]:d.map(Tl),f=g.useRef(!0),p=g.useRef(d),h=hc(()=>new Map),[v,b]=g.useState(d),[m,x]=g.useState(d);Eb(()=>{f.current=!1,p.current=d;for(let T=0;T<m.length;T++){const C=Tl(m[T]);c.includes(C)?h.delete(C):h.get(C)!==!0&&h.set(C,!1)}},[m,c.length,c.join("-")]);const w=[];if(d!==v){let T=[...d];for(let C=0;C<m.length;C++){const _=m[C],k=Tl(_);c.includes(k)||(T.splice(C,0,_),w.push(_))}return s==="wait"&&w.length&&(T=w),x(Gv(T)),b(d),null}const{forceRender:E}=g.useContext(rm);return y.jsx(y.Fragment,{children:m.map(T=>{const C=Tl(T),_=o&&!l?!1:d===m||c.includes(C),k=()=>{if(h.has(C))h.set(C,!0);else return;let j=!0;h.forEach(R=>{R||(j=!1)}),j&&(E==null||E(),x(p.current),o&&(u==null||u()),r&&r())};return y.jsx(VP,{isPresent:_,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:_?void 0:k,anchorX:a,children:T},C)})})};function om(e,t){e.indexOf(t)===-1&&e.push(t)}function am(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let up=()=>{};const cp={skipAnimations:!1,useManualTiming:!1};function lm(e){let t;return()=>(t===void 0&&(t=e()),t)}const on=e=>e,_a=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class um{constructor(){this.subscriptions=[]}add(t){return om(this.subscriptions,t),()=>am(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zn=e=>e*1e3,Bn=e=>e/1e3;function Cb(e,t){return t?e*(1e3/t):0}const HP=lm(()=>window.ScrollTimeline!==void 0);class WP{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(HP()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class qP extends WP{then(t,n){return this.finished.finally(t).then(()=>{})}}const Qv={value:null,addProjectionMetrics:null},cm=e=>Array.isArray(e)&&typeof e[0]=="number",KP={};function GP(e,t){const n=lm(e);return()=>KP[t]??n()}const Pa=GP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_b=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Uo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Uo([0,.65,.55,1]),circOut:Uo([.55,0,1,.45]),backIn:Uo([.31,.01,.66,-.59]),backOut:Uo([.33,1.53,.69,.99])};function Pb(e,t){if(e)return typeof e=="function"&&Pa()?_b(e,t):cm(e)?Uo(e):Array.isArray(e)?e.map(n=>Pb(n,t)||dp.easeOut):dp[e]}function QP(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const c=Pb(a,i);return Array.isArray(c)&&(d.easing=c),e.animate(d,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function dm(e){return typeof e=="function"&&"applyToOptions"in e}function fm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Nu=2e4;function pm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Nu;)t+=n,r=e.next(t);return t>=Nu?1/0:t}function YP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(pm(r),Nu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Bn(i)}}function jb(e){return!!(typeof e=="function"&&Pa()||!e||typeof e=="string"&&(e in dp||Pa())||cm(e)||Array.isArray(e)&&e.every(jb))}function Yv(e,t){e.timeline=t,e.onfinish=null}const Cl=["read","resolveKeyframes","update","preRender","render","postRender"];function XP(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){o.has(c)&&(d.schedule(c),e()),l++,c(a)}const d={schedule:(c,f=!1,p=!1)=>{const v=p&&i?n:r;return f&&o.add(c),v.has(c)||v.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&Qv.value&&Qv.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(c))}};return d}const ZP=40;function Ab(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Cl.reduce((m,x)=>(m[x]=XP(s,t?x:void 0),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:f}=o,p=()=>{const m=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,ZP),1),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),d.process(i),c.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},h=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Cl.reduce((m,x)=>{const w=o[x];return m[x]=(E,T=!1,C=!1)=>(n||h(),w.schedule(E,T,C)),m},{}),cancel:m=>{for(let x=0;x<Cl.length;x++)o[Cl[x]].cancel(m)},state:i,steps:o}}const{schedule:hm,cancel:G$}=Ab(queueMicrotask,!1),{schedule:we,cancel:ni,state:nt,steps:bd}=Ab(typeof requestAnimationFrame<"u"?requestAnimationFrame:on,!0);let Yl;function JP(){Yl=void 0}const Vn={now:()=>(Yl===void 0&&Vn.set(nt.isProcessing||cp.useManualTiming?nt.timestamp:performance.now()),Yl),set:e=>{Yl=e,queueMicrotask(JP)}},mn={x:!1,y:!1};function Rb(){return mn.x||mn.y}function ej(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function tj(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ob(e,t){const n=tj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Xv(e){return!(e.pointerType==="touch"||Rb())}function nj(e,t,n={}){const[r,i,s]=Ob(e,n),o=a=>{if(!Xv(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=c=>{Xv(c)&&(u(c),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Db=(e,t)=>t?e===t?!0:Db(e,t.parentElement):!1,mm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,rj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ij(e){return rj.has(e.tagName)||e.tabIndex!==-1}const Ho=new WeakSet;function Zv(e){return t=>{t.key==="Enter"&&e(t)}}function Sd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Zv(()=>{if(Ho.has(n))return;Sd(n,"down");const i=Zv(()=>{Sd(n,"up")}),s=()=>Sd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Jv(e){return mm(e)&&!Rb()}function oj(e,t,n={}){const[r,i,s]=Ob(e,n),o=a=>{const l=a.currentTarget;if(!Jv(a)||Ho.has(l))return;Ho.add(l);const u=t(l,a),d=(p,h)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!Jv(p)||!Ho.has(l))&&(Ho.delete(l),typeof u=="function"&&u(p,{success:h}))},c=p=>{d(p,l===window||l===document||n.useGlobalTarget||Db(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>sj(u,i)),!ij(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const e0=30,aj=e=>!isNaN(parseFloat(e));class lj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Vn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Vn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new um);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Vn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>e0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,e0);return Cb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ja(e,t){return new lj(e,t)}const Fb=g.createContext({strict:!1}),t0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},co={};for(const e in t0)co[e]={isEnabled:t=>t0[e].some(n=>!!t[n])};function uj(e){for(const t in e)co[t]={...co[t],...e[t]}}const cj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Mu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cj.has(e)}let Nb=e=>!Mu(e);function dj(e){e&&(Nb=t=>t.startsWith("on")?!Mu(t):e(t))}try{dj(require("@emotion/is-prop-valid").default)}catch{}function fj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Nb(i)||n===!0&&Mu(i)||!t&&!Mu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function pj(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const gc=g.createContext({});function vc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Aa(e){return typeof e=="string"||Array.isArray(e)}const gm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vm=["initial",...gm];function yc(e){return vc(e.animate)||vm.some(t=>Aa(e[t]))}function Mb(e){return!!(yc(e)||e.variants)}function hj(e,t){if(yc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Aa(n)?n:void 0,animate:Aa(r)?r:void 0}}return e.inherit!==!1?t:{}}function mj(e){const{initial:t,animate:n}=hj(e,g.useContext(gc));return g.useMemo(()=>({initial:t,animate:n}),[n0(t),n0(n)])}function n0(e){return Array.isArray(e)?e.join(" "):e}const gj=Symbol.for("motionComponentSymbol");function js(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vj(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):js(n)&&(n.current=r))},[t])}const ym=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yj="framerAppearId",Lb="data-"+ym(yj),Ib=g.createContext({});function xj(e,t,n,r,i){var v,b;const{visualElement:s}=g.useContext(gc),o=g.useContext(Fb),a=g.useContext(mc),l=g.useContext(sm).reducedMotion,u=g.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=u.current,c=g.useContext(Ib);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&wj(u.current,n,i,c);const f=g.useRef(!1);g.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[Lb],h=g.useRef(!!p&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Eb(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),hm.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),g.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)==null||m.call(window,p)}),h.current=!1))}),d}function wj(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:$b(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&js(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function $b(e){if(e)return e.options.allowProjection!==!1?e.projection:$b(e.parent)}function bj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&uj(e);function s(a,l){let u;const d={...g.useContext(sm),...a,layoutId:Sj(a)},{isStatic:c}=d,f=mj(a),p=r(a,c);if(!c&&im){kj();const h=Ej(d);u=h.MeasureLayout,f.visualElement=xj(i,p,d,t,h.ProjectionNode)}return y.jsxs(gc.Provider,{value:f,children:[u&&f.visualElement?y.jsx(u,{visualElement:f.visualElement,...d}):null,n(i,a,vj(p,f.visualElement,l),p,c,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=g.forwardRef(s);return o[gj]=i,o}function Sj({layoutId:e}){const t=g.useContext(rm).id;return t&&e!==void 0?t+"-"+e:e}function kj(e,t){g.useContext(Fb).strict}function Ej(e){const{drag:t,layout:n}=co;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const zb=e=>t=>typeof t=="string"&&t.startsWith(e),xm=zb("--"),Tj=zb("var(--"),wm=e=>Tj(e)?Cj.test(e.split("/*")[0].trim()):!1,Cj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ra={};function _j(e){for(const t in e)Ra[t]=e[t],xm(t)&&(Ra[t].isCSSVariable=!0)}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ns=new Set(wo);function Bb(e,{layout:t,layoutId:n}){return ns.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ra[e]||e==="opacity")}const ft=e=>!!(e&&e.getVelocity),Vb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fr=(e,t,n)=>n>t?t:n<e?e:n,bo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Oa={...bo,transform:e=>fr(0,1,e)},_l={...bo,default:1},Xa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sr=Xa("deg"),Un=Xa("%"),K=Xa("px"),Pj=Xa("vh"),jj=Xa("vw"),r0={...Un,parse:e=>Un.parse(e)/100,transform:e=>Un.transform(e*100)},Aj={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},Rj={rotate:Sr,rotateX:Sr,rotateY:Sr,rotateZ:Sr,scale:_l,scaleX:_l,scaleY:_l,scaleZ:_l,skew:Sr,skewX:Sr,skewY:Sr,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Oa,originX:r0,originY:r0,originZ:K},i0={...bo,transform:Math.round},bm={...Aj,...Rj,zIndex:i0,size:K,fillOpacity:Oa,strokeOpacity:Oa,numOctaves:i0},Oj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dj=wo.length;function Fj(e,t,n){let r="",i=!0;for(let s=0;s<Dj;s++){const o=wo[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Vb(a,bm[o]);if(!l){i=!1;const d=Oj[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Sm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ns.has(l)){o=!0;continue}else if(xm(l)){i[l]=u;continue}else{const d=Vb(u,bm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Fj(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${u} ${d}`}}const km=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ub(e,t,n){for(const r in t)!ft(t[r])&&!Bb(r,n)&&(e[r]=t[r])}function Nj({transformTemplate:e},t){return g.useMemo(()=>{const n=km();return Sm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Mj(e,t){const n=e.style||{},r={};return Ub(r,n,e),Object.assign(r,Nj(e,t)),r}function Lj(e,t){const n={},r=Mj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ij=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Em(e){return typeof e!="string"||e.includes("-")?!1:!!(Ij.indexOf(e)>-1||/[A-Z]/u.test(e))}const $j={offset:"stroke-dashoffset",array:"stroke-dasharray"},zj={offset:"strokeDashoffset",array:"strokeDasharray"};function Bj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?$j:zj;e[s.offset]=K.transform(-r);const o=K.transform(t),a=K.transform(n);e[s.array]=`${o} ${a}`}function s0(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function Vj(e,t,n){const r=s0(t,e.x,e.width),i=s0(n,e.y,e.height);return`${r} ${i}`}function Tm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,c){if(Sm(e,u,c),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=Vj(h,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Bj(f,o,a,l,!1)}const Hb=()=>({...km(),attrs:{}}),Cm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Uj(e,t,n,r){const i=g.useMemo(()=>{const s=Hb();return Tm(s,t,Cm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Ub(s,e.style,e),i.style={...s,...i.style}}return i}function Hj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Em(n)?Uj:Lj)(r,s,o,n),u=fj(r,typeof n=="string",e),d=n!==g.Fragment?{...u,...l,ref:i}:{},{children:c}=r,f=g.useMemo(()=>ft(c)?c.get():c,[c]);return g.createElement(n,{...d,children:f})}}function o0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _m(e,t,n,r){if(typeof t=="function"){const[i,s]=o0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=o0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const fp=e=>Array.isArray(e),Wj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),qj=e=>fp(e)?e[e.length-1]||0:e;function Xl(e){const t=ft(e)?e.get():e;return Wj(t)?t.toValue():t}function Kj({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:Gj(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Wb=e=>(t,n)=>{const r=g.useContext(gc),i=g.useContext(mc),s=()=>Kj(e,t,r,i);return n?s():hc(s)};function Gj(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=Xl(s[f]);let{initial:o,animate:a}=e;const l=yc(e),u=Mb(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const c=d?a:o;if(c&&typeof c!="boolean"&&!vc(c)){const f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){const h=_m(e,f[p]);if(h){const{transitionEnd:v,transition:b,...m}=h;for(const x in m){let w=m[x];if(Array.isArray(w)){const E=d?w.length-1:0;w=w[E]}w!==null&&(i[x]=w)}for(const x in v)i[x]=v[x]}}}return i}function Pm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ft(r[o])||t.style&&ft(t.style[o])||Bb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Qj={useVisualState:Wb({scrapeMotionValuesFromProps:Pm,createRenderState:km})};function qb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Kb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Gb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Qb(e,t,n,r){Kb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Gb.has(i)?i:ym(i),t.attrs[i])}function Yb(e,t,n){const r=Pm(e,t,n);for(const i in e)if(ft(e[i])||ft(t[i])){const s=wo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const a0=["x","y","width","height","cx","cy","r"],Yj={useVisualState:Wb({scrapeMotionValuesFromProps:Yb,createRenderState:Hb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(ns.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<a0.length;a++){const l=a0[a];e[l]!==t[l]&&(o=!0)}o&&we.read(()=>{qb(n,r),we.render(()=>{Tm(r,i,Cm(n.tagName),e.transformTemplate),Qb(n,r)})})}})};function Xj(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Em(r)?Yj:Qj,preloadedFeatures:e,useRender:Hj(i),createVisualElement:t,Component:r};return bj(o)}}function Da(e,t,n){const r=e.getProps();return _m(r,t,n!==void 0?n:r.custom,e)}const Xb=new Set(["width","height","top","left","right","bottom",...wo]);function Zj(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ja(n))}function Jj(e,t){const n=Da(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=qj(s[o]);Zj(e,o,a)}}function eA(e){return!!(ft(e)&&e.add)}function pp(e,t){const n=e.getValue("willChange");if(eA(n))return n.add(t);if(!n&&cp.WillChange){const r=new cp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Zb(e){return e.props[Lb]}const Jb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,tA=1e-7,nA=12;function rA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Jb(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>tA&&++a<nA);return o}function Za(e,t,n,r){if(e===t&&n===r)return on;const i=s=>rA(s,0,1,e,n);return s=>s===0||s===1?s:Jb(i(s),t,r)}const eS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tS=e=>t=>1-e(1-t),nS=Za(.33,1.53,.69,.99),jm=tS(nS),rS=eS(jm),iS=e=>(e*=2)<1?.5*jm(e):.5*(2-Math.pow(2,-10*(e-1))),Am=e=>1-Math.sin(Math.acos(e)),sS=tS(Am),oS=eS(Am),aS=e=>/^0[^.\s]+$/u.test(e);function iA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||aS(e):!0}const ta=e=>Math.round(e*1e5)/1e5,Rm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sA(e){return e==null}const oA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Om=(e,t)=>n=>!!(typeof n=="string"&&oA.test(n)&&n.startsWith(e)||t&&!sA(n)&&Object.prototype.hasOwnProperty.call(n,t)),lS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Rm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},aA=e=>fr(0,255,e),kd={...bo,transform:e=>Math.round(aA(e))},Ci={test:Om("rgb","red"),parse:lS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kd.transform(e)+", "+kd.transform(t)+", "+kd.transform(n)+", "+ta(Oa.transform(r))+")"};function lA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const hp={test:Om("#"),parse:lA,transform:Ci.transform},As={test:Om("hsl","hue"),parse:lS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Un.transform(ta(t))+", "+Un.transform(ta(n))+", "+ta(Oa.transform(r))+")"},ct={test:e=>Ci.test(e)||hp.test(e)||As.test(e),parse:e=>Ci.test(e)?Ci.parse(e):As.test(e)?As.parse(e):hp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ci.transform(e):As.transform(e)},uA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Rm))==null?void 0:t.length)||0)+(((n=e.match(uA))==null?void 0:n.length)||0)>0}const uS="number",cS="color",dA="var",fA="var(",l0="${}",pA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(pA,l=>(ct.test(l)?(r.color.push(s),i.push(cS),n.push(ct.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(dA),n.push(l)):(r.number.push(s),i.push(uS),n.push(parseFloat(l))),++s,l0)).split(l0);return{values:n,split:a,indexes:r,types:i}}function dS(e){return Fa(e).values}function fS(e){const{split:t,types:n}=Fa(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===uS?s+=ta(i[o]):a===cS?s+=ct.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function mA(e){const t=dS(e);return fS(e)(t.map(hA))}const ri={test:cA,parse:dS,createTransformer:fS,getAnimatableNone:mA},gA=new Set(["brightness","contrast","saturate","opacity"]);function vA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Rm)||[];if(!r)return e;const i=n.replace(r,"");let s=gA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,mp={...ri,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(vA).join(" "):e}},xA={...bm,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:mp,WebkitFilter:mp},pS=e=>xA[e];function hS(e,t){let n=pS(e);return n!==mp&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wA=new Set(["auto","none","0"]);function bA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!wA.has(s)&&Fa(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=hS(n,i)}const _i=e=>e*180/Math.PI,gp=e=>{const t=_i(Math.atan2(e[1],e[0]));return vp(t)},SA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gp,rotateZ:gp,skewX:e=>_i(Math.atan(e[1])),skewY:e=>_i(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vp=e=>(e=e%360,e<0&&(e+=360),e),u0=gp,c0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),d0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),kA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:c0,scaleY:d0,scale:e=>(c0(e)+d0(e))/2,rotateX:e=>vp(_i(Math.atan2(e[6],e[5]))),rotateY:e=>vp(_i(Math.atan2(-e[2],e[0]))),rotateZ:u0,rotate:u0,skewX:e=>_i(Math.atan(e[4])),skewY:e=>_i(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function f0(e){return e.includes("scale")?1:0}function yp(e,t){if(!e||e==="none")return f0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=kA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=SA,i=a}if(!i)return f0(t);const s=r[t],o=i[1].split(",").map(TA);return typeof s=="function"?s(o):o[s]}const EA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return yp(n,t)};function TA(e){return parseFloat(e.trim())}const p0=e=>e===bo||e===K,CA=new Set(["x","y","z"]),_A=wo.filter(e=>!CA.has(e));function PA(e){const t=[];return _A.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const fo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>yp(t,"x"),y:(e,{transform:t})=>yp(t,"y")};fo.translateX=fo.x;fo.translateY=fo.y;const $i=new Set;let xp=!1,wp=!1;function mS(){if(wp){const e=Array.from($i).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=PA(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wp=!1,xp=!1,$i.forEach(e=>e.complete()),$i.clear()}function gS(){$i.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wp=!0)})}function jA(){gS(),mS()}class Dm{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?($i.add(this),xp||(xp=!0,we.read(gS),we.resolveKeyframes(mS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),$i.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$i.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const vS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function yS(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return vS(o)?parseFloat(o):o}return wm(i)?yS(i,t,n+1):i}const xS=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},wS=[bo,K,Un,Sr,jj,Pj,OA],h0=e=>wS.find(xS(e));class bS extends Dm{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),wm(u))){const d=yS(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Xb.has(r)||t.length!==2)return;const[i,s]=t,o=h0(i),a=h0(s);if(o!==a)if(p0(o)&&p0(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)iA(t[i])&&r.push(i);r.length&&bA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=fo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const m0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ri.test(e)||e==="0")&&!e.startsWith("url("));function DA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function FA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=m0(i,t),a=m0(s,t);return!o||!a?!1:DA(e)||(n==="spring"||dm(n))&&r}const NA=e=>e!==null;function xc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(NA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const MA=40;class SS{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Vn.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>MA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&jA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Vn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!FA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(xc(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Pe=(e,t,n)=>e+(t-e)*n;function Ed(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function LA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ed(l,a,e+1/3),s=Ed(l,a,e),o=Ed(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Lu(e,t){return n=>n>0?t:e}const Td=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},IA=[hp,Ci,As],$A=e=>IA.find(t=>t.test(e));function g0(e){const t=$A(e);if(!t)return!1;let n=t.parse(e);return t===As&&(n=LA(n)),n}const v0=(e,t)=>{const n=g0(e),r=g0(t);if(!n||!r)return Lu(e,t);const i={...n};return s=>(i.red=Td(n.red,r.red,s),i.green=Td(n.green,r.green,s),i.blue=Td(n.blue,r.blue,s),i.alpha=Pe(n.alpha,r.alpha,s),Ci.transform(i))},zA=(e,t)=>n=>t(e(n)),Ja=(...e)=>e.reduce(zA),bp=new Set(["none","hidden"]);function BA(e,t){return bp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function VA(e,t){return n=>Pe(e,t,n)}function Fm(e){return typeof e=="number"?VA:typeof e=="string"?wm(e)?Lu:ct.test(e)?v0:WA:Array.isArray(e)?kS:typeof e=="object"?ct.test(e)?v0:UA:Lu}function kS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Fm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function UA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Fm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function HA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const WA=(e,t)=>{const n=ri.createTransformer(t),r=Fa(e),i=Fa(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?bp.has(e)&&!i.values.length||bp.has(t)&&!r.values.length?BA(e,t):Ja(kS(HA(r,i),i.values),n):Lu(e,t)};function ES(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pe(e,t,n):Fm(e)(e,t)}const qA=5;function TS(e,t,n){const r=Math.max(t-qA,0);return Cb(n-e(r),t-r)}const Oe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Cd=.001;function KA({duration:e=Oe.duration,bounce:t=Oe.bounce,velocity:n=Oe.velocity,mass:r=Oe.mass}){let i,s,o=1-t;o=fr(Oe.minDamping,Oe.maxDamping,o),e=fr(Oe.minDuration,Oe.maxDuration,Bn(e)),o<1?(i=u=>{const d=u*o,c=d*e,f=d-n,p=Sp(u,o),h=Math.exp(-c);return Cd-f/p*h},s=u=>{const c=u*o*e,f=c*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-c),v=Sp(Math.pow(u,2),o);return(-i(u)+Cd>0?-1:1)*((f-p)*h)/v}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-Cd+d*c},s=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=QA(i,s,a);if(e=zn(e),isNaN(l))return{stiffness:Oe.stiffness,damping:Oe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const GA=12;function QA(e,t,n){let r=n;for(let i=1;i<GA;i++)r=r-e(r)/t(r);return r}function Sp(e,t){return e*Math.sqrt(1-t*t)}const YA=["duration","bounce"],XA=["stiffness","damping","mass"];function y0(e,t){return t.some(n=>e[n]!==void 0)}function ZA(e){let t={velocity:Oe.velocity,stiffness:Oe.stiffness,damping:Oe.damping,mass:Oe.mass,isResolvedFromDuration:!1,...e};if(!y0(e,XA)&&y0(e,YA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*fr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Oe.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Oe.mass},t.isResolvedFromDuration=!0}return t}function Iu(e=Oe.visualDuration,t=Oe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:c,velocity:f,isResolvedFromDuration:p}=ZA({...n,velocity:-Bn(n.velocity||0)}),h=f||0,v=u/(2*Math.sqrt(l*d)),b=o-s,m=Bn(Math.sqrt(l/d)),x=Math.abs(b)<5;r||(r=x?Oe.restSpeed.granular:Oe.restSpeed.default),i||(i=x?Oe.restDelta.granular:Oe.restDelta.default);let w;if(v<1){const T=Sp(m,v);w=C=>{const _=Math.exp(-v*m*C);return o-_*((h+v*m*b)/T*Math.sin(T*C)+b*Math.cos(T*C))}}else if(v===1)w=T=>o-Math.exp(-m*T)*(b+(h+m*b)*T);else{const T=m*Math.sqrt(v*v-1);w=C=>{const _=Math.exp(-v*m*C),k=Math.min(T*C,300);return o-_*((h+v*m*b)*Math.sinh(k)+T*b*Math.cosh(k))/T}}const E={calculatedDuration:p&&c||null,next:T=>{const C=w(T);if(p)a.done=T>=c;else{let _=0;v<1&&(_=T===0?zn(h):TS(w,T,C));const k=Math.abs(_)<=r,j=Math.abs(o-C)<=i;a.done=k&&j}return a.value=a.done?o:C,a},toString:()=>{const T=Math.min(pm(E),Nu),C=_b(_=>E.next(T*_).value,T,30);return T+"ms "+C},toTransition:()=>{}};return E}Iu.applyToOptions=e=>{const t=YP(e,100,Iu);return e.ease=Pa()?t.ease:"easeOut",e.duration=zn(t.duration),e.type="keyframes",e};function x0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:d}){const c=e[0],f={done:!1,value:c},p=k=>a!==void 0&&k<a||l!==void 0&&k>l,h=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let v=n*t;const b=c+v,m=o===void 0?b:o(b);m!==b&&(v=m-c);const x=k=>-v*Math.exp(-k/r),w=k=>m+x(k),E=k=>{const j=x(k),R=w(k);f.done=Math.abs(j)<=u,f.value=f.done?m:R};let T,C;const _=k=>{p(f.value)&&(T=k,C=Iu({keyframes:[f.value,h(f.value)],velocity:TS(w,k,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return _(0),{calculatedDuration:null,next:k=>{let j=!1;return!C&&T===void 0&&(j=!0,E(k),_(k)),T!==void 0&&k>=T?C.next(k-T):(!j&&E(k),f)}}}const JA=Za(.42,0,1,1),eR=Za(0,0,.58,1),CS=Za(.42,0,.58,1),tR=e=>Array.isArray(e)&&typeof e[0]!="number",w0={linear:on,easeIn:JA,easeInOut:CS,easeOut:eR,circIn:Am,circInOut:oS,circOut:sS,backIn:jm,backInOut:rS,backOut:nS,anticipate:iS},b0=e=>{if(cm(e)){up(e.length===4);const[t,n,r,i]=e;return Za(t,n,r,i)}else if(typeof e=="string")return up(w0[e]!==void 0),w0[e];return e};function nR(e,t,n){const r=[],i=n||ES,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||on:t;a=Ja(l,a)}r.push(a)}return r}function rR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(up(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=nR(t,r,i),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(d<e[c+1]);c++);const f=_a(e[c],e[c+1],d);return a[c](f)};return n?d=>u(fr(e[0],e[s-1],d)):u}function iR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=_a(0,t,r);e.push(Pe(n,1,i))}}function sR(e){const t=[0];return iR(t,e.length-1),t}function oR(e,t){return e.map(n=>n*t)}function aR(e,t){return e.map(()=>t||CS).splice(0,e.length-1)}function $u({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=tR(r)?r.map(b0):b0(r),s={done:!1,value:t[0]},o=oR(n&&n.length===t.length?n:sR(t),e),a=rR(o,t,{ease:Array.isArray(i)?i:aR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const lR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>we.update(t,!0),stop:()=>ni(t),now:()=>nt.isProcessing?nt.timestamp:Vn.now()}},uR={decay:x0,inertia:x0,tween:$u,keyframes:$u,spring:Iu},cR=e=>e/100;class Nm extends SS{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Dm,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=dm(n)?n:uR[n]||$u;let l,u;a!==$u&&typeof t[0]!="number"&&(l=Ja(cR,ES(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=pm(d));const{calculatedDuration:c}=d,f=c+i,p=f*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:p,repeatType:h,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,E=s;if(p){const k=Math.min(this.currentTime,d)/c;let j=Math.floor(k),R=k%1;!R&&k>=1&&(R=1),R===1&&j--,j=Math.min(j,p+1),!!(j%2)&&(h==="reverse"?(R=1-R,v&&(R-=v/c)):h==="mirror"&&(E=o)),w=fr(0,1,R)*c}const T=x?{done:!1,value:l[0]}:E.next(w);a&&(T.value=a(T.value));let{done:C}=T;!x&&u!==null&&(C=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return _&&i!==void 0&&(T.value=xc(l,this.options,i)),b&&b(T.value),_&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Bn(t.calculatedDuration):0}get time(){return Bn(this.currentTime)}set time(t){t=zn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Bn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=lR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const dR=new Set(["opacity","clipPath","filter","transform"]),fR=lm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),zu=10,pR=2e4;function hR(e){return dm(e.type)||e.type==="spring"||!jb(e.ease)}function mR(e,t){const n=new Nm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<pR;)r=n.sample(s),i.push(r.value),s+=zu;return{times:void 0,keyframes:i,duration:s-zu,ease:"linear"}}const _S={anticipate:iS,backInOut:rS,circInOut:oS};function gR(e){return e in _S}class S0 extends SS{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new bS(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Pa()&&gR(s)&&(s=_S[s]),hR(this.options)){const{onComplete:c,onUpdate:f,motionValue:p,element:h,...v}=this.options,b=mR(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=QP(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Yv(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:c}=this.options;a.set(xc(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Bn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Bn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=zn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return on;const{animation:r}=n;Yv(r,t)}return on}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:c,element:f,...p}=this.options,h=new Nm({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),v=zn(this.time);u.setWithVelocity(h.sample(v-zu).value,h.sample(v).value,zu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return fR()&&r&&dR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const vR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xR={type:"keyframes",duration:.8},wR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bR=(e,{keyframes:t})=>t.length>2?xR:ns.has(e)?e.startsWith("scale")?yR(t[1]):vR:wR;function SR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Mm=(e,t,n,r={},i,s)=>o=>{const a=fm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-zn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};SR(a)||(d={...d,...bR(e,d)}),d.duration&&(d.duration=zn(d.duration)),d.repeatDelay&&(d.repeatDelay=zn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let c=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(c=!0)),d.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const f=xc(d.keyframes,a);if(f!==void 0)return we.update(()=>{d.onUpdate(f),d.onComplete()}),new qP([])}return!s&&S0.supports(d)?new S0(d):new Nm(d)};function kR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function PS(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const c=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||u&&kR(u,d))continue;const p={delay:n,...fm(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const b=Zb(e);if(b){const m=window.MotionHandoffAnimation(b,d,we);m!==null&&(p.startTime=m,h=!0)}}pp(e,d),c.start(Mm(d,c,f,e.shouldReduceMotion&&Xb.has(d)?{type:!1}:p,e,h));const v=c.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{we.update(()=>{o&&Jj(e,o)})}),l}function kp(e,t,n={}){var l;const r=Da(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(PS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:f}=i;return ER(e,t,d+u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,d]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function ER(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(TR).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(kp(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function TR(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>kp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=kp(e,t,n);else{const i=typeof t=="function"?Da(e,t,n.custom):t;r=Promise.all(PS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function jS(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const _R=vm.length;function AS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?AS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<_R;n++){const r=vm[n],i=e.props[r];(Aa(i)||i===!1)&&(t[r]=i)}return t}const PR=[...gm].reverse(),jR=gm.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=k0(),r=!0;const i=l=>(u,d)=>{var f;const c=Da(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(c){const{transition:p,transitionEnd:h,...v}=c;u={...u,...v,...h}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,d=AS(e.parent)||{},c=[],f=new Set;let p={},h=1/0;for(let b=0;b<jR;b++){const m=PR[b],x=n[m],w=u[m]!==void 0?u[m]:d[m],E=Aa(w),T=m===l?x.isActive:null;T===!1&&(h=b);let C=w===d[m]&&w!==u[m]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...p},!x.isActive&&T===null||!w&&!x.prevProp||vc(w)||typeof w=="boolean")continue;const _=OR(x.prevProp,w);let k=_||m===l&&x.isActive&&!C&&E||b>h&&E,j=!1;const R=Array.isArray(w)?w:[w];let M=R.reduce(i(m),{});T===!1&&(M={});const{prevResolvedValues:G={}}=x,ne={...G,...M},J=X=>{k=!0,f.has(X)&&(j=!0,f.delete(X)),x.needsAnimating[X]=!0;const D=e.getValue(X);D&&(D.liveStyle=!1)};for(const X in ne){const D=M[X],L=G[X];if(p.hasOwnProperty(X))continue;let U=!1;fp(D)&&fp(L)?U=!jS(D,L):U=D!==L,U?D!=null?J(X):f.add(X):D!==void 0&&f.has(X)?J(X):x.protectedKeys[X]=!0}x.prevProp=w,x.prevResolvedValues=M,x.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&_)||j)&&c.push(...R.map(X=>({animation:X,options:{type:m}})))}if(f.size){const b={};if(typeof u.initial!="boolean"){const m=Da(e,Array.isArray(u.initial)?u.initial[0]:u.initial);m&&m.transition&&(b.transition=m.transition)}f.forEach(m=>{const x=e.getBaseTarget(m),w=e.getValue(m);w&&(w.liveStyle=!0),b[m]=x??null}),c.push({animation:b})}let v=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=k0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jS(t,e):!1}function hi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function k0(){return{animate:hi(!0),whileInView:hi(),whileHover:hi(),whileTap:hi(),whileDrag:hi(),whileFocus:hi(),exit:hi()}}class li{constructor(t){this.isMounted=!1,this.node=t}update(){}}class DR extends li{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let FR=0;class NR extends li{constructor(){super(...arguments),this.id=FR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const MR={animation:{Feature:DR},exit:{Feature:NR}};function Na(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function el(e){return{point:{x:e.pageX,y:e.pageY}}}const LR=e=>t=>mm(t)&&e(t,el(t));function na(e,t,n,r){return Na(e,t,LR(n),r)}function RS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function IR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $R(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const OS=1e-4,zR=1-OS,BR=1+OS,DS=.01,VR=0-DS,UR=0+DS;function vt(e){return e.max-e.min}function HR(e,t,n){return Math.abs(e-t)<=n}function E0(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=vt(n)/vt(t),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zR&&e.scale<=BR||isNaN(e.scale))&&(e.scale=1),(e.translate>=VR&&e.translate<=UR||isNaN(e.translate))&&(e.translate=0)}function ra(e,t,n,r){E0(e.x,t.x,n.x,r?r.originX:void 0),E0(e.y,t.y,n.y,r?r.originY:void 0)}function T0(e,t,n){e.min=n.min+t.min,e.max=e.min+vt(t)}function WR(e,t,n){T0(e.x,t.x,n.x),T0(e.y,t.y,n.y)}function C0(e,t,n){e.min=t.min-n.min,e.max=e.min+vt(t)}function ia(e,t,n){C0(e.x,t.x,n.x),C0(e.y,t.y,n.y)}const _0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rs=()=>({x:_0(),y:_0()}),P0=()=>({min:0,max:0}),Ne=()=>({x:P0(),y:P0()});function Yt(e){return[e("x"),e("y")]}function _d(e){return e===void 0||e===1}function Ep({scale:e,scaleX:t,scaleY:n}){return!_d(e)||!_d(t)||!_d(n)}function yi(e){return Ep(e)||FS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function FS(e){return j0(e.x)||j0(e.y)}function j0(e){return e&&e!=="0%"}function Bu(e,t,n){const r=e-n,i=t*r;return n+i}function A0(e,t,n,r,i){return i!==void 0&&(e=Bu(e,i,r)),Bu(e,n,r)+t}function Tp(e,t=0,n=1,r,i){e.min=A0(e.min,t,n,r,i),e.max=A0(e.max,t,n,r,i)}function NS(e,{x:t,y:n}){Tp(e.x,t.translate,t.scale,t.originPoint),Tp(e.y,n.translate,n.scale,n.originPoint)}const R0=.999999999999,O0=1.0000000000001;function qR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,NS(e,o)),r&&yi(s.latestValues)&&Ds(e,s.latestValues))}t.x<O0&&t.x>R0&&(t.x=1),t.y<O0&&t.y>R0&&(t.y=1)}function Os(e,t){e.min=e.min+t,e.max=e.max+t}function D0(e,t,n,r,i=.5){const s=Pe(e.min,e.max,i);Tp(e,t,n,s,r)}function Ds(e,t){D0(e.x,t.x,t.scaleX,t.scale,t.originX),D0(e.y,t.y,t.scaleY,t.scale,t.originY)}function MS(e,t){return RS($R(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=MS(e,n),{scroll:i}=t;return i&&(Os(r.x,i.offset.x),Os(r.y,i.offset.y)),r}const LS=({current:e})=>e?e.ownerDocument.defaultView:null,F0=(e,t)=>Math.abs(e-t);function GR(e,t){const n=F0(e.x,t.x),r=F0(e.y,t.y);return Math.sqrt(n**2+r**2)}class IS{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=jd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=GR(c.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:h}=c,{timestamp:v}=nt;this.history.push({...h,timestamp:v});const{onStart:b,onMove:m}=this.handlers;f||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Pd(f,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=jd(c.type==="pointercancel"?this.lastMoveEventInfo:Pd(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(c,b),h&&h(c,b)},!mm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=el(t),a=Pd(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=nt;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,jd(a,this.history)),this.removeListeners=Ja(na(this.contextWindow,"pointermove",this.handlePointerMove),na(this.contextWindow,"pointerup",this.handlePointerUp),na(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ni(this.updatePoint)}}function Pd(e,t){return t?{point:t(e.point)}:e}function N0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jd({point:e},t){return{point:e,delta:N0(e,$S(t)),offset:N0(e,QR(t)),velocity:YR(t,.1)}}function QR(e){return e[0]}function $S(e){return e[e.length-1]}function YR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=$S(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>zn(t)));)n--;if(!r)return{x:0,y:0};const s=Bn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function XR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function M0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ZR(e,{top:t,left:n,bottom:r,right:i}){return{x:M0(e.x,n,i),y:M0(e.y,t,r)}}function L0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function JR(e,t){return{x:L0(e.x,t.x),y:L0(e.y,t.y)}}function eO(e,t){let n=.5;const r=vt(e),i=vt(t);return i>r?n=_a(t.min,t.max-r,e.min):r>i&&(n=_a(e.min,e.max-i,t.min)),fr(0,1,n)}function tO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Cp=.35;function nO(e=Cp){return e===!1?e=0:e===!0&&(e=Cp),{x:I0(e,"left","right"),y:I0(e,"top","bottom")}}function I0(e,t,n){return{min:$0(e,t),max:$0(e,n)}}function $0(e,t){return typeof e=="number"?e:e[t]||0}const rO=new WeakMap;class iO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ne(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(el(d).point)},s=(d,c)=>{const{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ej(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yt(b=>{let m=this.getAxisMotionValue(b).get()||0;if(Un.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[b];w&&(m=vt(w)*(parseFloat(m)/100))}}this.originPoint[b]=m}),h&&we.postRender(()=>h(d,c)),pp(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(d,c)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=c;if(p&&this.currentDirection===null){this.currentDirection=sO(b),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),v&&v(d,c)},a=(d,c)=>this.stop(d,c),l=()=>Yt(d=>{var c;return this.getAnimationState(d)==="paused"&&((c=this.getAxisMotionValue(d).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new IS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:LS(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&we.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Pl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=XR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&js(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ZR(r.layoutBox,t):this.constraints=!1,this.elastic=nO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Yt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=tO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!js(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=JR(i.layout.layoutBox,s);if(n){const a=n(IR(o));this.hasMutatedConstraints=!!a,a&&(o=RS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Yt(d=>{if(!Pl(d,n,this.currentDirection))return;let c=l&&l[d]||{};o&&(c={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,h={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(d,h)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pp(this.visualElement,t),r.start(Mm(t,r,0,n,this.visualElement,!1))}stopAnimation(){Yt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Yt(n=>{const{drag:r}=this.getProps();if(!Pl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-Pe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!js(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Yt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=eO({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Yt(o=>{if(!Pl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Pe(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;rO.set(this.visualElement,this);const t=this.visualElement.current,n=na(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();js(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),we.read(r);const o=Na(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Yt(d=>{const c=this.getAxisMotionValue(d);c&&(this.originPoint[d]+=l[d].translate,c.set(c.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Cp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Pl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class oO extends li{constructor(t){super(t),this.removeGroupControls=on,this.removeListeners=on,this.controls=new iO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||on}unmount(){this.removeGroupControls(),this.removeListeners()}}const z0=e=>(t,n)=>{e&&we.postRender(()=>e(t,n))};class aO extends li{constructor(){super(...arguments),this.removePointerDownListener=on}onPointerDown(t){this.session=new IS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:LS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:z0(t),onStart:z0(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&we.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=na(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Zl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function B0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const No={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=B0(e,t.target.x),r=B0(e,t.target.y);return`${n}% ${r}%`}},lO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ri.parse(e);if(i.length>5)return r;const s=ri.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=Pe(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class uO extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;_j(cO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Zl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||we.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hm.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function zS(e){const[t,n]=Tb(),r=g.useContext(rm);return y.jsx(uO,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Ib),isPresent:t,safeToRemove:n})}const cO={borderRadius:{...No,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:No,borderTopRightRadius:No,borderBottomLeftRadius:No,borderBottomRightRadius:No,boxShadow:lO};function dO(e,t,n){const r=ft(e)?e:ja(e);return r.start(Mm("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const pO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){om(this.children,t),this.isDirty=!0}remove(t){am(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pO),this.isDirty=!1,this.children.forEach(t)}}function mO(e,t){const n=Vn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ni(r),e(s-t))};return we.read(r,!0),()=>ni(r)}const BS=["TopLeft","TopRight","BottomLeft","BottomRight"],gO=BS.length,V0=e=>typeof e=="string"?parseFloat(e):e,U0=e=>typeof e=="number"||K.test(e);function vO(e,t,n,r,i,s){i?(e.opacity=Pe(0,n.opacity??1,yO(r)),e.opacityExit=Pe(t.opacity??1,0,xO(r))):s&&(e.opacity=Pe(t.opacity??1,n.opacity??1,r));for(let o=0;o<gO;o++){const a=`border${BS[o]}Radius`;let l=H0(t,a),u=H0(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||U0(l)===U0(u)?(e[a]=Math.max(Pe(V0(l),V0(u),r),0),(Un.test(u)||Un.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Pe(t.rotate||0,n.rotate||0,r))}function H0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=VS(0,.5,sS),xO=VS(.5,.95,on);function VS(e,t,n){return r=>r<e?0:r>t?1:n(_a(e,t,r))}function W0(e,t){e.min=t.min,e.max=t.max}function Gt(e,t){W0(e.x,t.x),W0(e.y,t.y)}function q0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function K0(e,t,n,r,i){return e-=t,e=Bu(e,1/n,r),i!==void 0&&(e=Bu(e,1/i,r)),e}function wO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Un.test(t)&&(t=parseFloat(t),t=Pe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Pe(s.min,s.max,r);e===s&&(a-=t),e.min=K0(e.min,t,n,a,i),e.max=K0(e.max,t,n,a,i)}function G0(e,t,[n,r,i],s,o){wO(e,t[n],t[r],t[i],t.scale,s,o)}const bO=["x","scaleX","originX"],SO=["y","scaleY","originY"];function Q0(e,t,n,r){G0(e.x,t,bO,n?n.x:void 0,r?r.x:void 0),G0(e.y,t,SO,n?n.y:void 0,r?r.y:void 0)}function Y0(e){return e.translate===0&&e.scale===1}function US(e){return Y0(e.x)&&Y0(e.y)}function X0(e,t){return e.min===t.min&&e.max===t.max}function kO(e,t){return X0(e.x,t.x)&&X0(e.y,t.y)}function Z0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function HS(e,t){return Z0(e.x,t.x)&&Z0(e.y,t.y)}function J0(e){return vt(e.x)/vt(e.y)}function ey(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class EO{constructor(){this.members=[]}add(t){om(this.members,t),t.scheduleRender()}remove(t){if(am(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function TO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:c,rotateY:f,skewX:p,skewY:h}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),c&&(r+=`rotateX(${c}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Ad=["","X","Y","Z"],CO={visibility:"hidden"},ty=1e3;let _O=0;function Rd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function WS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Zb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&WS(r)}function qS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=_O++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(NO),this.nodes.forEach(MO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new um),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=mO(f,250),Zl.hasAnimatedSinceResize&&(Zl.hasAnimatedSinceResize=!1,this.nodes.forEach(ry))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||BO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:m}=d.getProps(),x=!this.targetLayout||!HS(this.targetLayout,h),w=!f&&p;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,w);const E={...fm(v,"layout"),onPlay:b,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else f||ry(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ni(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&WS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const c=this.path[d];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ny);return}this.isUpdating||this.nodes.forEach(DO),this.isUpdating=!1,this.nodes.forEach(FO),this.nodes.forEach(PO),this.nodes.forEach(jO),this.clearAllSnapshots();const a=Vn.now();nt.delta=fr(0,1e3/60,a-nt.timestamp),nt.timestamp=a,nt.isProcessing=!0,bd.update.process(nt),bd.preRender.process(nt),bd.render.process(nt),nt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(IO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ne(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!US(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||yi(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),VO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ne();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(UO))){const{scroll:d}=this.root;d&&(Os(a.x,d.offset.x),Os(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ne();if(Gt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:c,options:f}=d;d!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&Gt(a,o),Os(a.x,c.offset.x),Os(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Ne();Gt(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ds(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yi(d.latestValues)&&Ds(l,d.latestValues)}return yi(this.latestValues)&&Ds(l,this.latestValues),l}removeTransform(o){const a=Ne();Gt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!yi(u.latestValues))continue;Ep(u.latestValues)&&u.updateSnapshot();const d=Ne(),c=u.measurePageBox();Gt(d,c),Q0(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yi(this.latestValues)&&Q0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==nt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:c}=this.options;if(!(!this.layout||!(d||c))){if(this.resolvedRelativeTargetAt=nt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),ia(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ne(),this.targetWithTransforms=Ne()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),WR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Gt(this.target,this.layout.layoutBox),NS(this.target,this.targetDelta)):Gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),ia(this.relativeTargetOrigin,this.target,p.target),Gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ep(this.parent.latestValues)||FS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var h;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===nt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Gt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,f=this.treeScale.y;qR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ne());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(q0(this.prevProjectionDelta.x,this.projectionDelta.x),q0(this.prevProjectionDelta.y,this.projectionDelta.y)),ra(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!ey(this.projectionDelta.x,this.prevProjectionDelta.x)||!ey(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rs(),this.projectionDelta=Rs(),this.projectionDeltaWithTransform=Rs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},c=Rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ne(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,v=p!==h,b=this.getStack(),m=!b||b.members.length<=1,x=!!(v&&!m&&this.options.crossfade===!0&&!this.path.some(zO));this.animationProgress=0;let w;this.mixTargetDelta=E=>{const T=E/1e3;iy(c.x,o.x,T),iy(c.y,o.y,T),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ia(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$O(this.relativeTarget,this.relativeTargetOrigin,f,T),w&&kO(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ne()),Gt(w,this.relativeTarget)),v&&(this.animationValues=d,vO(d,u,this.latestValues,T,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ni(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Zl.hasAnimatedSinceResize=!0,this.currentAnimation=dO(0,ty,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ty),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&KS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ne();const c=vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const f=vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Gt(a,l),Ds(a,d),ra(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new EO),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Rd("z",o,u,this.animationValues);for(let d=0;d<Ad.length;d++)Rd(`rotate${Ad[d]}`,o,u,this.animationValues),Rd(`skew${Ad[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Xl(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Xl(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!yi(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=TO(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:c,y:f}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in Ra){if(d[p]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:b}=Ra[p],m=a.transform==="none"?d[p]:h(d[p],u);if(v){const x=v.length;for(let w=0;w<x;w++)a[v[w]]=m}else b?this.options.visualElement.renderState.vars[p]=m:a[p]=m}return this.options.layoutId&&(a.pointerEvents=u===this?Xl(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ny),this.root.sharedNodes.clear()}}}function PO(e){e.updateLayout()}function jO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Yt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(f);f.min=r[c].min,f.max=f.min+p}):KS(s,t.layoutBox,r)&&Yt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(r[c]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+p)});const a=Rs();ra(a,r,t.layoutBox);const l=Rs();o?ra(l,e.applyTransform(i,!0),t.measuredBox):ra(l,r,t.layoutBox);const u=!US(a);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:p}=c;if(f&&p){const h=Ne();ia(h,t.layoutBox,f.layoutBox);const v=Ne();ia(v,r,p.layoutBox),HS(h,v)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function ny(e){e.clearMeasurements()}function DO(e){e.isLayoutDirty=!1}function FO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ry(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NO(e){e.resolveTargetDelta()}function MO(e){e.calcProjection()}function LO(e){e.resetSkewAndRotation()}function IO(e){e.removeLeadSnapshot()}function iy(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sy(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function $O(e,t,n,r){sy(e.x,t.x,n.x,r),sy(e.y,t.y,n.y,r)}function zO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const BO={duration:.45,ease:[.4,0,.1,1]},oy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ay=oy("applewebkit/")&&!oy("chrome/")?Math.round:on;function ly(e){e.min=ay(e.min),e.max=ay(e.max)}function VO(e){ly(e.x),ly(e.y)}function KS(e,t,n){return e==="position"||e==="preserve-aspect"&&!HR(J0(t),J0(n),.2)}function UO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const HO=qS({attachResizeListener:(e,t)=>Na(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Od={current:void 0},GS=qS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Od.current){const e=new HO({});e.mount(window),e.setOptions({layoutScroll:!0}),Od.current=e}return Od.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),WO={pan:{Feature:aO},drag:{Feature:oO,ProjectionNode:GS,MeasureLayout:zS}};function uy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&we.postRender(()=>s(t,el(t)))}class qO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=nj(t,(n,r)=>(uy(this.node,r,"Start"),i=>uy(this.node,i,"End"))))}unmount(){}}class KO extends li{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ja(Na(this.node.current,"focus",()=>this.onFocus()),Na(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function cy(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&we.postRender(()=>s(t,el(t)))}class GO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=oj(t,(n,r)=>(cy(this.node,r,"Start"),(i,{success:s})=>cy(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _p=new WeakMap,Dd=new WeakMap,QO=e=>{const t=_p.get(e.target);t&&t(e)},YO=e=>{e.forEach(QO)};function XO({root:e,...t}){const n=e||document;Dd.has(n)||Dd.set(n,{});const r=Dd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(YO,{root:e,...t})),r[i]}function ZO(e,t,n){const r=XO(t);return _p.set(e,n),r.observe(e),()=>{_p.delete(e),r.unobserve(e)}}const JO={some:0,all:1};class e3 extends li{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:JO[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return ZO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(t3(t,n))&&this.startObserver()}unmount(){}}function t3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const n3={inView:{Feature:e3},tap:{Feature:GO},focus:{Feature:KO},hover:{Feature:qO}},r3={layout:{ProjectionNode:GS,MeasureLayout:zS}},Pp={current:null},QS={current:!1};function i3(){if(QS.current=!0,!!im)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pp.current=e.matches;e.addListener(t),t()}else Pp.current=!1}const s3=[...wS,ct,ri],o3=e=>s3.find(xS(e)),a3=new WeakMap;function l3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ft(i))e.addValue(r,i);else if(ft(s))e.addValue(r,ja(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,ja(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const dy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class u3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Vn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,we.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=yc(n),this.isVariantNode=Mb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const h=f[p];l[p]!==void 0&&ft(h)&&h.set(l[p],!1)}}mount(t){this.current=t,a3.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),QS.current||i3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ni(this.notifyUpdate),ni(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ns.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&we.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in co){const n=co[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ne()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<dy.length;r++){const i=dy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=l3(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ja(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(vS(r)||aS(r))?r=parseFloat(r):!o3(r)&&ri.test(n)&&(r=hS(t,n)),this.setBaseTarget(t,ft(r)?r.get():r)),ft(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=_m(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ft(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new um),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class YS extends u3{constructor(){super(...arguments),this.KeyframeResolver=bS}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function c3(e){return window.getComputedStyle(e)}class d3 extends YS{constructor(){super(...arguments),this.type="html",this.renderInstance=Kb}readValueFromInstance(t,n){if(ns.has(n))return EA(t,n);{const r=c3(t),i=(xm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return MS(t,n)}build(t,n,r){Sm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Pm(t,n,r)}}class f3 extends YS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&qb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ns.has(n)){const r=pS(n);return r&&r.default||0}return n=Gb.has(n)?n:ym(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Yb(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&we.postRender(this.updateDimensions)}build(t,n,r){Tm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Qb(t,n,r,i)}mount(t){this.isSVGTag=Cm(t.tagName),super.mount(t)}}const p3=(e,t)=>Em(e)?new f3(t):new d3(t,{allowProjection:e!==g.Fragment}),h3=Xj({...MR,...n3,...WO,...r3},p3),Te=pj(h3);class m3{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const g3=()=>new m3;function v3(){return hc(g3)}const y3=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),Ft=e=>{const[t,n]=e.split("-");return y3(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var Tr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Tr||{});const XS=g.createContext({}),x3={[Y.Background]:"",[Y.Border]:"initial",[Y.TooltipText]:Ft("blue-700"),[Y.TooltipBackground]:Ft("blue-100"),[Y.TooltipBorder]:Ft("blue-500"),[Y.HeaderBackground]:Ft("blue-600"),[Y.HeaderBorder]:"initial",[Y.HeaderText]:"white",[Y.FooterBackground]:"",[Y.FooterBorder]:"",[Y.FooterText]:"",[Y.MessageAdminBackground]:"",[Y.MessageAdminText]:"",[Y.MessageVisitorBackground]:"",[Y.MessageVisitorText]:"",[Y.GreeterBackground]:"white",[Y.GreeterText]:Ft("slate-700"),[Y.GreeterBorder]:Ft("slate-200"),[Y.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[Y.GreeterTopText]:"white",[Y.GreeterButtonBackground]:Ft("indigo-600"),[Y.GreeterButtonText]:Ft("white"),[Y.ButtonBackground]:Ft("indigo-600"),[Y.ButtonText]:Ft("white"),[Y.InputBackground]:Ft("white"),[Y.InputText]:Ft("slate-800"),[Y.InputBorder]:Ft("slate-200")},w3={[Tr.None]:"0px",[Tr.Sm]:"var(--radius-xs)",[Tr.Md]:"var(--radius-sm)",[Tr.Lg]:"var(--radius-md)",[Tr.Xl]:"var(--radius-lg)",[Tr.Full]:"calc(infinity * 1px)"},b3=e=>{const t={...x3};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function S3({children:e,widget:t}){const n=b3(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Tr.Md,i=o=>n[o],s=()=>w3[r];return y.jsx(XS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const hr=()=>g.useContext(XS);function rn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=Y.ButtonText,bgKey:u=Y.ButtonBackground,animations:d={},withoutTheming:c,...f}){const p=hr();return y.jsx(Te.button,{type:t,className:fe("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,Kv[n]&&Kv[n][r],IP[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:p.getColor(l),backgroundColor:p.getColor(u),...o?{}:{borderRadius:p.getRadius()}},...d,...f,children:e})}function ve(){}ve.Home=function(t){return y.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};ve.Chat=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ve.Menu=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ve.MessageTyping=({className:e="size-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ve.Check=function(t){return y.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};ve.Website=function(t){return y.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};ve.ArrowDown=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ve.XCircle=({className:e="e-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});ve.X=({className:e="e-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ve.PaperAirplane=({className:e="e-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});ve.Spin=function(t){return y.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};const qn=Object.create(null);qn.open="0";qn.close="1";qn.ping="2";qn.pong="3";qn.message="4";qn.upgrade="5";qn.noop="6";const Jl=Object.create(null);Object.keys(qn).forEach(e=>{Jl[qn[e]]=e});const jp={type:"error",data:"parser error"},ZS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",JS=typeof ArrayBuffer=="function",ek=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Lm=({type:e,data:t},n,r)=>ZS&&t instanceof Blob?n?r(t):fy(t,r):JS&&(t instanceof ArrayBuffer||ek(t))?n?r(t):fy(new Blob([t]),r):r(qn[e]+(t||"")),fy=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function py(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Fd;function k3(e,t){if(ZS&&e.data instanceof Blob)return e.data.arrayBuffer().then(py).then(t);if(JS&&(e.data instanceof ArrayBuffer||ek(e.data)))return t(py(e.data));Lm(e,!1,n=>{Fd||(Fd=new TextEncoder),t(Fd.encode(n))})}const hy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<hy.length;e++)Wo[hy.charCodeAt(e)]=e;const E3=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)s=Wo[e.charCodeAt(r)],o=Wo[e.charCodeAt(r+1)],a=Wo[e.charCodeAt(r+2)],l=Wo[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return u},T3=typeof ArrayBuffer=="function",Im=(e,t)=>{if(typeof e!="string")return{type:"message",data:tk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C3(e.substring(1),t)}:Jl[n]?e.length>1?{type:Jl[n],data:e.substring(1)}:{type:Jl[n]}:jp},C3=(e,t)=>{if(T3){const n=E3(e);return tk(n,t)}else return{base64:!0,data:e}},tk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},nk="",_3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Lm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(nk))})})},P3=(e,t)=>{const n=e.split(nk),r=[];for(let i=0;i<n.length;i++){const s=Im(n[i],t);if(r.push(s),s.type==="error")break}return r};function j3(){return new TransformStream({transform(e,t){k3(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Nd;function jl(e){return e.reduce((t,n)=>t+n.length,0)}function Al(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function A3(e,t){Nd||(Nd=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(jl(n)<1)break;const l=Al(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(jl(n)<2)break;const l=Al(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(jl(n)<8)break;const l=Al(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(jp);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(jl(n)<i)break;const l=Al(n,i);a.enqueue(Im(s?l:Nd.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(jp);break}}}})}const rk=4;function Ie(e){if(e)return R3(e)}function R3(e){for(var t in Ie.prototype)e[t]=Ie.prototype[t];return e}Ie.prototype.on=Ie.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ie.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ie.prototype.off=Ie.prototype.removeListener=Ie.prototype.removeAllListeners=Ie.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ie.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Ie.prototype.emitReserved=Ie.prototype.emit;Ie.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ie.prototype.hasListeners=function(e){return!!this.listeners(e).length};const wc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),tn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),O3="arraybuffer";function ik(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const D3=tn.setTimeout,F3=tn.clearTimeout;function bc(e,t){t.useNativeTimers?(e.setTimeoutFn=D3.bind(tn),e.clearTimeoutFn=F3.bind(tn)):(e.setTimeoutFn=tn.setTimeout.bind(tn),e.clearTimeoutFn=tn.clearTimeout.bind(tn))}const N3=1.33;function M3(e){return typeof e=="string"?L3(e):Math.ceil((e.byteLength||e.size)*N3)}function L3(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function sk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function I3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function $3(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class z3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class $m extends Ie{constructor(t){super(),this.writable=!1,bc(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new z3(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Im(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=I3(t);return n.length?"?"+n:""}}class B3 extends $m{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};P3(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,_3(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=sk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let ok=!1;try{ok=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const V3=ok;function U3(){}class H3 extends B3{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Hn extends Ie{constructor(t,n,r){super(),this.createRequest=t,bc(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=ik(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Hn.requestsCount++,Hn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=U3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Hn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Hn.requestsCount=0;Hn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",my);else if(typeof addEventListener=="function"){const e="onpagehide"in tn?"pagehide":"unload";addEventListener(e,my,!1)}}function my(){for(let e in Hn.requests)Hn.requests.hasOwnProperty(e)&&Hn.requests[e].abort()}const W3=function(){const e=ak({xdomain:!1});return e&&e.responseType!==null}();class q3 extends H3{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=W3&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Hn(ak,this.uri(),t)}}function ak(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||V3))return new XMLHttpRequest}catch{}if(!t)try{return new tn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const lk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K3 extends $m{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=lk?{}:ik(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Lm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=sk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Md=tn.WebSocket||tn.MozWebSocket;class G3 extends K3{createSocket(t,n,r){return lk?new Md(t,n,r):n?new Md(t,n):new Md(t)}doWrite(t,n){this.ws.send(n)}}class Q3 extends $m{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=A3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=j3();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Y3={websocket:G3,webtransport:Q3,polling:q3},X3=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z3=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ap(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=X3.exec(e||""),s={},o=14;for(;o--;)s[Z3[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=J3(s,s.path),s.queryKey=eD(s,s.query),s}function J3(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function eD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Rp=typeof addEventListener=="function"&&typeof removeEventListener=="function",eu=[];Rp&&addEventListener("offline",()=>{eu.forEach(e=>e())},!1);class Xr extends Ie{constructor(t,n){if(super(),this.binaryType=O3,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Ap(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Ap(n.host).host);bc(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$3(this.opts.query)),Rp&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},eu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=rk,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Xr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Xr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=M3(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,wc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Xr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Rp&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=eu.indexOf(this._offlineEventListener);r!==-1&&eu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=rk;class tD extends Xr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Xr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=c=>{const f=new Error("probe error: "+c);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const d=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let nD=class extends tD{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Y3[i]).filter(i=>!!i)),super(t,r)}};function rD(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Ap(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const iD=typeof ArrayBuffer=="function",sD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,uk=Object.prototype.toString,oD=typeof Blob=="function"||typeof Blob<"u"&&uk.call(Blob)==="[object BlobConstructor]",aD=typeof File=="function"||typeof File<"u"&&uk.call(File)==="[object FileConstructor]";function zm(e){return iD&&(e instanceof ArrayBuffer||sD(e))||oD&&e instanceof Blob||aD&&e instanceof File}function tu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(tu(e[n]))return!0;return!1}if(zm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return tu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&tu(e[n]))return!0;return!1}function lD(e){const t=[],n=e.data,r=e;return r.data=Op(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Op(e,t){if(!e)return e;if(zm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Op(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Op(e[r],t));return n}return e}function uD(e,t){return e.data=Dp(e.data,t),delete e.attachments,e}function Dp(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Dp(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Dp(e[n],t));return e}const cD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],dD=5;var le;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(le||(le={}));class fD{constructor(t){this.replacer=t}encode(t){return(t.type===le.EVENT||t.type===le.ACK)&&tu(t)?this.encodeAsBinary({type:t.type===le.EVENT?le.BINARY_EVENT:le.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===le.BINARY_EVENT||t.type===le.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=lD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function gy(e){return Object.prototype.toString.call(e)==="[object Object]"}class Bm extends Ie{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===le.BINARY_EVENT;r||n.type===le.BINARY_ACK?(n.type=r?le.EVENT:le.ACK,this.reconstructor=new pD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(zm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(le[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===le.BINARY_EVENT||r.type===le.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(Bm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case le.CONNECT:return gy(n);case le.DISCONNECT:return n===void 0;case le.CONNECT_ERROR:return typeof n=="string"||gy(n);case le.EVENT:case le.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&cD.indexOf(n[0])===-1);case le.ACK:case le.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class pD{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=uD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const hD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Bm,Encoder:fD,get PacketType(){return le},protocol:dD},Symbol.toStringTag,{value:"Module"}));function xn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const mD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ck extends Ie{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[xn(t,"open",this.onopen.bind(this)),xn(t,"packet",this.onpacket.bind(this)),xn(t,"error",this.onerror.bind(this)),xn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(mD.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:le.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,c=n.pop();this._registerAckCallback(d,c),o.id=d}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:le.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case le.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case le.EVENT:case le.BINARY_EVENT:this.onevent(t);break;case le.ACK:case le.BINARY_ACK:this.onack(t);break;case le.DISCONNECT:this.ondisconnect();break;case le.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:le.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:le.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function So(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}So.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};So.prototype.reset=function(){this.attempts=0};So.prototype.setMin=function(e){this.ms=e};So.prototype.setMax=function(e){this.max=e};So.prototype.setJitter=function(e){this.jitter=e};class Fp extends Ie{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,bc(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new So({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||hD;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new nD(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=xn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=xn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(xn(t,"ping",this.onping.bind(this)),xn(t,"data",this.ondata.bind(this)),xn(t,"error",this.onerror.bind(this)),xn(t,"close",this.onclose.bind(this)),xn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){wc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new ck(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Mo={};function nu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=rD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Mo[i]&&s in Mo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Fp(r,t):(Mo[i]||(Mo[i]=new Fp(r,t)),l=Mo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(nu,{Manager:Fp,Socket:ck,io:nu,connect:nu});const ru=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Wn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Wn||{});const Ld=(e,t)=>{localStorage.setItem(e,t)},Vs=e=>localStorage.getItem(e),vy=()=>{localStorage.removeItem("lc:customer:token"),localStorage.removeItem("lc:customer:refresh_token"),localStorage.removeItem("lc:device:id")},dk=g.createContext(null),rs=()=>g.useContext(dk),gD=({children:e})=>{const[t,n]=g.useState(null),[r,i]=g.useState(!1),s=()=>{const c=nu(E2,{transports:["websocket"],auth:{customer_token:Vs(Wn.CustomerToken)||ru("customer_token"),device_id:Vs(Wn.DeviceId)||ru("device_id"),customer_refresh_token:Vs(Wn.CustomerRefreshToken)||ru("customer_refresh_token")}});c.on("error",f=>{console.error("Websocket error",f)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,f)=>{t&&t.on(c,f)},u=(c,f)=>{t&&t.off(c,f)},d=(c,f,p)=>{t&&t.emit(c,f,p)};return y.jsx(dk.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:d},children:e})};var Kn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Kn||{}),rt=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e))(rt||{});const Vm=e=>{const t=hb(),n=(r,i)=>{var o;const s=((o=z$.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,u])=>a.replace(`:${l}`,u),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}};function vD(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const yD=()=>Jh({mutationFn:e=>yo(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),xD=e=>yo(`clients/${e}/chats`),Np=e=>yo(`clients/${e}/chats`,{method:"DELETE"}),wD=(e,t)=>yo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{"X-Customer-Token":Vs(Wn.CustomerToken)||"","X-Customer-Refresh-Token":Vs(Wn.CustomerRefreshToken)||"","X-Device-Id":Vs(Wn.DeviceId)||""}}),bD=()=>Jh({mutationFn:e=>wD(e.rating,e.comment)}),SD=e=>Jh({mutationFn:t=>yo(`clients/${e}/chats/files`,{method:"POST",body:P2({files:t},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})});function kD(e){return e&&typeof e=="object"&&"file_urls"in e}const Um=(e,t,n)=>{const r=typeof window<"u"?window:void 0;g.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},ko=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function Mp({text:e}){var o,a,l,u;const{widget:t,isHaveChat:n}=un(),r=hr(),[i,s]=g.useState(!0);return i?y.jsxs(Te.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:fe("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(Y.TooltipBackground),color:r.getColor(Y.TooltipText)},children:[y.jsx("button",{onClick:()=>s(!1),className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":"Kapat",children:y.jsx(ve.X,{className:"size-3"})}),y.jsx(Te.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:r.getColor(Y.TooltipText)},children:e||(n?(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message_active:(u=(l=t==null?void 0:t.appearance)==null?void 0:l.design)==null?void 0:u.tooltip_message)||"Bizimle sohbet edin!"}),y.jsx("div",{className:fe("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]}):null}const ED="/notify.mp3",TD=async e=>{await new Audio(e||ED).play()};function yy({fallback:e,fallbackOpen:t}){const[n]=g.useState(window.document.title),r=rs(),{isHaveChat:i,open:s,soundPath:o}=un(),[a,l]=g.useState(!0),[u,d]=g.useState(0),[c,f]=g.useState(null),p=()=>{TD(o)},h=(v,b)=>{if(c&&clearInterval(c),v||!i||b===0||Number.isNaN(b)){window.document.title=n,f(null);return}const m=setInterval(()=>{if(v||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(m),f(null);return}const x=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==x?window.document.title=x:window.document.title=n},1e3);return f(m),()=>{clearInterval(m),f(null)}};return g.useEffect(()=>h(s&&a,u),[u,s,a]),g.useEffect(()=>{const v=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",v,!1),()=>{document.removeEventListener("visibilitychange",v)}},[]),g.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const v=()=>{!i||s&&a||(d(b=>b+1),p())};return r.on(rt.MessageAgentCreate,v),r.on(rt.ChatUserAssignee,p),()=>{r.off(rt.MessageAgentCreate,v),r.off(rt.ChatUserAssignee,p)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:y.jsx(Mp,{text:"Yeni mesajlar var!"})}function CD({children:e,defaultOpen:t,border:n}){var R,M,G,ne;const r=rs(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=un(),[u]=g.useState(!0),d=Vm(),c=Ya(),f=hr(),p=ko(),[h,v]=g.useState({x:0,y:0}),b=v3(),m=g.useRef(null),x=g.useRef(null),[w,E]=g.useState(!1);g.useEffect(()=>((()=>{E("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{E(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{E(!0)})}),[]),g.useEffect(()=>{a&&c.pathname==="/"&&d.push("chat")},[a]);const T=J=>{if(!m.current||!x.current)return J;const ee=m.current.getBoundingClientRect(),Q={width:window.innerWidth,height:window.innerHeight},X={top:20,right:20,bottom:40,left:20};let D=J.x,L=J.y;return ee.right+D-h.x>Q.width-X.right&&(D=Q.width-X.right-ee.width-(ee.left-h.x)),ee.left+D-h.x<X.left&&(D=X.left-(ee.left-h.x)),ee.bottom+L-h.y>Q.height-X.bottom&&(L=Q.height-X.bottom-ee.height-(ee.top-h.y)),ee.top+L-h.y<X.top&&(L=X.top-(ee.top-h.y)),{x:D,y:L}},C=()=>{s(!0),r&&r.emit(Kn.WidgetOpen,{})},_=()=>{s(!1),r&&r.emit(Kn.WidgetClose,{})},k=()=>{s(!1),o(!1),Np(l.client_id),d.push("registration")};g.useEffect(()=>{if(t&&!p&&s(!0),!(!r||!l))return r.on(rt.Banned,k),()=>{r.off(rt.Banned,k)}},[]),g.useEffect(()=>(p&&i?document.body.style.setProperty("overflow","hidden","important"):document.body.style.setProperty("overflow","auto","important"),()=>{document.body.style.setProperty("overflow","auto","important")}),[p,i]);function j(J){w&&b.start(J)}return y.jsx("section",{className:"relative w-full h-full",ref:x,children:y.jsxs(Yr,{children:[i&&y.jsx(Te.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:p?"100%":((M=(R=l==null?void 0:l.appearance)==null?void 0:R.design)==null?void 0:M.width)||"21rem",height:p?"var(--app-height, 100dvh)":((ne=(G=l==null?void 0:l.appearance)==null?void 0:G.design)==null?void 0:ne.height)||"30rem",left:p?"0":"",right:p?"0px !important":"",maxHeight:p?"var(--app-height, 100dvh)":"",borderColor:f.getColor(Y.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:fe("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!p,"!bottom-0 !right-0":p}),children:e}),!w&&y.jsx("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:y.jsxs(Yr,{children:[y.jsx(yy,{fallback:y.jsx(Mp,{}),fallbackOpen:u}),!i&&y.jsxs(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[y.jsx(Te.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:f.getColor(Y.ButtonBackground)}}),y.jsx(ve.Chat,{className:"size-7"})]}),i&&!p&&y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:_,children:y.jsx(ve.X,{className:"size-7"})})]})}),w&&y.jsx(Te.div,{ref:m,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:h.x,y:h.y},drag:w,dragControls:b,dragMomentum:!1,dragElastic:0,onDragEnd:(J,ee)=>{const Q={x:h.x+ee.offset.x,y:h.y+ee.offset.y},X=T(Q);v(X)},children:y.jsxs(Yr,{children:[y.jsx(yy,{fallback:y.jsx(Mp,{}),fallbackOpen:u}),!i&&y.jsx("div",{className:"cursor-move",onPointerDown:j,children:y.jsxs(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[y.jsx(Te.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:f.getColor(Y.ButtonBackground)}}),y.jsx(ve.Chat,{className:"size-7"})]})}),i&&!p&&y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:_,children:y.jsx(ve.X,{className:"size-7"})})]})})]})})}function fk(e){const{widget:t}=un();return y.jsx(S3,{widget:t,children:y.jsx(CD,{...e})})}function is(e){this._maxSize=e,this.clear()}is.prototype.clear=function(){this._size=0,this._values=Object.create(null)};is.prototype.get=function(e){return this._values[e]};is.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var _D=/[^.^\]^[]+|(?=\[\]|\.\.)/g,pk=/^\d+$/,PD=/^\d/,jD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,AD=/^\s*(['"]?)(.*?)(\1)\s*$/,Hm=512,xy=new is(Hm),wy=new is(Hm),by=new is(Hm),zi={Cache:is,split:Lp,normalizePath:Id,setter:function(e){var t=Id(e);return wy.get(e)||wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=Id(e);return by.get(e)||by.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(Wm(n)||pk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){RD(Array.isArray(e)?e:Lp(e),t,n)}};function Id(e){return xy.get(e)||xy.set(e,Lp(e).map(function(t){return t.replace(AD,"$2")}))}function Lp(e){return e.match(_D)||[""]}function RD(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(FD(i)&&(i='"'+i+'"'),a=Wm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Wm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function OD(e){return e.match(PD)&&!e.match(pk)}function DD(e){return jD.test(e)}function FD(e){return!Wm(e)&&(OD(e)||DD(e))}const ND=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Sc=e=>e.match(ND)||[],kc=e=>e[0].toUpperCase()+e.slice(1),qm=(e,t)=>Sc(e).join(t).toLowerCase(),hk=e=>Sc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),MD=e=>kc(hk(e)),LD=e=>qm(e,"_"),ID=e=>qm(e,"-"),$D=e=>kc(qm(e," ")),zD=e=>Sc(e).map(kc).join(" ");var $d={words:Sc,upperFirst:kc,camelCase:hk,pascalCase:MD,snakeCase:LD,kebabCase:ID,sentenceCase:$D,titleCase:zD},Km={exports:{}};Km.exports=function(e){return mk(BD(e),e)};Km.exports.array=mk;function mk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=VD(t),a=UD(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(u,d,c){if(c.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[d]){i[d]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),d=p.length){c.add(u);do{var h=p[--d];l(h,a.get(h),c)}while(d);c.delete(u)}r[--n]=u}}}function BD(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function VD(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function UD(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var HD=Km.exports;const WD=Yi(HD),qD=Object.prototype.toString,KD=Error.prototype.toString,GD=RegExp.prototype.toString,QD=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",YD=/^Symbol\((.*)\)(.*)$/;function XD(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Sy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return XD(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return QD.call(e).replace(YD,"Symbol($1)");const r=qD.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+KD.call(e)+"]":r==="RegExp"?GD.call(e):null}function Zr(e,t){let n=Sy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Sy(this[r],t);return s!==null?s:i},2)}function gk(e){return e==null?[]:[].concat(e)}let vk,yk,xk,ZD=/\$\{\s*(\w+)\s*\}/g;vk=Symbol.toStringTag;class ky{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[vk]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],gk(t).forEach(s=>{if(_t.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}yk=Symbol.hasInstance;xk=Symbol.toStringTag;class _t extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(ZD,(i,s)=>Zr(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new ky(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xk]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,_t)}static[yk](t){return ky[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let On={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Zr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Zr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Zr(n,!0)}\``+i}},St={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},JD={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Ip={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},eF={isValue:"${path} field must be ${value}"},iu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},tF={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},nF={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Zr(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Zr(n,!0)}\``}return _t.formatError(On.notType,e)}};Object.assign(Object.create(null),{mixed:On,string:St,number:JD,date:Ip,object:iu,array:tF,boolean:eF,tuple:nF});const Gm=e=>e&&e.__isYupSchema__;class Vu{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Vu(t,(a,l)=>{var u;let d=o(...a)?i:s;return(u=d==null?void 0:d(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!Gm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Rl={context:"$",value:"."};class ss{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Rl.context,this.isValue=this.key[0]===Rl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Rl.context:this.isValue?Rl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&zi.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}ss.prototype.__isYupRef=!0;const Pi=e=>e==null;function ms(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:d,params:c,message:f,skipAbsent:p}=e;let{parent:h,context:v,abortEarly:b=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=i;function x(M){return ss.isRef(M)?M.getValue(n,h,v):M}function w(M={}){const G=Object.assign({value:n,originalValue:s,label:o.spec.label,path:M.path||r,spec:o.spec,disableStackTrace:M.disableStackTrace||m},c,M.params);for(const J of Object.keys(G))G[J]=x(G[J]);const ne=new _t(_t.formatError(M.message||f,G),n,G.path,M.type||u,G.disableStackTrace);return ne.params=G,ne}const E=b?a:l;let T={path:r,parent:h,type:u,from:i.from,createError:w,resolve:x,options:i,originalValue:s,schema:o};const C=M=>{_t.isError(M)?E(M):M?l(null):E(w())},_=M=>{_t.isError(M)?E(M):a(M)};if(p&&Pi(n))return C(!0);let j;try{var R;if(j=d.call(T,n,T),typeof((R=j)==null?void 0:R.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,_)}}catch(M){_(M);return}C(j)}return t.OPTIONS=e,t}function rF(e,t,n,r=n){let i,s,o;return t?(zi.forEach(t,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",f=u?parseInt(d,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[f],e=c?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Uu extends Set{describe(){const t=[];for(const n of this.values())t.push(ss.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Uu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Fs(e,t=new Map){if(Gm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Fs(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Fs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Fs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Fs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Gn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Uu,this._blacklist=new Uu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(On.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Fs(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&Pi(s))return s;let o=Zr(t),a=Zr(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
95
+ `),()=>{document.head.removeChild(p)}},[t]),y.jsx(zP,{isPresent:t,childRef:i,sizeRef:s,children:g.cloneElement(e,{ref:i})})}const VP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=hc(UP),u=g.useId();let d=!0,c=g.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const p of l.values())if(!p)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(c={...c}),g.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),g.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=y.jsx(BP,{isPresent:n,anchorX:a,children:e})),y.jsx(mc.Provider,{value:c,children:e})};function UP(){return new Map}function Tb(e=!0){const t=g.useContext(mc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=g.useId();g.useEffect(()=>{if(e)return i(s)},[e]);const o=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Tl=e=>e.key||"";function Qv(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const Yr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Tb(o),d=g.useMemo(()=>Qv(e),[e]),c=o&&!l?[]:d.map(Tl),f=g.useRef(!0),p=g.useRef(d),h=hc(()=>new Map),[v,b]=g.useState(d),[m,x]=g.useState(d);Eb(()=>{f.current=!1,p.current=d;for(let T=0;T<m.length;T++){const C=Tl(m[T]);c.includes(C)?h.delete(C):h.get(C)!==!0&&h.set(C,!1)}},[m,c.length,c.join("-")]);const w=[];if(d!==v){let T=[...d];for(let C=0;C<m.length;C++){const _=m[C],k=Tl(_);c.includes(k)||(T.splice(C,0,_),w.push(_))}return s==="wait"&&w.length&&(T=w),x(Qv(T)),b(d),null}const{forceRender:E}=g.useContext(rm);return y.jsx(y.Fragment,{children:m.map(T=>{const C=Tl(T),_=o&&!l?!1:d===m||c.includes(C),k=()=>{if(h.has(C))h.set(C,!0);else return;let j=!0;h.forEach(R=>{R||(j=!1)}),j&&(E==null||E(),x(p.current),o&&(u==null||u()),r&&r())};return y.jsx(VP,{isPresent:_,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:_?void 0:k,anchorX:a,children:T},C)})})};function om(e,t){e.indexOf(t)===-1&&e.push(t)}function am(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let up=()=>{};const cp={skipAnimations:!1,useManualTiming:!1};function lm(e){let t;return()=>(t===void 0&&(t=e()),t)}const an=e=>e,_a=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class um{constructor(){this.subscriptions=[]}add(t){return om(this.subscriptions,t),()=>am(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Bn=e=>e*1e3,Vn=e=>e/1e3;function Cb(e,t){return t?e*(1e3/t):0}const HP=lm(()=>window.ScrollTimeline!==void 0);class WP{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(HP()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class qP extends WP{then(t,n){return this.finished.finally(t).then(()=>{})}}const Yv={value:null,addProjectionMetrics:null},cm=e=>Array.isArray(e)&&typeof e[0]=="number",KP={};function GP(e,t){const n=lm(e);return()=>KP[t]??n()}const Pa=GP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_b=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Uo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Uo([0,.65,.55,1]),circOut:Uo([.55,0,1,.45]),backIn:Uo([.31,.01,.66,-.59]),backOut:Uo([.33,1.53,.69,.99])};function Pb(e,t){if(e)return typeof e=="function"&&Pa()?_b(e,t):cm(e)?Uo(e):Array.isArray(e)?e.map(n=>Pb(n,t)||dp.easeOut):dp[e]}function QP(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const c=Pb(a,i);return Array.isArray(c)&&(d.easing=c),e.animate(d,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function dm(e){return typeof e=="function"&&"applyToOptions"in e}function fm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Nu=2e4;function pm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Nu;)t+=n,r=e.next(t);return t>=Nu?1/0:t}function YP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(pm(r),Nu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Vn(i)}}function jb(e){return!!(typeof e=="function"&&Pa()||!e||typeof e=="string"&&(e in dp||Pa())||cm(e)||Array.isArray(e)&&e.every(jb))}function Xv(e,t){e.timeline=t,e.onfinish=null}const Cl=["read","resolveKeyframes","update","preRender","render","postRender"];function XP(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){o.has(c)&&(d.schedule(c),e()),l++,c(a)}const d={schedule:(c,f=!1,p=!1)=>{const v=p&&i?n:r;return f&&o.add(c),v.has(c)||v.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&Yv.value&&Yv.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(c))}};return d}const ZP=40;function Ab(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Cl.reduce((m,x)=>(m[x]=XP(s,t?x:void 0),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:f}=o,p=()=>{const m=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,ZP),1),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),d.process(i),c.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},h=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Cl.reduce((m,x)=>{const w=o[x];return m[x]=(E,T=!1,C=!1)=>(n||h(),w.schedule(E,T,C)),m},{}),cancel:m=>{for(let x=0;x<Cl.length;x++)o[Cl[x]].cancel(m)},state:i,steps:o}}const{schedule:hm,cancel:G$}=Ab(queueMicrotask,!1),{schedule:we,cancel:ni,state:nt,steps:Sd}=Ab(typeof requestAnimationFrame<"u"?requestAnimationFrame:an,!0);let Yl;function JP(){Yl=void 0}const Un={now:()=>(Yl===void 0&&Un.set(nt.isProcessing||cp.useManualTiming?nt.timestamp:performance.now()),Yl),set:e=>{Yl=e,queueMicrotask(JP)}},gn={x:!1,y:!1};function Rb(){return gn.x||gn.y}function ej(e){return e==="x"||e==="y"?gn[e]?null:(gn[e]=!0,()=>{gn[e]=!1}):gn.x||gn.y?null:(gn.x=gn.y=!0,()=>{gn.x=gn.y=!1})}function tj(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ob(e,t){const n=tj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Zv(e){return!(e.pointerType==="touch"||Rb())}function nj(e,t,n={}){const[r,i,s]=Ob(e,n),o=a=>{if(!Zv(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=c=>{Zv(c)&&(u(c),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Db=(e,t)=>t?e===t?!0:Db(e,t.parentElement):!1,mm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,rj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ij(e){return rj.has(e.tagName)||e.tabIndex!==-1}const Ho=new WeakSet;function Jv(e){return t=>{t.key==="Enter"&&e(t)}}function kd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Jv(()=>{if(Ho.has(n))return;kd(n,"down");const i=Jv(()=>{kd(n,"up")}),s=()=>kd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function e0(e){return mm(e)&&!Rb()}function oj(e,t,n={}){const[r,i,s]=Ob(e,n),o=a=>{const l=a.currentTarget;if(!e0(a)||Ho.has(l))return;Ho.add(l);const u=t(l,a),d=(p,h)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),!(!e0(p)||!Ho.has(l))&&(Ho.delete(l),typeof u=="function"&&u(p,{success:h}))},c=p=>{d(p,l===window||l===document||n.useGlobalTarget||Db(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>sj(u,i)),!ij(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const t0=30,aj=e=>!isNaN(parseFloat(e));class lj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Un.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Un.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new um);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Un.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>t0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,t0);return Cb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ja(e,t){return new lj(e,t)}const Fb=g.createContext({strict:!1}),n0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},co={};for(const e in n0)co[e]={isEnabled:t=>n0[e].some(n=>!!t[n])};function uj(e){for(const t in e)co[t]={...co[t],...e[t]}}const cj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Mu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cj.has(e)}let Nb=e=>!Mu(e);function dj(e){e&&(Nb=t=>t.startsWith("on")?!Mu(t):e(t))}try{dj(require("@emotion/is-prop-valid").default)}catch{}function fj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Nb(i)||n===!0&&Mu(i)||!t&&!Mu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function pj(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const gc=g.createContext({});function vc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Aa(e){return typeof e=="string"||Array.isArray(e)}const gm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vm=["initial",...gm];function yc(e){return vc(e.animate)||vm.some(t=>Aa(e[t]))}function Mb(e){return!!(yc(e)||e.variants)}function hj(e,t){if(yc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Aa(n)?n:void 0,animate:Aa(r)?r:void 0}}return e.inherit!==!1?t:{}}function mj(e){const{initial:t,animate:n}=hj(e,g.useContext(gc));return g.useMemo(()=>({initial:t,animate:n}),[r0(t),r0(n)])}function r0(e){return Array.isArray(e)?e.join(" "):e}const gj=Symbol.for("motionComponentSymbol");function js(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vj(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):js(n)&&(n.current=r))},[t])}const ym=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yj="framerAppearId",Lb="data-"+ym(yj),Ib=g.createContext({});function xj(e,t,n,r,i){var v,b;const{visualElement:s}=g.useContext(gc),o=g.useContext(Fb),a=g.useContext(mc),l=g.useContext(sm).reducedMotion,u=g.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=u.current,c=g.useContext(Ib);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&wj(u.current,n,i,c);const f=g.useRef(!1);g.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[Lb],h=g.useRef(!!p&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Eb(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),hm.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),g.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)==null||m.call(window,p)}),h.current=!1))}),d}function wj(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:$b(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&js(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function $b(e){if(e)return e.options.allowProjection!==!1?e.projection:$b(e.parent)}function bj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&uj(e);function s(a,l){let u;const d={...g.useContext(sm),...a,layoutId:Sj(a)},{isStatic:c}=d,f=mj(a),p=r(a,c);if(!c&&im){kj();const h=Ej(d);u=h.MeasureLayout,f.visualElement=xj(i,p,d,t,h.ProjectionNode)}return y.jsxs(gc.Provider,{value:f,children:[u&&f.visualElement?y.jsx(u,{visualElement:f.visualElement,...d}):null,n(i,a,vj(p,f.visualElement,l),p,c,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=g.forwardRef(s);return o[gj]=i,o}function Sj({layoutId:e}){const t=g.useContext(rm).id;return t&&e!==void 0?t+"-"+e:e}function kj(e,t){g.useContext(Fb).strict}function Ej(e){const{drag:t,layout:n}=co;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const zb=e=>t=>typeof t=="string"&&t.startsWith(e),xm=zb("--"),Tj=zb("var(--"),wm=e=>Tj(e)?Cj.test(e.split("/*")[0].trim()):!1,Cj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ra={};function _j(e){for(const t in e)Ra[t]=e[t],xm(t)&&(Ra[t].isCSSVariable=!0)}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ns=new Set(wo);function Bb(e,{layout:t,layoutId:n}){return ns.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ra[e]||e==="opacity")}const ft=e=>!!(e&&e.getVelocity),Vb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fr=(e,t,n)=>n>t?t:n<e?e:n,bo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Oa={...bo,transform:e=>fr(0,1,e)},_l={...bo,default:1},Xa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sr=Xa("deg"),Hn=Xa("%"),K=Xa("px"),Pj=Xa("vh"),jj=Xa("vw"),i0={...Hn,parse:e=>Hn.parse(e)/100,transform:e=>Hn.transform(e*100)},Aj={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},Rj={rotate:Sr,rotateX:Sr,rotateY:Sr,rotateZ:Sr,scale:_l,scaleX:_l,scaleY:_l,scaleZ:_l,skew:Sr,skewX:Sr,skewY:Sr,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Oa,originX:i0,originY:i0,originZ:K},s0={...bo,transform:Math.round},bm={...Aj,...Rj,zIndex:s0,size:K,fillOpacity:Oa,strokeOpacity:Oa,numOctaves:s0},Oj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dj=wo.length;function Fj(e,t,n){let r="",i=!0;for(let s=0;s<Dj;s++){const o=wo[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Vb(a,bm[o]);if(!l){i=!1;const d=Oj[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Sm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ns.has(l)){o=!0;continue}else if(xm(l)){i[l]=u;continue}else{const d=Vb(u,bm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Fj(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${u} ${d}`}}const km=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ub(e,t,n){for(const r in t)!ft(t[r])&&!Bb(r,n)&&(e[r]=t[r])}function Nj({transformTemplate:e},t){return g.useMemo(()=>{const n=km();return Sm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Mj(e,t){const n=e.style||{},r={};return Ub(r,n,e),Object.assign(r,Nj(e,t)),r}function Lj(e,t){const n={},r=Mj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ij=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Em(e){return typeof e!="string"||e.includes("-")?!1:!!(Ij.indexOf(e)>-1||/[A-Z]/u.test(e))}const $j={offset:"stroke-dashoffset",array:"stroke-dasharray"},zj={offset:"strokeDashoffset",array:"strokeDasharray"};function Bj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?$j:zj;e[s.offset]=K.transform(-r);const o=K.transform(t),a=K.transform(n);e[s.array]=`${o} ${a}`}function o0(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function Vj(e,t,n){const r=o0(t,e.x,e.width),i=o0(n,e.y,e.height);return`${r} ${i}`}function Tm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,c){if(Sm(e,u,c),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=Vj(h,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Bj(f,o,a,l,!1)}const Hb=()=>({...km(),attrs:{}}),Cm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Uj(e,t,n,r){const i=g.useMemo(()=>{const s=Hb();return Tm(s,t,Cm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Ub(s,e.style,e),i.style={...s,...i.style}}return i}function Hj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Em(n)?Uj:Lj)(r,s,o,n),u=fj(r,typeof n=="string",e),d=n!==g.Fragment?{...u,...l,ref:i}:{},{children:c}=r,f=g.useMemo(()=>ft(c)?c.get():c,[c]);return g.createElement(n,{...d,children:f})}}function a0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _m(e,t,n,r){if(typeof t=="function"){const[i,s]=a0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=a0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const fp=e=>Array.isArray(e),Wj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),qj=e=>fp(e)?e[e.length-1]||0:e;function Xl(e){const t=ft(e)?e.get():e;return Wj(t)?t.toValue():t}function Kj({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:Gj(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Wb=e=>(t,n)=>{const r=g.useContext(gc),i=g.useContext(mc),s=()=>Kj(e,t,r,i);return n?s():hc(s)};function Gj(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=Xl(s[f]);let{initial:o,animate:a}=e;const l=yc(e),u=Mb(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const c=d?a:o;if(c&&typeof c!="boolean"&&!vc(c)){const f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){const h=_m(e,f[p]);if(h){const{transitionEnd:v,transition:b,...m}=h;for(const x in m){let w=m[x];if(Array.isArray(w)){const E=d?w.length-1:0;w=w[E]}w!==null&&(i[x]=w)}for(const x in v)i[x]=v[x]}}}return i}function Pm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ft(r[o])||t.style&&ft(t.style[o])||Bb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Qj={useVisualState:Wb({scrapeMotionValuesFromProps:Pm,createRenderState:km})};function qb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Kb(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Gb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Qb(e,t,n,r){Kb(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Gb.has(i)?i:ym(i),t.attrs[i])}function Yb(e,t,n){const r=Pm(e,t,n);for(const i in e)if(ft(e[i])||ft(t[i])){const s=wo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const l0=["x","y","width","height","cx","cy","r"],Yj={useVisualState:Wb({scrapeMotionValuesFromProps:Yb,createRenderState:Hb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(ns.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<l0.length;a++){const l=l0[a];e[l]!==t[l]&&(o=!0)}o&&we.read(()=>{qb(n,r),we.render(()=>{Tm(r,i,Cm(n.tagName),e.transformTemplate),Qb(n,r)})})}})};function Xj(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Em(r)?Yj:Qj,preloadedFeatures:e,useRender:Hj(i),createVisualElement:t,Component:r};return bj(o)}}function Da(e,t,n){const r=e.getProps();return _m(r,t,n!==void 0?n:r.custom,e)}const Xb=new Set(["width","height","top","left","right","bottom",...wo]);function Zj(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ja(n))}function Jj(e,t){const n=Da(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=qj(s[o]);Zj(e,o,a)}}function eA(e){return!!(ft(e)&&e.add)}function pp(e,t){const n=e.getValue("willChange");if(eA(n))return n.add(t);if(!n&&cp.WillChange){const r=new cp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Zb(e){return e.props[Lb]}const Jb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,tA=1e-7,nA=12;function rA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Jb(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>tA&&++a<nA);return o}function Za(e,t,n,r){if(e===t&&n===r)return an;const i=s=>rA(s,0,1,e,n);return s=>s===0||s===1?s:Jb(i(s),t,r)}const eS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tS=e=>t=>1-e(1-t),nS=Za(.33,1.53,.69,.99),jm=tS(nS),rS=eS(jm),iS=e=>(e*=2)<1?.5*jm(e):.5*(2-Math.pow(2,-10*(e-1))),Am=e=>1-Math.sin(Math.acos(e)),sS=tS(Am),oS=eS(Am),aS=e=>/^0[^.\s]+$/u.test(e);function iA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||aS(e):!0}const ta=e=>Math.round(e*1e5)/1e5,Rm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sA(e){return e==null}const oA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Om=(e,t)=>n=>!!(typeof n=="string"&&oA.test(n)&&n.startsWith(e)||t&&!sA(n)&&Object.prototype.hasOwnProperty.call(n,t)),lS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Rm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},aA=e=>fr(0,255,e),Ed={...bo,transform:e=>Math.round(aA(e))},Ci={test:Om("rgb","red"),parse:lS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ed.transform(e)+", "+Ed.transform(t)+", "+Ed.transform(n)+", "+ta(Oa.transform(r))+")"};function lA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const hp={test:Om("#"),parse:lA,transform:Ci.transform},As={test:Om("hsl","hue"),parse:lS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Hn.transform(ta(t))+", "+Hn.transform(ta(n))+", "+ta(Oa.transform(r))+")"},ct={test:e=>Ci.test(e)||hp.test(e)||As.test(e),parse:e=>Ci.test(e)?Ci.parse(e):As.test(e)?As.parse(e):hp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ci.transform(e):As.transform(e)},uA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Rm))==null?void 0:t.length)||0)+(((n=e.match(uA))==null?void 0:n.length)||0)>0}const uS="number",cS="color",dA="var",fA="var(",u0="${}",pA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(pA,l=>(ct.test(l)?(r.color.push(s),i.push(cS),n.push(ct.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(dA),n.push(l)):(r.number.push(s),i.push(uS),n.push(parseFloat(l))),++s,u0)).split(u0);return{values:n,split:a,indexes:r,types:i}}function dS(e){return Fa(e).values}function fS(e){const{split:t,types:n}=Fa(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===uS?s+=ta(i[o]):a===cS?s+=ct.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function mA(e){const t=dS(e);return fS(e)(t.map(hA))}const ri={test:cA,parse:dS,createTransformer:fS,getAnimatableNone:mA},gA=new Set(["brightness","contrast","saturate","opacity"]);function vA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Rm)||[];if(!r)return e;const i=n.replace(r,"");let s=gA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,mp={...ri,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(vA).join(" "):e}},xA={...bm,color:ct,backgroundColor:ct,outlineColor:ct,fill:ct,stroke:ct,borderColor:ct,borderTopColor:ct,borderRightColor:ct,borderBottomColor:ct,borderLeftColor:ct,filter:mp,WebkitFilter:mp},pS=e=>xA[e];function hS(e,t){let n=pS(e);return n!==mp&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wA=new Set(["auto","none","0"]);function bA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!wA.has(s)&&Fa(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=hS(n,i)}const _i=e=>e*180/Math.PI,gp=e=>{const t=_i(Math.atan2(e[1],e[0]));return vp(t)},SA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gp,rotateZ:gp,skewX:e=>_i(Math.atan(e[1])),skewY:e=>_i(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vp=e=>(e=e%360,e<0&&(e+=360),e),c0=gp,d0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),f0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),kA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:d0,scaleY:f0,scale:e=>(d0(e)+f0(e))/2,rotateX:e=>vp(_i(Math.atan2(e[6],e[5]))),rotateY:e=>vp(_i(Math.atan2(-e[2],e[0]))),rotateZ:c0,rotate:c0,skewX:e=>_i(Math.atan(e[4])),skewY:e=>_i(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function p0(e){return e.includes("scale")?1:0}function yp(e,t){if(!e||e==="none")return p0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=kA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=SA,i=a}if(!i)return p0(t);const s=r[t],o=i[1].split(",").map(TA);return typeof s=="function"?s(o):o[s]}const EA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return yp(n,t)};function TA(e){return parseFloat(e.trim())}const h0=e=>e===bo||e===K,CA=new Set(["x","y","z"]),_A=wo.filter(e=>!CA.has(e));function PA(e){const t=[];return _A.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const fo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>yp(t,"x"),y:(e,{transform:t})=>yp(t,"y")};fo.translateX=fo.x;fo.translateY=fo.y;const $i=new Set;let xp=!1,wp=!1;function mS(){if(wp){const e=Array.from($i).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=PA(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wp=!1,xp=!1,$i.forEach(e=>e.complete()),$i.clear()}function gS(){$i.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wp=!0)})}function jA(){gS(),mS()}class Dm{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?($i.add(this),xp||(xp=!0,we.read(gS),we.resolveKeyframes(mS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),$i.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$i.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const vS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function yS(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return vS(o)?parseFloat(o):o}return wm(i)?yS(i,t,n+1):i}const xS=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},wS=[bo,K,Hn,Sr,jj,Pj,OA],m0=e=>wS.find(xS(e));class bS extends Dm{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),wm(u))){const d=yS(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Xb.has(r)||t.length!==2)return;const[i,s]=t,o=m0(i),a=m0(s);if(o!==a)if(h0(o)&&h0(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)iA(t[i])&&r.push(i);r.length&&bA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=fo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const g0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ri.test(e)||e==="0")&&!e.startsWith("url("));function DA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function FA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=g0(i,t),a=g0(s,t);return!o||!a?!1:DA(e)||(n==="spring"||dm(n))&&r}const NA=e=>e!==null;function xc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(NA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const MA=40;class SS{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Un.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>MA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&jA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Un.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!FA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(xc(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Pe=(e,t,n)=>e+(t-e)*n;function Td(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function LA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Td(l,a,e+1/3),s=Td(l,a,e),o=Td(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Lu(e,t){return n=>n>0?t:e}const Cd=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},IA=[hp,Ci,As],$A=e=>IA.find(t=>t.test(e));function v0(e){const t=$A(e);if(!t)return!1;let n=t.parse(e);return t===As&&(n=LA(n)),n}const y0=(e,t)=>{const n=v0(e),r=v0(t);if(!n||!r)return Lu(e,t);const i={...n};return s=>(i.red=Cd(n.red,r.red,s),i.green=Cd(n.green,r.green,s),i.blue=Cd(n.blue,r.blue,s),i.alpha=Pe(n.alpha,r.alpha,s),Ci.transform(i))},zA=(e,t)=>n=>t(e(n)),Ja=(...e)=>e.reduce(zA),bp=new Set(["none","hidden"]);function BA(e,t){return bp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function VA(e,t){return n=>Pe(e,t,n)}function Fm(e){return typeof e=="number"?VA:typeof e=="string"?wm(e)?Lu:ct.test(e)?y0:WA:Array.isArray(e)?kS:typeof e=="object"?ct.test(e)?y0:UA:Lu}function kS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Fm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function UA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Fm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function HA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const WA=(e,t)=>{const n=ri.createTransformer(t),r=Fa(e),i=Fa(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?bp.has(e)&&!i.values.length||bp.has(t)&&!r.values.length?BA(e,t):Ja(kS(HA(r,i),i.values),n):Lu(e,t)};function ES(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pe(e,t,n):Fm(e)(e,t)}const qA=5;function TS(e,t,n){const r=Math.max(t-qA,0);return Cb(n-e(r),t-r)}const Oe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},_d=.001;function KA({duration:e=Oe.duration,bounce:t=Oe.bounce,velocity:n=Oe.velocity,mass:r=Oe.mass}){let i,s,o=1-t;o=fr(Oe.minDamping,Oe.maxDamping,o),e=fr(Oe.minDuration,Oe.maxDuration,Vn(e)),o<1?(i=u=>{const d=u*o,c=d*e,f=d-n,p=Sp(u,o),h=Math.exp(-c);return _d-f/p*h},s=u=>{const c=u*o*e,f=c*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-c),v=Sp(Math.pow(u,2),o);return(-i(u)+_d>0?-1:1)*((f-p)*h)/v}):(i=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-_d+d*c},s=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=QA(i,s,a);if(e=Bn(e),isNaN(l))return{stiffness:Oe.stiffness,damping:Oe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const GA=12;function QA(e,t,n){let r=n;for(let i=1;i<GA;i++)r=r-e(r)/t(r);return r}function Sp(e,t){return e*Math.sqrt(1-t*t)}const YA=["duration","bounce"],XA=["stiffness","damping","mass"];function x0(e,t){return t.some(n=>e[n]!==void 0)}function ZA(e){let t={velocity:Oe.velocity,stiffness:Oe.stiffness,damping:Oe.damping,mass:Oe.mass,isResolvedFromDuration:!1,...e};if(!x0(e,XA)&&x0(e,YA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*fr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Oe.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Oe.mass},t.isResolvedFromDuration=!0}return t}function Iu(e=Oe.visualDuration,t=Oe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:c,velocity:f,isResolvedFromDuration:p}=ZA({...n,velocity:-Vn(n.velocity||0)}),h=f||0,v=u/(2*Math.sqrt(l*d)),b=o-s,m=Vn(Math.sqrt(l/d)),x=Math.abs(b)<5;r||(r=x?Oe.restSpeed.granular:Oe.restSpeed.default),i||(i=x?Oe.restDelta.granular:Oe.restDelta.default);let w;if(v<1){const T=Sp(m,v);w=C=>{const _=Math.exp(-v*m*C);return o-_*((h+v*m*b)/T*Math.sin(T*C)+b*Math.cos(T*C))}}else if(v===1)w=T=>o-Math.exp(-m*T)*(b+(h+m*b)*T);else{const T=m*Math.sqrt(v*v-1);w=C=>{const _=Math.exp(-v*m*C),k=Math.min(T*C,300);return o-_*((h+v*m*b)*Math.sinh(k)+T*b*Math.cosh(k))/T}}const E={calculatedDuration:p&&c||null,next:T=>{const C=w(T);if(p)a.done=T>=c;else{let _=0;v<1&&(_=T===0?Bn(h):TS(w,T,C));const k=Math.abs(_)<=r,j=Math.abs(o-C)<=i;a.done=k&&j}return a.value=a.done?o:C,a},toString:()=>{const T=Math.min(pm(E),Nu),C=_b(_=>E.next(T*_).value,T,30);return T+"ms "+C},toTransition:()=>{}};return E}Iu.applyToOptions=e=>{const t=YP(e,100,Iu);return e.ease=Pa()?t.ease:"easeOut",e.duration=Bn(t.duration),e.type="keyframes",e};function w0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:d}){const c=e[0],f={done:!1,value:c},p=k=>a!==void 0&&k<a||l!==void 0&&k>l,h=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let v=n*t;const b=c+v,m=o===void 0?b:o(b);m!==b&&(v=m-c);const x=k=>-v*Math.exp(-k/r),w=k=>m+x(k),E=k=>{const j=x(k),R=w(k);f.done=Math.abs(j)<=u,f.value=f.done?m:R};let T,C;const _=k=>{p(f.value)&&(T=k,C=Iu({keyframes:[f.value,h(f.value)],velocity:TS(w,k,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return _(0),{calculatedDuration:null,next:k=>{let j=!1;return!C&&T===void 0&&(j=!0,E(k),_(k)),T!==void 0&&k>=T?C.next(k-T):(!j&&E(k),f)}}}const JA=Za(.42,0,1,1),eR=Za(0,0,.58,1),CS=Za(.42,0,.58,1),tR=e=>Array.isArray(e)&&typeof e[0]!="number",b0={linear:an,easeIn:JA,easeInOut:CS,easeOut:eR,circIn:Am,circInOut:oS,circOut:sS,backIn:jm,backInOut:rS,backOut:nS,anticipate:iS},S0=e=>{if(cm(e)){up(e.length===4);const[t,n,r,i]=e;return Za(t,n,r,i)}else if(typeof e=="string")return up(b0[e]!==void 0),b0[e];return e};function nR(e,t,n){const r=[],i=n||ES,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||an:t;a=Ja(l,a)}r.push(a)}return r}function rR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(up(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=nR(t,r,i),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(d<e[c+1]);c++);const f=_a(e[c],e[c+1],d);return a[c](f)};return n?d=>u(fr(e[0],e[s-1],d)):u}function iR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=_a(0,t,r);e.push(Pe(n,1,i))}}function sR(e){const t=[0];return iR(t,e.length-1),t}function oR(e,t){return e.map(n=>n*t)}function aR(e,t){return e.map(()=>t||CS).splice(0,e.length-1)}function $u({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=tR(r)?r.map(S0):S0(r),s={done:!1,value:t[0]},o=oR(n&&n.length===t.length?n:sR(t),e),a=rR(o,t,{ease:Array.isArray(i)?i:aR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const lR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>we.update(t,!0),stop:()=>ni(t),now:()=>nt.isProcessing?nt.timestamp:Un.now()}},uR={decay:w0,inertia:w0,tween:$u,keyframes:$u,spring:Iu},cR=e=>e/100;class Nm extends SS{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Dm,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=dm(n)?n:uR[n]||$u;let l,u;a!==$u&&typeof t[0]!="number"&&(l=Ja(cR,ES(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=pm(d));const{calculatedDuration:c}=d,f=c+i,p=f*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:p,repeatType:h,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,E=s;if(p){const k=Math.min(this.currentTime,d)/c;let j=Math.floor(k),R=k%1;!R&&k>=1&&(R=1),R===1&&j--,j=Math.min(j,p+1),!!(j%2)&&(h==="reverse"?(R=1-R,v&&(R-=v/c)):h==="mirror"&&(E=o)),w=fr(0,1,R)*c}const T=x?{done:!1,value:l[0]}:E.next(w);a&&(T.value=a(T.value));let{done:C}=T;!x&&u!==null&&(C=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return _&&i!==void 0&&(T.value=xc(l,this.options,i)),b&&b(T.value),_&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Vn(t.calculatedDuration):0}get time(){return Vn(this.currentTime)}set time(t){t=Bn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=lR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const dR=new Set(["opacity","clipPath","filter","transform"]),fR=lm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),zu=10,pR=2e4;function hR(e){return dm(e.type)||e.type==="spring"||!jb(e.ease)}function mR(e,t){const n=new Nm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<pR;)r=n.sample(s),i.push(r.value),s+=zu;return{times:void 0,keyframes:i,duration:s-zu,ease:"linear"}}const _S={anticipate:iS,backInOut:rS,circInOut:oS};function gR(e){return e in _S}class k0 extends SS{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new bS(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Pa()&&gR(s)&&(s=_S[s]),hR(this.options)){const{onComplete:c,onUpdate:f,motionValue:p,element:h,...v}=this.options,b=mR(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=QP(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Xv(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:c}=this.options;a.set(xc(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Vn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Vn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Bn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return an;const{animation:r}=n;Xv(r,t)}return an}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:c,element:f,...p}=this.options,h=new Nm({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),v=Bn(this.time);u.setWithVelocity(h.sample(v-zu).value,h.sample(v).value,zu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return fR()&&r&&dR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const vR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xR={type:"keyframes",duration:.8},wR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bR=(e,{keyframes:t})=>t.length>2?xR:ns.has(e)?e.startsWith("scale")?yR(t[1]):vR:wR;function SR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Mm=(e,t,n,r={},i,s)=>o=>{const a=fm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Bn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};SR(a)||(d={...d,...bR(e,d)}),d.duration&&(d.duration=Bn(d.duration)),d.repeatDelay&&(d.repeatDelay=Bn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let c=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(c=!0)),d.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const f=xc(d.keyframes,a);if(f!==void 0)return we.update(()=>{d.onUpdate(f),d.onComplete()}),new qP([])}return!s&&k0.supports(d)?new k0(d):new Nm(d)};function kR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function PS(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const c=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||u&&kR(u,d))continue;const p={delay:n,...fm(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const b=Zb(e);if(b){const m=window.MotionHandoffAnimation(b,d,we);m!==null&&(p.startTime=m,h=!0)}}pp(e,d),c.start(Mm(d,c,f,e.shouldReduceMotion&&Xb.has(d)?{type:!1}:p,e,h));const v=c.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{we.update(()=>{o&&Jj(e,o)})}),l}function kp(e,t,n={}){var l;const r=Da(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(PS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:f}=i;return ER(e,t,d+u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,d]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function ER(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(TR).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(kp(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function TR(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>kp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=kp(e,t,n);else{const i=typeof t=="function"?Da(e,t,n.custom):t;r=Promise.all(PS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function jS(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const _R=vm.length;function AS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?AS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<_R;n++){const r=vm[n],i=e.props[r];(Aa(i)||i===!1)&&(t[r]=i)}return t}const PR=[...gm].reverse(),jR=gm.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=E0(),r=!0;const i=l=>(u,d)=>{var f;const c=Da(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(c){const{transition:p,transitionEnd:h,...v}=c;u={...u,...v,...h}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,d=AS(e.parent)||{},c=[],f=new Set;let p={},h=1/0;for(let b=0;b<jR;b++){const m=PR[b],x=n[m],w=u[m]!==void 0?u[m]:d[m],E=Aa(w),T=m===l?x.isActive:null;T===!1&&(h=b);let C=w===d[m]&&w!==u[m]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...p},!x.isActive&&T===null||!w&&!x.prevProp||vc(w)||typeof w=="boolean")continue;const _=OR(x.prevProp,w);let k=_||m===l&&x.isActive&&!C&&E||b>h&&E,j=!1;const R=Array.isArray(w)?w:[w];let M=R.reduce(i(m),{});T===!1&&(M={});const{prevResolvedValues:G={}}=x,ne={...G,...M},J=X=>{k=!0,f.has(X)&&(j=!0,f.delete(X)),x.needsAnimating[X]=!0;const D=e.getValue(X);D&&(D.liveStyle=!1)};for(const X in ne){const D=M[X],L=G[X];if(p.hasOwnProperty(X))continue;let U=!1;fp(D)&&fp(L)?U=!jS(D,L):U=D!==L,U?D!=null?J(X):f.add(X):D!==void 0&&f.has(X)?J(X):x.protectedKeys[X]=!0}x.prevProp=w,x.prevResolvedValues=M,x.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&_)||j)&&c.push(...R.map(X=>({animation:X,options:{type:m}})))}if(f.size){const b={};if(typeof u.initial!="boolean"){const m=Da(e,Array.isArray(u.initial)?u.initial[0]:u.initial);m&&m.transition&&(b.transition=m.transition)}f.forEach(m=>{const x=e.getBaseTarget(m),w=e.getValue(m);w&&(w.liveStyle=!0),b[m]=x??null}),c.push({animation:b})}let v=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=E0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jS(t,e):!1}function hi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function E0(){return{animate:hi(!0),whileInView:hi(),whileHover:hi(),whileTap:hi(),whileDrag:hi(),whileFocus:hi(),exit:hi()}}class li{constructor(t){this.isMounted=!1,this.node=t}update(){}}class DR extends li{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let FR=0;class NR extends li{constructor(){super(...arguments),this.id=FR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const MR={animation:{Feature:DR},exit:{Feature:NR}};function Na(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function el(e){return{point:{x:e.pageX,y:e.pageY}}}const LR=e=>t=>mm(t)&&e(t,el(t));function na(e,t,n,r){return Na(e,t,LR(n),r)}function RS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function IR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $R(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const OS=1e-4,zR=1-OS,BR=1+OS,DS=.01,VR=0-DS,UR=0+DS;function vt(e){return e.max-e.min}function HR(e,t,n){return Math.abs(e-t)<=n}function T0(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=vt(n)/vt(t),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zR&&e.scale<=BR||isNaN(e.scale))&&(e.scale=1),(e.translate>=VR&&e.translate<=UR||isNaN(e.translate))&&(e.translate=0)}function ra(e,t,n,r){T0(e.x,t.x,n.x,r?r.originX:void 0),T0(e.y,t.y,n.y,r?r.originY:void 0)}function C0(e,t,n){e.min=n.min+t.min,e.max=e.min+vt(t)}function WR(e,t,n){C0(e.x,t.x,n.x),C0(e.y,t.y,n.y)}function _0(e,t,n){e.min=t.min-n.min,e.max=e.min+vt(t)}function ia(e,t,n){_0(e.x,t.x,n.x),_0(e.y,t.y,n.y)}const P0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rs=()=>({x:P0(),y:P0()}),j0=()=>({min:0,max:0}),Ne=()=>({x:j0(),y:j0()});function Yt(e){return[e("x"),e("y")]}function Pd(e){return e===void 0||e===1}function Ep({scale:e,scaleX:t,scaleY:n}){return!Pd(e)||!Pd(t)||!Pd(n)}function yi(e){return Ep(e)||FS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function FS(e){return A0(e.x)||A0(e.y)}function A0(e){return e&&e!=="0%"}function Bu(e,t,n){const r=e-n,i=t*r;return n+i}function R0(e,t,n,r,i){return i!==void 0&&(e=Bu(e,i,r)),Bu(e,n,r)+t}function Tp(e,t=0,n=1,r,i){e.min=R0(e.min,t,n,r,i),e.max=R0(e.max,t,n,r,i)}function NS(e,{x:t,y:n}){Tp(e.x,t.translate,t.scale,t.originPoint),Tp(e.y,n.translate,n.scale,n.originPoint)}const O0=.999999999999,D0=1.0000000000001;function qR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,NS(e,o)),r&&yi(s.latestValues)&&Ds(e,s.latestValues))}t.x<D0&&t.x>O0&&(t.x=1),t.y<D0&&t.y>O0&&(t.y=1)}function Os(e,t){e.min=e.min+t,e.max=e.max+t}function F0(e,t,n,r,i=.5){const s=Pe(e.min,e.max,i);Tp(e,t,n,s,r)}function Ds(e,t){F0(e.x,t.x,t.scaleX,t.scale,t.originX),F0(e.y,t.y,t.scaleY,t.scale,t.originY)}function MS(e,t){return RS($R(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=MS(e,n),{scroll:i}=t;return i&&(Os(r.x,i.offset.x),Os(r.y,i.offset.y)),r}const LS=({current:e})=>e?e.ownerDocument.defaultView:null,N0=(e,t)=>Math.abs(e-t);function GR(e,t){const n=N0(e.x,t.x),r=N0(e.y,t.y);return Math.sqrt(n**2+r**2)}class IS{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Ad(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=GR(c.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:h}=c,{timestamp:v}=nt;this.history.push({...h,timestamp:v});const{onStart:b,onMove:m}=this.handlers;f||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=jd(f,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Ad(c.type==="pointercancel"?this.lastMoveEventInfo:jd(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(c,b),h&&h(c,b)},!mm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=el(t),a=jd(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=nt;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Ad(a,this.history)),this.removeListeners=Ja(na(this.contextWindow,"pointermove",this.handlePointerMove),na(this.contextWindow,"pointerup",this.handlePointerUp),na(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ni(this.updatePoint)}}function jd(e,t){return t?{point:t(e.point)}:e}function M0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ad({point:e},t){return{point:e,delta:M0(e,$S(t)),offset:M0(e,QR(t)),velocity:YR(t,.1)}}function QR(e){return e[0]}function $S(e){return e[e.length-1]}function YR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=$S(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Bn(t)));)n--;if(!r)return{x:0,y:0};const s=Vn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function XR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function L0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ZR(e,{top:t,left:n,bottom:r,right:i}){return{x:L0(e.x,n,i),y:L0(e.y,t,r)}}function I0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function JR(e,t){return{x:I0(e.x,t.x),y:I0(e.y,t.y)}}function eO(e,t){let n=.5;const r=vt(e),i=vt(t);return i>r?n=_a(t.min,t.max-r,e.min):r>i&&(n=_a(e.min,e.max-i,t.min)),fr(0,1,n)}function tO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Cp=.35;function nO(e=Cp){return e===!1?e=0:e===!0&&(e=Cp),{x:$0(e,"left","right"),y:$0(e,"top","bottom")}}function $0(e,t,n){return{min:z0(e,t),max:z0(e,n)}}function z0(e,t){return typeof e=="number"?e:e[t]||0}const rO=new WeakMap;class iO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ne(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(el(d).point)},s=(d,c)=>{const{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ej(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yt(b=>{let m=this.getAxisMotionValue(b).get()||0;if(Hn.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[b];w&&(m=vt(w)*(parseFloat(m)/100))}}this.originPoint[b]=m}),h&&we.postRender(()=>h(d,c)),pp(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(d,c)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=c;if(p&&this.currentDirection===null){this.currentDirection=sO(b),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),v&&v(d,c)},a=(d,c)=>this.stop(d,c),l=()=>Yt(d=>{var c;return this.getAnimationState(d)==="paused"&&((c=this.getAxisMotionValue(d).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new IS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:LS(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&we.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Pl(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=XR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&js(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ZR(r.layoutBox,t):this.constraints=!1,this.elastic=nO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Yt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=tO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!js(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=JR(i.layout.layoutBox,s);if(n){const a=n(IR(o));this.hasMutatedConstraints=!!a,a&&(o=RS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Yt(d=>{if(!Pl(d,n,this.currentDirection))return;let c=l&&l[d]||{};o&&(c={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,h={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(d,h)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pp(this.visualElement,t),r.start(Mm(t,r,0,n,this.visualElement,!1))}stopAnimation(){Yt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Yt(n=>{const{drag:r}=this.getProps();if(!Pl(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-Pe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!js(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Yt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=eO({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Yt(o=>{if(!Pl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Pe(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;rO.set(this.visualElement,this);const t=this.visualElement.current,n=na(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();js(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),we.read(r);const o=Na(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Yt(d=>{const c=this.getAxisMotionValue(d);c&&(this.originPoint[d]+=l[d].translate,c.set(c.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Cp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Pl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class oO extends li{constructor(t){super(t),this.removeGroupControls=an,this.removeListeners=an,this.controls=new iO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||an}unmount(){this.removeGroupControls(),this.removeListeners()}}const B0=e=>(t,n)=>{e&&we.postRender(()=>e(t,n))};class aO extends li{constructor(){super(...arguments),this.removePointerDownListener=an}onPointerDown(t){this.session=new IS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:LS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:B0(t),onStart:B0(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&we.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=na(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Zl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function V0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const No={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=V0(e,t.target.x),r=V0(e,t.target.y);return`${n}% ${r}%`}},lO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ri.parse(e);if(i.length>5)return r;const s=ri.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=Pe(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class uO extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;_j(cO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Zl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||we.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hm.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function zS(e){const[t,n]=Tb(),r=g.useContext(rm);return y.jsx(uO,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Ib),isPresent:t,safeToRemove:n})}const cO={borderRadius:{...No,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:No,borderTopRightRadius:No,borderBottomLeftRadius:No,borderBottomRightRadius:No,boxShadow:lO};function dO(e,t,n){const r=ft(e)?e:ja(e);return r.start(Mm("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const pO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){om(this.children,t),this.isDirty=!0}remove(t){am(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pO),this.isDirty=!1,this.children.forEach(t)}}function mO(e,t){const n=Un.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ni(r),e(s-t))};return we.read(r,!0),()=>ni(r)}const BS=["TopLeft","TopRight","BottomLeft","BottomRight"],gO=BS.length,U0=e=>typeof e=="string"?parseFloat(e):e,H0=e=>typeof e=="number"||K.test(e);function vO(e,t,n,r,i,s){i?(e.opacity=Pe(0,n.opacity??1,yO(r)),e.opacityExit=Pe(t.opacity??1,0,xO(r))):s&&(e.opacity=Pe(t.opacity??1,n.opacity??1,r));for(let o=0;o<gO;o++){const a=`border${BS[o]}Radius`;let l=W0(t,a),u=W0(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||H0(l)===H0(u)?(e[a]=Math.max(Pe(U0(l),U0(u),r),0),(Hn.test(u)||Hn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Pe(t.rotate||0,n.rotate||0,r))}function W0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=VS(0,.5,sS),xO=VS(.5,.95,an);function VS(e,t,n){return r=>r<e?0:r>t?1:n(_a(e,t,r))}function q0(e,t){e.min=t.min,e.max=t.max}function Gt(e,t){q0(e.x,t.x),q0(e.y,t.y)}function K0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function G0(e,t,n,r,i){return e-=t,e=Bu(e,1/n,r),i!==void 0&&(e=Bu(e,1/i,r)),e}function wO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Hn.test(t)&&(t=parseFloat(t),t=Pe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Pe(s.min,s.max,r);e===s&&(a-=t),e.min=G0(e.min,t,n,a,i),e.max=G0(e.max,t,n,a,i)}function Q0(e,t,[n,r,i],s,o){wO(e,t[n],t[r],t[i],t.scale,s,o)}const bO=["x","scaleX","originX"],SO=["y","scaleY","originY"];function Y0(e,t,n,r){Q0(e.x,t,bO,n?n.x:void 0,r?r.x:void 0),Q0(e.y,t,SO,n?n.y:void 0,r?r.y:void 0)}function X0(e){return e.translate===0&&e.scale===1}function US(e){return X0(e.x)&&X0(e.y)}function Z0(e,t){return e.min===t.min&&e.max===t.max}function kO(e,t){return Z0(e.x,t.x)&&Z0(e.y,t.y)}function J0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function HS(e,t){return J0(e.x,t.x)&&J0(e.y,t.y)}function ey(e){return vt(e.x)/vt(e.y)}function ty(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class EO{constructor(){this.members=[]}add(t){om(this.members,t),t.scheduleRender()}remove(t){if(am(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function TO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:c,rotateY:f,skewX:p,skewY:h}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),c&&(r+=`rotateX(${c}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Rd=["","X","Y","Z"],CO={visibility:"hidden"},ny=1e3;let _O=0;function Od(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function WS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Zb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&WS(r)}function qS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=_O++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(NO),this.nodes.forEach(MO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new um),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=mO(f,250),Zl.hasAnimatedSinceResize&&(Zl.hasAnimatedSinceResize=!1,this.nodes.forEach(iy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||BO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:m}=d.getProps(),x=!this.targetLayout||!HS(this.targetLayout,h),w=!f&&p;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,w);const E={...fm(v,"layout"),onPlay:b,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else f||iy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ni(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&WS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const c=this.path[d];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ry);return}this.isUpdating||this.nodes.forEach(DO),this.isUpdating=!1,this.nodes.forEach(FO),this.nodes.forEach(PO),this.nodes.forEach(jO),this.clearAllSnapshots();const a=Un.now();nt.delta=fr(0,1e3/60,a-nt.timestamp),nt.timestamp=a,nt.isProcessing=!0,Sd.update.process(nt),Sd.preRender.process(nt),Sd.render.process(nt),nt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(IO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ne(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!US(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||yi(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),VO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ne();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(UO))){const{scroll:d}=this.root;d&&(Os(a.x,d.offset.x),Os(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ne();if(Gt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:c,options:f}=d;d!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&Gt(a,o),Os(a.x,c.offset.x),Os(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Ne();Gt(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ds(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yi(d.latestValues)&&Ds(l,d.latestValues)}return yi(this.latestValues)&&Ds(l,this.latestValues),l}removeTransform(o){const a=Ne();Gt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!yi(u.latestValues))continue;Ep(u.latestValues)&&u.updateSnapshot();const d=Ne(),c=u.measurePageBox();Gt(d,c),Y0(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yi(this.latestValues)&&Y0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==nt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:c}=this.options;if(!(!this.layout||!(d||c))){if(this.resolvedRelativeTargetAt=nt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),ia(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ne(),this.targetWithTransforms=Ne()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),WR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Gt(this.target,this.layout.layoutBox),NS(this.target,this.targetDelta)):Gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),ia(this.relativeTargetOrigin,this.target,p.target),Gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ep(this.parent.latestValues)||FS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var h;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===nt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Gt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,f=this.treeScale.y;qR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ne());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(K0(this.prevProjectionDelta.x,this.projectionDelta.x),K0(this.prevProjectionDelta.y,this.projectionDelta.y)),ra(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!ty(this.projectionDelta.x,this.prevProjectionDelta.x)||!ty(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rs(),this.projectionDelta=Rs(),this.projectionDeltaWithTransform=Rs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},c=Rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ne(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,v=p!==h,b=this.getStack(),m=!b||b.members.length<=1,x=!!(v&&!m&&this.options.crossfade===!0&&!this.path.some(zO));this.animationProgress=0;let w;this.mixTargetDelta=E=>{const T=E/1e3;sy(c.x,o.x,T),sy(c.y,o.y,T),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ia(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$O(this.relativeTarget,this.relativeTargetOrigin,f,T),w&&kO(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ne()),Gt(w,this.relativeTarget)),v&&(this.animationValues=d,vO(d,u,this.latestValues,T,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ni(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Zl.hasAnimatedSinceResize=!0,this.currentAnimation=dO(0,ny,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ny),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&KS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ne();const c=vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const f=vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Gt(a,l),Ds(a,d),ra(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new EO),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Od("z",o,u,this.animationValues);for(let d=0;d<Rd.length;d++)Od(`rotate${Rd[d]}`,o,u,this.animationValues),Od(`skew${Rd[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Xl(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Xl(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!yi(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=TO(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:c,y:f}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in Ra){if(d[p]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:b}=Ra[p],m=a.transform==="none"?d[p]:h(d[p],u);if(v){const x=v.length;for(let w=0;w<x;w++)a[v[w]]=m}else b?this.options.visualElement.renderState.vars[p]=m:a[p]=m}return this.options.layoutId&&(a.pointerEvents=u===this?Xl(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ry),this.root.sharedNodes.clear()}}}function PO(e){e.updateLayout()}function jO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Yt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(f);f.min=r[c].min,f.max=f.min+p}):KS(s,t.layoutBox,r)&&Yt(c=>{const f=o?t.measuredBox[c]:t.layoutBox[c],p=vt(r[c]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+p)});const a=Rs();ra(a,r,t.layoutBox);const l=Rs();o?ra(l,e.applyTransform(i,!0),t.measuredBox):ra(l,r,t.layoutBox);const u=!US(a);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:p}=c;if(f&&p){const h=Ne();ia(h,t.layoutBox,f.layoutBox);const v=Ne();ia(v,r,p.layoutBox),HS(h,v)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function ry(e){e.clearMeasurements()}function DO(e){e.isLayoutDirty=!1}function FO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function iy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NO(e){e.resolveTargetDelta()}function MO(e){e.calcProjection()}function LO(e){e.resetSkewAndRotation()}function IO(e){e.removeLeadSnapshot()}function sy(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oy(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function $O(e,t,n,r){oy(e.x,t.x,n.x,r),oy(e.y,t.y,n.y,r)}function zO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const BO={duration:.45,ease:[.4,0,.1,1]},ay=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ly=ay("applewebkit/")&&!ay("chrome/")?Math.round:an;function uy(e){e.min=ly(e.min),e.max=ly(e.max)}function VO(e){uy(e.x),uy(e.y)}function KS(e,t,n){return e==="position"||e==="preserve-aspect"&&!HR(ey(t),ey(n),.2)}function UO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const HO=qS({attachResizeListener:(e,t)=>Na(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dd={current:void 0},GS=qS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dd.current){const e=new HO({});e.mount(window),e.setOptions({layoutScroll:!0}),Dd.current=e}return Dd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),WO={pan:{Feature:aO},drag:{Feature:oO,ProjectionNode:GS,MeasureLayout:zS}};function cy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&we.postRender(()=>s(t,el(t)))}class qO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=nj(t,(n,r)=>(cy(this.node,r,"Start"),i=>cy(this.node,i,"End"))))}unmount(){}}class KO extends li{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ja(Na(this.node.current,"focus",()=>this.onFocus()),Na(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dy(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&we.postRender(()=>s(t,el(t)))}class GO extends li{mount(){const{current:t}=this.node;t&&(this.unmount=oj(t,(n,r)=>(dy(this.node,r,"Start"),(i,{success:s})=>dy(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _p=new WeakMap,Fd=new WeakMap,QO=e=>{const t=_p.get(e.target);t&&t(e)},YO=e=>{e.forEach(QO)};function XO({root:e,...t}){const n=e||document;Fd.has(n)||Fd.set(n,{});const r=Fd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(YO,{root:e,...t})),r[i]}function ZO(e,t,n){const r=XO(t);return _p.set(e,n),r.observe(e),()=>{_p.delete(e),r.unobserve(e)}}const JO={some:0,all:1};class e3 extends li{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:JO[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return ZO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(t3(t,n))&&this.startObserver()}unmount(){}}function t3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const n3={inView:{Feature:e3},tap:{Feature:GO},focus:{Feature:KO},hover:{Feature:qO}},r3={layout:{ProjectionNode:GS,MeasureLayout:zS}},Pp={current:null},QS={current:!1};function i3(){if(QS.current=!0,!!im)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pp.current=e.matches;e.addListener(t),t()}else Pp.current=!1}const s3=[...wS,ct,ri],o3=e=>s3.find(xS(e)),a3=new WeakMap;function l3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ft(i))e.addValue(r,i);else if(ft(s))e.addValue(r,ja(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,ja(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const fy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class u3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Un.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,we.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=yc(n),this.isVariantNode=Mb(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const h=f[p];l[p]!==void 0&&ft(h)&&h.set(l[p],!1)}}mount(t){this.current=t,a3.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),QS.current||i3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ni(this.notifyUpdate),ni(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ns.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&we.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in co){const n=co[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ne()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<fy.length;r++){const i=fy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=l3(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ja(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(vS(r)||aS(r))?r=parseFloat(r):!o3(r)&&ri.test(n)&&(r=hS(t,n)),this.setBaseTarget(t,ft(r)?r.get():r)),ft(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=_m(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ft(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new um),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class YS extends u3{constructor(){super(...arguments),this.KeyframeResolver=bS}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function c3(e){return window.getComputedStyle(e)}class d3 extends YS{constructor(){super(...arguments),this.type="html",this.renderInstance=Kb}readValueFromInstance(t,n){if(ns.has(n))return EA(t,n);{const r=c3(t),i=(xm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return MS(t,n)}build(t,n,r){Sm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Pm(t,n,r)}}class f3 extends YS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&qb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ns.has(n)){const r=pS(n);return r&&r.default||0}return n=Gb.has(n)?n:ym(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Yb(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&we.postRender(this.updateDimensions)}build(t,n,r){Tm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Qb(t,n,r,i)}mount(t){this.isSVGTag=Cm(t.tagName),super.mount(t)}}const p3=(e,t)=>Em(e)?new f3(t):new d3(t,{allowProjection:e!==g.Fragment}),h3=Xj({...MR,...n3,...WO,...r3},p3),Te=pj(h3);class m3{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const g3=()=>new m3;function v3(){return hc(g3)}const y3=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),Ft=e=>{const[t,n]=e.split("-");return y3(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var Tr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Tr||{});const XS=g.createContext({}),x3={[Y.Background]:"",[Y.Border]:"initial",[Y.TooltipText]:Ft("blue-700"),[Y.TooltipBackground]:Ft("blue-100"),[Y.TooltipBorder]:Ft("blue-500"),[Y.HeaderBackground]:Ft("blue-600"),[Y.HeaderBorder]:"initial",[Y.HeaderText]:"white",[Y.FooterBackground]:"",[Y.FooterBorder]:"",[Y.FooterText]:"",[Y.MessageAdminBackground]:"",[Y.MessageAdminText]:"",[Y.MessageVisitorBackground]:"",[Y.MessageVisitorText]:"",[Y.GreeterBackground]:"white",[Y.GreeterText]:Ft("slate-700"),[Y.GreeterBorder]:Ft("slate-200"),[Y.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[Y.GreeterTopText]:"white",[Y.GreeterButtonBackground]:Ft("indigo-600"),[Y.GreeterButtonText]:Ft("white"),[Y.ButtonBackground]:Ft("indigo-600"),[Y.ButtonText]:Ft("white"),[Y.InputBackground]:Ft("white"),[Y.InputText]:Ft("slate-800"),[Y.InputBorder]:Ft("slate-200")},w3={[Tr.None]:"0px",[Tr.Sm]:"var(--radius-xs)",[Tr.Md]:"var(--radius-sm)",[Tr.Lg]:"var(--radius-md)",[Tr.Xl]:"var(--radius-lg)",[Tr.Full]:"calc(infinity * 1px)"},b3=e=>{const t={...x3};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function S3({children:e,widget:t}){const n=b3(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Tr.Md,i=o=>n[o],s=()=>w3[r];return y.jsx(XS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const hr=()=>g.useContext(XS);function rn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=Y.ButtonText,bgKey:u=Y.ButtonBackground,animations:d={},withoutTheming:c,...f}){const p=hr();return y.jsx(Te.button,{type:t,className:fe("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,Gv[n]&&Gv[n][r],IP[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:p.getColor(l),backgroundColor:p.getColor(u),...o?{}:{borderRadius:p.getRadius()}},...d,...f,children:e})}function ve(){}ve.Home=function(t){return y.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};ve.Chat=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ve.Menu=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});ve.MessageTyping=({className:e="size-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});ve.Check=function(t){return y.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};ve.Website=function(t){return y.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};ve.ArrowDown=e=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});ve.XCircle=({className:e="e-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});ve.X=({className:e="e-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});ve.PaperAirplane=({className:e="e-5",...t})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});ve.Spin=function(t){return y.jsx("svg",{"data-name":"Layer 1",viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:y.jsx("path",{d:"M6.804 15a1 1 0 00-1.366-.366l-1.732 1a1 1 0 001 1.732l1.732-1A1 1 0 006.804 15zM3.706 8.366l1.732 1a1 1 0 101-1.732l-1.732-1a1 1 0 00-1 1.732zM6 12a1 1 0 00-1-1H3a1 1 0 000 2h2a1 1 0 001-1zm11.196-3a1 1 0 001.366.366l1.732-1a1 1 0 10-1-1.732l-1.732 1A1 1 0 0017.196 9zM15 6.804a1 1 0 001.366-.366l1-1.732a1 1 0 10-1.732-1l-1 1.732A1 1 0 0015 6.804zm5.294 8.83l-1.732-1a1 1 0 10-1 1.732l1.732 1a1 1 0 001-1.732zm-3.928 1.928a1 1 0 10-1.732 1l1 1.732a1 1 0 101.732-1zM21 11h-2a1 1 0 000 2h2a1 1 0 000-2zm-9 7a1 1 0 00-1 1v2a1 1 0 002 0v-2a1 1 0 00-1-1zm-3-.804a1 1 0 00-1.366.366l-1 1.732a1 1 0 001.732 1l1-1.732A1 1 0 009 17.196zM12 2a1 1 0 00-1 1v2a1 1 0 002 0V3a1 1 0 00-1-1z"})})};const qn=Object.create(null);qn.open="0";qn.close="1";qn.ping="2";qn.pong="3";qn.message="4";qn.upgrade="5";qn.noop="6";const Jl=Object.create(null);Object.keys(qn).forEach(e=>{Jl[qn[e]]=e});const jp={type:"error",data:"parser error"},ZS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",JS=typeof ArrayBuffer=="function",ek=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Lm=({type:e,data:t},n,r)=>ZS&&t instanceof Blob?n?r(t):py(t,r):JS&&(t instanceof ArrayBuffer||ek(t))?n?r(t):py(new Blob([t]),r):r(qn[e]+(t||"")),py=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function hy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Nd;function k3(e,t){if(ZS&&e.data instanceof Blob)return e.data.arrayBuffer().then(hy).then(t);if(JS&&(e.data instanceof ArrayBuffer||ek(e.data)))return t(hy(e.data));Lm(e,!1,n=>{Nd||(Nd=new TextEncoder),t(Nd.encode(n))})}const my="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<my.length;e++)Wo[my.charCodeAt(e)]=e;const E3=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)s=Wo[e.charCodeAt(r)],o=Wo[e.charCodeAt(r+1)],a=Wo[e.charCodeAt(r+2)],l=Wo[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return u},T3=typeof ArrayBuffer=="function",Im=(e,t)=>{if(typeof e!="string")return{type:"message",data:tk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C3(e.substring(1),t)}:Jl[n]?e.length>1?{type:Jl[n],data:e.substring(1)}:{type:Jl[n]}:jp},C3=(e,t)=>{if(T3){const n=E3(e);return tk(n,t)}else return{base64:!0,data:e}},tk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},nk="",_3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Lm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(nk))})})},P3=(e,t)=>{const n=e.split(nk),r=[];for(let i=0;i<n.length;i++){const s=Im(n[i],t);if(r.push(s),s.type==="error")break}return r};function j3(){return new TransformStream({transform(e,t){k3(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Md;function jl(e){return e.reduce((t,n)=>t+n.length,0)}function Al(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function A3(e,t){Md||(Md=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(jl(n)<1)break;const l=Al(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(jl(n)<2)break;const l=Al(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(jl(n)<8)break;const l=Al(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(jp);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(jl(n)<i)break;const l=Al(n,i);a.enqueue(Im(s?l:Md.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(jp);break}}}})}const rk=4;function Ie(e){if(e)return R3(e)}function R3(e){for(var t in Ie.prototype)e[t]=Ie.prototype[t];return e}Ie.prototype.on=Ie.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ie.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ie.prototype.off=Ie.prototype.removeListener=Ie.prototype.removeAllListeners=Ie.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ie.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Ie.prototype.emitReserved=Ie.prototype.emit;Ie.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ie.prototype.hasListeners=function(e){return!!this.listeners(e).length};const wc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),tn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),O3="arraybuffer";function ik(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const D3=tn.setTimeout,F3=tn.clearTimeout;function bc(e,t){t.useNativeTimers?(e.setTimeoutFn=D3.bind(tn),e.clearTimeoutFn=F3.bind(tn)):(e.setTimeoutFn=tn.setTimeout.bind(tn),e.clearTimeoutFn=tn.clearTimeout.bind(tn))}const N3=1.33;function M3(e){return typeof e=="string"?L3(e):Math.ceil((e.byteLength||e.size)*N3)}function L3(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function sk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function I3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function $3(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class z3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class $m extends Ie{constructor(t){super(),this.writable=!1,bc(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new z3(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Im(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=I3(t);return n.length?"?"+n:""}}class B3 extends $m{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};P3(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,_3(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=sk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let ok=!1;try{ok=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const V3=ok;function U3(){}class H3 extends B3{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Wn extends Ie{constructor(t,n,r){super(),this.createRequest=t,bc(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=ik(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Wn.requestsCount++,Wn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=U3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Wn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Wn.requestsCount=0;Wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",gy);else if(typeof addEventListener=="function"){const e="onpagehide"in tn?"pagehide":"unload";addEventListener(e,gy,!1)}}function gy(){for(let e in Wn.requests)Wn.requests.hasOwnProperty(e)&&Wn.requests[e].abort()}const W3=function(){const e=ak({xdomain:!1});return e&&e.responseType!==null}();class q3 extends H3{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=W3&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Wn(ak,this.uri(),t)}}function ak(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||V3))return new XMLHttpRequest}catch{}if(!t)try{return new tn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const lk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class K3 extends $m{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=lk?{}:ik(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Lm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=sk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ld=tn.WebSocket||tn.MozWebSocket;class G3 extends K3{createSocket(t,n,r){return lk?new Ld(t,n,r):n?new Ld(t,n):new Ld(t)}doWrite(t,n){this.ws.send(n)}}class Q3 extends $m{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=A3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=j3();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Y3={websocket:G3,webtransport:Q3,polling:q3},X3=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z3=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ap(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=X3.exec(e||""),s={},o=14;for(;o--;)s[Z3[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=J3(s,s.path),s.queryKey=eD(s,s.query),s}function J3(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function eD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Rp=typeof addEventListener=="function"&&typeof removeEventListener=="function",eu=[];Rp&&addEventListener("offline",()=>{eu.forEach(e=>e())},!1);class Xr extends Ie{constructor(t,n){if(super(),this.binaryType=O3,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Ap(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Ap(n.host).host);bc(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$3(this.opts.query)),Rp&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},eu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=rk,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Xr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Xr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=M3(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,wc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Xr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Rp&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=eu.indexOf(this._offlineEventListener);r!==-1&&eu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=rk;class tD extends Xr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Xr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=c=>{const f=new Error("probe error: "+c);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const d=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let nD=class extends tD{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Y3[i]).filter(i=>!!i)),super(t,r)}};function rD(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Ap(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const iD=typeof ArrayBuffer=="function",sD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,uk=Object.prototype.toString,oD=typeof Blob=="function"||typeof Blob<"u"&&uk.call(Blob)==="[object BlobConstructor]",aD=typeof File=="function"||typeof File<"u"&&uk.call(File)==="[object FileConstructor]";function zm(e){return iD&&(e instanceof ArrayBuffer||sD(e))||oD&&e instanceof Blob||aD&&e instanceof File}function tu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(tu(e[n]))return!0;return!1}if(zm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return tu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&tu(e[n]))return!0;return!1}function lD(e){const t=[],n=e.data,r=e;return r.data=Op(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Op(e,t){if(!e)return e;if(zm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Op(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Op(e[r],t));return n}return e}function uD(e,t){return e.data=Dp(e.data,t),delete e.attachments,e}function Dp(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Dp(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Dp(e[n],t));return e}const cD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],dD=5;var le;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(le||(le={}));class fD{constructor(t){this.replacer=t}encode(t){return(t.type===le.EVENT||t.type===le.ACK)&&tu(t)?this.encodeAsBinary({type:t.type===le.EVENT?le.BINARY_EVENT:le.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===le.BINARY_EVENT||t.type===le.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=lD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function vy(e){return Object.prototype.toString.call(e)==="[object Object]"}class Bm extends Ie{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===le.BINARY_EVENT;r||n.type===le.BINARY_ACK?(n.type=r?le.EVENT:le.ACK,this.reconstructor=new pD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(zm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(le[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===le.BINARY_EVENT||r.type===le.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(Bm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case le.CONNECT:return vy(n);case le.DISCONNECT:return n===void 0;case le.CONNECT_ERROR:return typeof n=="string"||vy(n);case le.EVENT:case le.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&cD.indexOf(n[0])===-1);case le.ACK:case le.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class pD{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=uD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const hD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Bm,Encoder:fD,get PacketType(){return le},protocol:dD},Symbol.toStringTag,{value:"Module"}));function wn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const mD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ck extends Ie{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[wn(t,"open",this.onopen.bind(this)),wn(t,"packet",this.onpacket.bind(this)),wn(t,"error",this.onerror.bind(this)),wn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(mD.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:le.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,c=n.pop();this._registerAckCallback(d,c),o.id=d}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:le.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case le.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case le.EVENT:case le.BINARY_EVENT:this.onevent(t);break;case le.ACK:case le.BINARY_ACK:this.onack(t);break;case le.DISCONNECT:this.ondisconnect();break;case le.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:le.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:le.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function So(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}So.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};So.prototype.reset=function(){this.attempts=0};So.prototype.setMin=function(e){this.ms=e};So.prototype.setMax=function(e){this.max=e};So.prototype.setJitter=function(e){this.jitter=e};class Fp extends Ie{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,bc(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new So({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||hD;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new nD(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=wn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=wn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(wn(t,"ping",this.onping.bind(this)),wn(t,"data",this.ondata.bind(this)),wn(t,"error",this.onerror.bind(this)),wn(t,"close",this.onclose.bind(this)),wn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){wc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new ck(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Mo={};function nu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=rD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Mo[i]&&s in Mo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Fp(r,t):(Mo[i]||(Mo[i]=new Fp(r,t)),l=Mo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(nu,{Manager:Fp,Socket:ck,io:nu,connect:nu});const ru=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},dk=g.createContext(null),rs=()=>g.useContext(dk),gD=({children:e})=>{const[t,n]=g.useState(null),[r,i]=g.useState(!1),s=()=>{const c=nu(E2,{transports:["websocket"],auth:{customer_token:Bs(on.CustomerToken)||ru("customer_token"),device_id:Bs(on.DeviceId)||ru("device_id"),customer_refresh_token:Bs(on.CustomerRefreshToken)||ru("customer_refresh_token")}});c.on("error",f=>{console.error("Websocket error",f)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,f)=>{t&&t.on(c,f)},u=(c,f)=>{t&&t.off(c,f)},d=(c,f,p)=>{t&&t.emit(c,f,p)};return y.jsx(dk.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:d},children:e})};var Kn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Kn||{}),rt=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e.ChatToggleUpload="chat:user:upload:toggle",e))(rt||{});const Vm=e=>{const t=hb(),n=(r,i)=>{var o;const s=((o=z$.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,u])=>a.replace(`:${l}`,u),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}};function vD(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const yD=()=>Jh({mutationFn:e=>yo(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),xD=e=>yo(`clients/${e}/chats`),Np=e=>yo(`clients/${e}/chats`,{method:"DELETE"}),wD=(e,t)=>yo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{"X-Customer-Token":Bs(on.CustomerToken)||"","X-Customer-Refresh-Token":Bs(on.CustomerRefreshToken)||"","X-Device-Id":Bs(on.DeviceId)||""}}),bD=()=>Jh({mutationFn:e=>wD(e.rating,e.comment)}),SD=e=>Jh({mutationFn:t=>yo(`clients/${e}/chats/files`,{method:"POST",body:P2({files:t},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})});function kD(e){return e&&typeof e=="object"&&"file_urls"in e}const Um=(e,t,n)=>{const r=typeof window<"u"?window:void 0;g.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},ko=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function Mp({text:e}){var o,a,l,u;const{widget:t,isHaveChat:n}=cn(),r=hr(),[i,s]=g.useState(!0);return i?y.jsxs(Te.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:fe("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(Y.TooltipBackground),color:r.getColor(Y.TooltipText)},children:[y.jsx("button",{onClick:()=>s(!1),className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":"Kapat",children:y.jsx(ve.X,{className:"size-3"})}),y.jsx(Te.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:r.getColor(Y.TooltipText)},children:e||(n?(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message_active:(u=(l=t==null?void 0:t.appearance)==null?void 0:l.design)==null?void 0:u.tooltip_message)||"Bizimle sohbet edin!"}),y.jsx("div",{className:fe("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]}):null}const ED="/notify.mp3",TD=async e=>{await new Audio(e||ED).play()};function yy({fallback:e,fallbackOpen:t}){const[n]=g.useState(window.document.title),r=rs(),{isHaveChat:i,open:s,soundPath:o}=cn(),[a,l]=g.useState(!0),[u,d]=g.useState(0),[c,f]=g.useState(null),p=()=>{TD(o)},h=(v,b)=>{if(c&&clearInterval(c),v||!i||b===0||Number.isNaN(b)){window.document.title=n,f(null);return}const m=setInterval(()=>{if(v||!i||b===0||Number.isNaN(b)){window.document.title=n,clearInterval(m),f(null);return}const x=`${b} Yeni mesajınız var! - ${n}`;window.document.title!==x?window.document.title=x:window.document.title=n},1e3);return f(m),()=>{clearInterval(m),f(null)}};return g.useEffect(()=>h(s&&a,u),[u,s,a]),g.useEffect(()=>{const v=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",v,!1),()=>{document.removeEventListener("visibilitychange",v)}},[]),g.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const v=()=>{!i||s&&a||(d(b=>b+1),p())};return r.on(rt.MessageAgentCreate,v),r.on(rt.ChatUserAssignee,p),()=>{r.off(rt.MessageAgentCreate,v),r.off(rt.ChatUserAssignee,p)}},[r,i,s,a]),s?null:!i||u===0?t?e:null:y.jsx(Mp,{text:"Yeni mesajlar var!"})}function CD({children:e,defaultOpen:t,border:n}){var R,M,G,ne;const r=rs(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=cn(),[u]=g.useState(!0),d=Vm(),c=Ya(),f=hr(),p=ko(),[h,v]=g.useState({x:0,y:0}),b=v3(),m=g.useRef(null),x=g.useRef(null),[w,E]=g.useState(!1);g.useEffect(()=>((()=>{E("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{E(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{E(!0)})}),[]),g.useEffect(()=>{a&&c.pathname==="/"&&d.push("chat")},[a]);const T=J=>{if(!m.current||!x.current)return J;const ee=m.current.getBoundingClientRect(),Q={width:window.innerWidth,height:window.innerHeight},X={top:20,right:20,bottom:40,left:20};let D=J.x,L=J.y;return ee.right+D-h.x>Q.width-X.right&&(D=Q.width-X.right-ee.width-(ee.left-h.x)),ee.left+D-h.x<X.left&&(D=X.left-(ee.left-h.x)),ee.bottom+L-h.y>Q.height-X.bottom&&(L=Q.height-X.bottom-ee.height-(ee.top-h.y)),ee.top+L-h.y<X.top&&(L=X.top-(ee.top-h.y)),{x:D,y:L}},C=()=>{s(!0),r&&r.emit(Kn.WidgetOpen,{})},_=()=>{s(!1),r&&r.emit(Kn.WidgetClose,{})},k=()=>{s(!1),o(!1),Np(l.client_id),d.push("registration")};g.useEffect(()=>{if(t&&!p&&s(!0),!(!r||!l))return r.on(rt.Banned,k),()=>{r.off(rt.Banned,k)}},[]),g.useEffect(()=>(p&&i?document.body.style.setProperty("overflow","hidden","important"):document.body.style.setProperty("overflow","auto","important"),()=>{document.body.style.setProperty("overflow","auto","important")}),[p,i]);function j(J){w&&b.start(J)}return y.jsx("section",{className:"relative w-full h-full",ref:x,children:y.jsxs(Yr,{children:[i&&y.jsx(Te.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:p?"100%":((M=(R=l==null?void 0:l.appearance)==null?void 0:R.design)==null?void 0:M.width)||"21rem",height:p?"var(--app-height, 100dvh)":((ne=(G=l==null?void 0:l.appearance)==null?void 0:G.design)==null?void 0:ne.height)||"30rem",left:p?"0":"",right:p?"0px !important":"",maxHeight:p?"var(--app-height, 100dvh)":"",borderColor:f.getColor(Y.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:fe("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!p,"!bottom-0 !right-0":p}),children:e}),!w&&y.jsx("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:y.jsxs(Yr,{children:[y.jsx(yy,{fallback:y.jsx(Mp,{}),fallbackOpen:u}),!i&&y.jsxs(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[y.jsx(Te.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:f.getColor(Y.ButtonBackground)}}),y.jsx(ve.Chat,{className:"size-7"})]}),i&&!p&&y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:_,children:y.jsx(ve.X,{className:"size-7"})})]})}),w&&y.jsx(Te.div,{ref:m,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:h.x,y:h.y},drag:w,dragControls:b,dragMomentum:!1,dragElastic:0,onDragEnd:(J,ee)=>{const Q={x:h.x+ee.offset.x,y:h.y+ee.offset.y},X=T(Q);v(X)},children:y.jsxs(Yr,{children:[y.jsx(yy,{fallback:y.jsx(Mp,{}),fallbackOpen:u}),!i&&y.jsx("div",{className:"cursor-move",onPointerDown:j,children:y.jsxs(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:C,children:[y.jsx(Te.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:fe("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:f.getColor(Y.ButtonBackground)}}),y.jsx(ve.Chat,{className:"size-7"})]})}),i&&!p&&y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:_,children:y.jsx(ve.X,{className:"size-7"})})]})})]})})}function fk(e){const{widget:t}=cn();return y.jsx(S3,{widget:t,children:y.jsx(CD,{...e})})}function is(e){this._maxSize=e,this.clear()}is.prototype.clear=function(){this._size=0,this._values=Object.create(null)};is.prototype.get=function(e){return this._values[e]};is.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var _D=/[^.^\]^[]+|(?=\[\]|\.\.)/g,pk=/^\d+$/,PD=/^\d/,jD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,AD=/^\s*(['"]?)(.*?)(\1)\s*$/,Hm=512,xy=new is(Hm),wy=new is(Hm),by=new is(Hm),zi={Cache:is,split:Lp,normalizePath:Id,setter:function(e){var t=Id(e);return wy.get(e)||wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=Id(e);return by.get(e)||by.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(Wm(n)||pk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){RD(Array.isArray(e)?e:Lp(e),t,n)}};function Id(e){return xy.get(e)||xy.set(e,Lp(e).map(function(t){return t.replace(AD,"$2")}))}function Lp(e){return e.match(_D)||[""]}function RD(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(FD(i)&&(i='"'+i+'"'),a=Wm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Wm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function OD(e){return e.match(PD)&&!e.match(pk)}function DD(e){return jD.test(e)}function FD(e){return!Wm(e)&&(OD(e)||DD(e))}const ND=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Sc=e=>e.match(ND)||[],kc=e=>e[0].toUpperCase()+e.slice(1),qm=(e,t)=>Sc(e).join(t).toLowerCase(),hk=e=>Sc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),MD=e=>kc(hk(e)),LD=e=>qm(e,"_"),ID=e=>qm(e,"-"),$D=e=>kc(qm(e," ")),zD=e=>Sc(e).map(kc).join(" ");var $d={words:Sc,upperFirst:kc,camelCase:hk,pascalCase:MD,snakeCase:LD,kebabCase:ID,sentenceCase:$D,titleCase:zD},Km={exports:{}};Km.exports=function(e){return mk(BD(e),e)};Km.exports.array=mk;function mk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=VD(t),a=UD(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(u,d,c){if(c.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[d]){i[d]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),d=p.length){c.add(u);do{var h=p[--d];l(h,a.get(h),c)}while(d);c.delete(u)}r[--n]=u}}}function BD(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function VD(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function UD(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var HD=Km.exports;const WD=Yi(HD),qD=Object.prototype.toString,KD=Error.prototype.toString,GD=RegExp.prototype.toString,QD=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",YD=/^Symbol\((.*)\)(.*)$/;function XD(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Sy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return XD(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return QD.call(e).replace(YD,"Symbol($1)");const r=qD.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+KD.call(e)+"]":r==="RegExp"?GD.call(e):null}function Zr(e,t){let n=Sy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=Sy(this[r],t);return s!==null?s:i},2)}function gk(e){return e==null?[]:[].concat(e)}let vk,yk,xk,ZD=/\$\{\s*(\w+)\s*\}/g;vk=Symbol.toStringTag;class ky{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[vk]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],gk(t).forEach(s=>{if(_t.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}yk=Symbol.hasInstance;xk=Symbol.toStringTag;class _t extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(ZD,(i,s)=>Zr(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new ky(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xk]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,_t)}static[yk](t){return ky[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Dn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Zr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Zr(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Zr(n,!0)}\``+i}},St={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},JD={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Ip={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},eF={isValue:"${path} field must be ${value}"},iu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},tF={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},nF={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Zr(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Zr(n,!0)}\``}return _t.formatError(Dn.notType,e)}};Object.assign(Object.create(null),{mixed:Dn,string:St,number:JD,date:Ip,object:iu,array:tF,boolean:eF,tuple:nF});const Gm=e=>e&&e.__isYupSchema__;class Vu{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Vu(t,(a,l)=>{var u;let d=o(...a)?i:s;return(u=d==null?void 0:d(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!Gm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Rl={context:"$",value:"."};class ss{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Rl.context,this.isValue=this.key[0]===Rl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Rl.context:this.isValue?Rl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&zi.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}ss.prototype.__isYupRef=!0;const Pi=e=>e==null;function ms(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:d,params:c,message:f,skipAbsent:p}=e;let{parent:h,context:v,abortEarly:b=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=i;function x(M){return ss.isRef(M)?M.getValue(n,h,v):M}function w(M={}){const G=Object.assign({value:n,originalValue:s,label:o.spec.label,path:M.path||r,spec:o.spec,disableStackTrace:M.disableStackTrace||m},c,M.params);for(const J of Object.keys(G))G[J]=x(G[J]);const ne=new _t(_t.formatError(M.message||f,G),n,G.path,M.type||u,G.disableStackTrace);return ne.params=G,ne}const E=b?a:l;let T={path:r,parent:h,type:u,from:i.from,createError:w,resolve:x,options:i,originalValue:s,schema:o};const C=M=>{_t.isError(M)?E(M):M?l(null):E(w())},_=M=>{_t.isError(M)?E(M):a(M)};if(p&&Pi(n))return C(!0);let j;try{var R;if(j=d.call(T,n,T),typeof((R=j)==null?void 0:R.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,_)}}catch(M){_(M);return}C(j)}return t.OPTIONS=e,t}function rF(e,t,n,r=n){let i,s,o;return t?(zi.forEach(t,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",f=u?parseInt(d,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[f],e=c?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[d],e=e.fields[d]}s=d,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Uu extends Set{describe(){const t=[];for(const n of this.values())t.push(ss.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Uu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Fs(e,t=new Map){if(Gm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Fs(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Fs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Fs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Fs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Gn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Uu,this._blacklist=new Uu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Dn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Fs(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&Pi(s))return s;let o=Zr(t),a=Zr(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
96
96
 
97
97
  attempted value: ${o}
98
- `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,d=>{if(d.length)return i(d,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:u}=t,d=v=>{i||(i=!0,n(v,o))},c=v=>{i||(i=!0,r(v,o))},f=s.length,p=[];if(!f)return c([]);let h={value:o,originalValue:a,path:l,options:u,schema:this};for(let v=0;v<s.length;v++){const b=s[v];b(h,d,function(x){x&&(Array.isArray(x)?p.push(...x):p.push(x)),--f<=0&&c(p)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const d=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(c,f,p)=>this.resolve(d)._validate(u,d,f,p)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,u)=>{_t.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new _t(l,u,void 0,void 0,s)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw _t.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new _t(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(_t.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(_t.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Fs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=ms({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=ms({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=On.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=On.notNull){return this.nullability(!1,t)}required(t=On.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=On.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ms(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=gk(t).map(s=>new ss(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Vu(i,n):Vu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ms({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=On.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=ms({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=On.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=ms({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,d)=>d.findIndex(c=>c.name===l.name)===u)}}}Gn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Gn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=rF(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Gn.prototype[e]=Gn.prototype.oneOf;for(const e of["not","nope"])Gn.prototype[e]=Gn.prototype.notOneOf;const iF=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sF(e){const t=$p(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function $p(e){var t,n;const r=iF.exec(e);return r?{year:Xn(r[1]),month:Xn(r[2],1)-1,day:Xn(r[3],1),hour:Xn(r[4]),minute:Xn(r[5]),second:Xn(r[6]),millisecond:r[7]?Xn(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Xn(r[10]),minuteOffset:Xn(r[11])}:null}function Xn(e,t=0){return Number(e)||t}let oF=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,aF=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,lF=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,uF="^\\d{4}-\\d{2}-\\d{2}",cF="\\d{2}:\\d{2}:\\d{2}",dF="(([+-]\\d{2}(:?\\d{2})?)|Z)",fF=new RegExp(`${uF}T${cF}(\\.\\d+)?${dF}$`),pF=e=>Pi(e)||e===e.trim(),hF={}.toString();function Hu(){return new wk}class wk extends Gn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===hF?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||On.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=St.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=St.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=St.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||St.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=St.email){return this.matches(oF,{name:"email",message:t,excludeEmptyString:!0})}url(t=St.url){return this.matches(aF,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=St.uuid){return this.matches(lF,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(fF,{name:"datetime",message:n||St.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||St.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=$p(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||St.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=$p(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=St.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:pF})}lowercase(t=St.lowercase){return this.transform(n=>Pi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toLowerCase()})}uppercase(t=St.uppercase){return this.transform(n=>Pi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toUpperCase()})}}Hu.prototype=wk.prototype;let mF=new Date(""),gF=e=>Object.prototype.toString.call(e)==="[object Date]";class Ec extends Gn{constructor(){super({type:"date",check(t){return gF(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=sF(t),isNaN(t)?Ec.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(ss.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=Ip.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=Ip.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ec.INVALID_DATE=mF;Ec.prototype;function vF(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=zi.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),ss.isRef(a)&&a.isSibling?s(a.path,o):Gm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return WD.array(Array.from(r),n).reverse()}function Ey(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function bk(e){return(t,n)=>Ey(e,t)-Ey(e,n)}const yF=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function su(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=su(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=su(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(su)}):"optional"in e?e.optional():e}const xF=(e,t)=>{const n=[...zi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=zi.getter(zi.join(n),!0)(e);return!!(i&&r in i)};let Ty=e=>Object.prototype.toString.call(e)==="[object Object]";function Cy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const wF=bk([]);function Qm(e){return new Sk(e)}class Sk extends Gn{constructor(t){super({type:"object",check(n){return Ty(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=wF,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const c of a){let f=s[c],p=c in i;if(f){let h,v=i[c];u.path=(n.path?`${n.path}.`:"")+c,f=f.resolve({value:v,context:n.context,parent:l});let b=f instanceof Gn?f.spec:void 0,m=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||c in i;continue}h=!n.__validating||!m?f.cast(i[c],u):i[c],h!==void 0&&(l[c]=h)}else p&&!o&&(l[c]=i[c]);(p!==c in l||l[c]!==i[c])&&(d=!0)}return d?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!a||!Ty(u)){i(l,u);return}o=o||u;let d=[];for(let c of this._nodes){let f=this.fields[c];!f||ss.isRef(f)||d.push(f.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:u,originalValue:o,options:n},r,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=vF(t,n),r._sortErrors=bk(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return su(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=zi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return xF(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(yF)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||iu.exact,test(n){if(n==null)return!0;const r=Cy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=iu.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Cy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=iu.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys($d.camelCase)}snakeCase(){return this.transformKeys($d.snakeCase)}constantCase(){return this.transformKeys(t=>$d.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}Qm.prototype=Sk.prototype;var bF=function(t){return SF(t)&&!kF(t)};function SF(e){return!!e&&typeof e=="object"}function kF(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||CF(e)}var EF=typeof Symbol=="function"&&Symbol.for,TF=EF?Symbol.for("react.element"):60103;function CF(e){return e.$$typeof===TF}function _F(e){return Array.isArray(e)?[]:{}}function Wu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ma(_F(e),e,t):e}function PF(e,t,n){return e.concat(t).map(function(r){return Wu(r,n)})}function jF(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Wu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Wu(t[i],n):r[i]=Ma(e[i],t[i],n)}),r}function Ma(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||PF,n.isMergeableObject=n.isMergeableObject||bF;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):jF(e,t,n):Wu(t,n)}Ma.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ma(r,i,n)},{})};var zp=Ma,kk=typeof global=="object"&&global&&global.Object===Object&&global,AF=typeof self=="object"&&self&&self.Object===Object&&self,Qn=kk||AF||Function("return this")(),ii=Qn.Symbol,Ek=Object.prototype,RF=Ek.hasOwnProperty,OF=Ek.toString,Lo=ii?ii.toStringTag:void 0;function DF(e){var t=RF.call(e,Lo),n=e[Lo];try{e[Lo]=void 0;var r=!0}catch{}var i=OF.call(e);return r&&(t?e[Lo]=n:delete e[Lo]),i}var FF=Object.prototype,NF=FF.toString;function MF(e){return NF.call(e)}var LF="[object Null]",IF="[object Undefined]",_y=ii?ii.toStringTag:void 0;function os(e){return e==null?e===void 0?IF:LF:_y&&_y in Object(e)?DF(e):MF(e)}function Tk(e,t){return function(n){return e(t(n))}}var Ym=Tk(Object.getPrototypeOf,Object);function as(e){return e!=null&&typeof e=="object"}var $F="[object Object]",zF=Function.prototype,BF=Object.prototype,Ck=zF.toString,VF=BF.hasOwnProperty,UF=Ck.call(Object);function Py(e){if(!as(e)||os(e)!=$F)return!1;var t=Ym(e);if(t===null)return!0;var n=VF.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ck.call(n)==UF}function HF(){this.__data__=[],this.size=0}function _k(e,t){return e===t||e!==e&&t!==t}function Tc(e,t){for(var n=e.length;n--;)if(_k(e[n][0],t))return n;return-1}var WF=Array.prototype,qF=WF.splice;function KF(e){var t=this.__data__,n=Tc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():qF.call(t,n,1),--this.size,!0}function GF(e){var t=this.__data__,n=Tc(t,e);return n<0?void 0:t[n][1]}function QF(e){return Tc(this.__data__,e)>-1}function YF(e,t){var n=this.__data__,r=Tc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function mr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mr.prototype.clear=HF;mr.prototype.delete=KF;mr.prototype.get=GF;mr.prototype.has=QF;mr.prototype.set=YF;function XF(){this.__data__=new mr,this.size=0}function ZF(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function JF(e){return this.__data__.get(e)}function eN(e){return this.__data__.has(e)}function tl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tN="[object AsyncFunction]",nN="[object Function]",rN="[object GeneratorFunction]",iN="[object Proxy]";function Pk(e){if(!tl(e))return!1;var t=os(e);return t==nN||t==rN||t==tN||t==iN}var zd=Qn["__core-js_shared__"],jy=function(){var e=/[^.]+$/.exec(zd&&zd.keys&&zd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sN(e){return!!jy&&jy in e}var oN=Function.prototype,aN=oN.toString;function ls(e){if(e!=null){try{return aN.call(e)}catch{}try{return e+""}catch{}}return""}var lN=/[\\^$.*+?()[\]{}|]/g,uN=/^\[object .+?Constructor\]$/,cN=Function.prototype,dN=Object.prototype,fN=cN.toString,pN=dN.hasOwnProperty,hN=RegExp("^"+fN.call(pN).replace(lN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mN(e){if(!tl(e)||sN(e))return!1;var t=Pk(e)?hN:uN;return t.test(ls(e))}function gN(e,t){return e==null?void 0:e[t]}function us(e,t){var n=gN(e,t);return mN(n)?n:void 0}var La=us(Qn,"Map"),Ia=us(Object,"create");function vN(){this.__data__=Ia?Ia(null):{},this.size=0}function yN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xN="__lodash_hash_undefined__",wN=Object.prototype,bN=wN.hasOwnProperty;function SN(e){var t=this.__data__;if(Ia){var n=t[e];return n===xN?void 0:n}return bN.call(t,e)?t[e]:void 0}var kN=Object.prototype,EN=kN.hasOwnProperty;function TN(e){var t=this.__data__;return Ia?t[e]!==void 0:EN.call(t,e)}var CN="__lodash_hash_undefined__";function _N(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ia&&t===void 0?CN:t,this}function Qi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qi.prototype.clear=vN;Qi.prototype.delete=yN;Qi.prototype.get=SN;Qi.prototype.has=TN;Qi.prototype.set=_N;function PN(){this.size=0,this.__data__={hash:new Qi,map:new(La||mr),string:new Qi}}function jN(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Cc(e,t){var n=e.__data__;return jN(t)?n[typeof t=="string"?"string":"hash"]:n.map}function AN(e){var t=Cc(this,e).delete(e);return this.size-=t?1:0,t}function RN(e){return Cc(this,e).get(e)}function ON(e){return Cc(this,e).has(e)}function DN(e,t){var n=Cc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ui(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ui.prototype.clear=PN;ui.prototype.delete=AN;ui.prototype.get=RN;ui.prototype.has=ON;ui.prototype.set=DN;var FN=200;function NN(e,t){var n=this.__data__;if(n instanceof mr){var r=n.__data__;if(!La||r.length<FN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ui(r)}return n.set(e,t),this.size=n.size,this}function Eo(e){var t=this.__data__=new mr(e);this.size=t.size}Eo.prototype.clear=XF;Eo.prototype.delete=ZF;Eo.prototype.get=JF;Eo.prototype.has=eN;Eo.prototype.set=NN;function MN(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Ay=function(){try{var e=us(Object,"defineProperty");return e({},"",{}),e}catch{}}();function jk(e,t,n){t=="__proto__"&&Ay?Ay(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var LN=Object.prototype,IN=LN.hasOwnProperty;function Ak(e,t,n){var r=e[t];(!(IN.call(e,t)&&_k(r,n))||n===void 0&&!(t in e))&&jk(e,t,n)}function _c(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?jk(n,a,l):Ak(n,a,l)}return n}function $N(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zN="[object Arguments]";function Ry(e){return as(e)&&os(e)==zN}var Rk=Object.prototype,BN=Rk.hasOwnProperty,VN=Rk.propertyIsEnumerable,UN=Ry(function(){return arguments}())?Ry:function(e){return as(e)&&BN.call(e,"callee")&&!VN.call(e,"callee")},nl=Array.isArray;function HN(){return!1}var Ok=typeof $t=="object"&&$t&&!$t.nodeType&&$t,Oy=Ok&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,WN=Oy&&Oy.exports===Ok,Dy=WN?Qn.Buffer:void 0,qN=Dy?Dy.isBuffer:void 0,Dk=qN||HN,KN=9007199254740991,GN=/^(?:0|[1-9]\d*)$/;function QN(e,t){var n=typeof e;return t=t??KN,!!t&&(n=="number"||n!="symbol"&&GN.test(e))&&e>-1&&e%1==0&&e<t}var YN=9007199254740991;function Fk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=YN}var XN="[object Arguments]",ZN="[object Array]",JN="[object Boolean]",eM="[object Date]",tM="[object Error]",nM="[object Function]",rM="[object Map]",iM="[object Number]",sM="[object Object]",oM="[object RegExp]",aM="[object Set]",lM="[object String]",uM="[object WeakMap]",cM="[object ArrayBuffer]",dM="[object DataView]",fM="[object Float32Array]",pM="[object Float64Array]",hM="[object Int8Array]",mM="[object Int16Array]",gM="[object Int32Array]",vM="[object Uint8Array]",yM="[object Uint8ClampedArray]",xM="[object Uint16Array]",wM="[object Uint32Array]",Se={};Se[fM]=Se[pM]=Se[hM]=Se[mM]=Se[gM]=Se[vM]=Se[yM]=Se[xM]=Se[wM]=!0;Se[XN]=Se[ZN]=Se[cM]=Se[JN]=Se[dM]=Se[eM]=Se[tM]=Se[nM]=Se[rM]=Se[iM]=Se[sM]=Se[oM]=Se[aM]=Se[lM]=Se[uM]=!1;function bM(e){return as(e)&&Fk(e.length)&&!!Se[os(e)]}function Xm(e){return function(t){return e(t)}}var Nk=typeof $t=="object"&&$t&&!$t.nodeType&&$t,sa=Nk&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,SM=sa&&sa.exports===Nk,Bd=SM&&kk.process,po=function(){try{var e=sa&&sa.require&&sa.require("util").types;return e||Bd&&Bd.binding&&Bd.binding("util")}catch{}}(),Fy=po&&po.isTypedArray,kM=Fy?Xm(Fy):bM,EM=Object.prototype,TM=EM.hasOwnProperty;function Mk(e,t){var n=nl(e),r=!n&&UN(e),i=!n&&!r&&Dk(e),s=!n&&!r&&!i&&kM(e),o=n||r||i||s,a=o?$N(e.length,String):[],l=a.length;for(var u in e)(t||TM.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||QN(u,l)))&&a.push(u);return a}var CM=Object.prototype;function Zm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||CM;return e===n}var _M=Tk(Object.keys,Object),PM=Object.prototype,jM=PM.hasOwnProperty;function AM(e){if(!Zm(e))return _M(e);var t=[];for(var n in Object(e))jM.call(e,n)&&n!="constructor"&&t.push(n);return t}function Lk(e){return e!=null&&Fk(e.length)&&!Pk(e)}function Jm(e){return Lk(e)?Mk(e):AM(e)}function RM(e,t){return e&&_c(t,Jm(t),e)}function OM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var DM=Object.prototype,FM=DM.hasOwnProperty;function NM(e){if(!tl(e))return OM(e);var t=Zm(e),n=[];for(var r in e)r=="constructor"&&(t||!FM.call(e,r))||n.push(r);return n}function eg(e){return Lk(e)?Mk(e,!0):NM(e)}function MM(e,t){return e&&_c(t,eg(t),e)}var Ik=typeof $t=="object"&&$t&&!$t.nodeType&&$t,Ny=Ik&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,LM=Ny&&Ny.exports===Ik,My=LM?Qn.Buffer:void 0,Ly=My?My.allocUnsafe:void 0;function IM(e,t){if(t)return e.slice();var n=e.length,r=Ly?Ly(n):new e.constructor(n);return e.copy(r),r}function $k(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function $M(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function zk(){return[]}var zM=Object.prototype,BM=zM.propertyIsEnumerable,Iy=Object.getOwnPropertySymbols,tg=Iy?function(e){return e==null?[]:(e=Object(e),$M(Iy(e),function(t){return BM.call(e,t)}))}:zk;function VM(e,t){return _c(e,tg(e),t)}function Bk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var UM=Object.getOwnPropertySymbols,Vk=UM?function(e){for(var t=[];e;)Bk(t,tg(e)),e=Ym(e);return t}:zk;function HM(e,t){return _c(e,Vk(e),t)}function Uk(e,t,n){var r=t(e);return nl(e)?r:Bk(r,n(e))}function WM(e){return Uk(e,Jm,tg)}function qM(e){return Uk(e,eg,Vk)}var Bp=us(Qn,"DataView"),Vp=us(Qn,"Promise"),Up=us(Qn,"Set"),Hp=us(Qn,"WeakMap"),$y="[object Map]",KM="[object Object]",zy="[object Promise]",By="[object Set]",Vy="[object WeakMap]",Uy="[object DataView]",GM=ls(Bp),QM=ls(La),YM=ls(Vp),XM=ls(Up),ZM=ls(Hp),tr=os;(Bp&&tr(new Bp(new ArrayBuffer(1)))!=Uy||La&&tr(new La)!=$y||Vp&&tr(Vp.resolve())!=zy||Up&&tr(new Up)!=By||Hp&&tr(new Hp)!=Vy)&&(tr=function(e){var t=os(e),n=t==KM?e.constructor:void 0,r=n?ls(n):"";if(r)switch(r){case GM:return Uy;case QM:return $y;case YM:return zy;case XM:return By;case ZM:return Vy}return t});var JM=Object.prototype,e5=JM.hasOwnProperty;function t5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&e5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Hy=Qn.Uint8Array;function ng(e){var t=new e.constructor(e.byteLength);return new Hy(t).set(new Hy(e)),t}function n5(e,t){var n=t?ng(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var r5=/\w*$/;function i5(e){var t=new e.constructor(e.source,r5.exec(e));return t.lastIndex=e.lastIndex,t}var Wy=ii?ii.prototype:void 0,qy=Wy?Wy.valueOf:void 0;function s5(e){return qy?Object(qy.call(e)):{}}function o5(e,t){var n=t?ng(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var a5="[object Boolean]",l5="[object Date]",u5="[object Map]",c5="[object Number]",d5="[object RegExp]",f5="[object Set]",p5="[object String]",h5="[object Symbol]",m5="[object ArrayBuffer]",g5="[object DataView]",v5="[object Float32Array]",y5="[object Float64Array]",x5="[object Int8Array]",w5="[object Int16Array]",b5="[object Int32Array]",S5="[object Uint8Array]",k5="[object Uint8ClampedArray]",E5="[object Uint16Array]",T5="[object Uint32Array]";function C5(e,t,n){var r=e.constructor;switch(t){case m5:return ng(e);case a5:case l5:return new r(+e);case g5:return n5(e,n);case v5:case y5:case x5:case w5:case b5:case S5:case k5:case E5:case T5:return o5(e,n);case u5:return new r;case c5:case p5:return new r(e);case d5:return i5(e);case f5:return new r;case h5:return s5(e)}}var Ky=Object.create,_5=function(){function e(){}return function(t){if(!tl(t))return{};if(Ky)return Ky(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function P5(e){return typeof e.constructor=="function"&&!Zm(e)?_5(Ym(e)):{}}var j5="[object Map]";function A5(e){return as(e)&&tr(e)==j5}var Gy=po&&po.isMap,R5=Gy?Xm(Gy):A5,O5="[object Set]";function D5(e){return as(e)&&tr(e)==O5}var Qy=po&&po.isSet,F5=Qy?Xm(Qy):D5,N5=1,M5=2,L5=4,Hk="[object Arguments]",I5="[object Array]",$5="[object Boolean]",z5="[object Date]",B5="[object Error]",Wk="[object Function]",V5="[object GeneratorFunction]",U5="[object Map]",H5="[object Number]",qk="[object Object]",W5="[object RegExp]",q5="[object Set]",K5="[object String]",G5="[object Symbol]",Q5="[object WeakMap]",Y5="[object ArrayBuffer]",X5="[object DataView]",Z5="[object Float32Array]",J5="[object Float64Array]",e4="[object Int8Array]",t4="[object Int16Array]",n4="[object Int32Array]",r4="[object Uint8Array]",i4="[object Uint8ClampedArray]",s4="[object Uint16Array]",o4="[object Uint32Array]",ye={};ye[Hk]=ye[I5]=ye[Y5]=ye[X5]=ye[$5]=ye[z5]=ye[Z5]=ye[J5]=ye[e4]=ye[t4]=ye[n4]=ye[U5]=ye[H5]=ye[qk]=ye[W5]=ye[q5]=ye[K5]=ye[G5]=ye[r4]=ye[i4]=ye[s4]=ye[o4]=!0;ye[B5]=ye[Wk]=ye[Q5]=!1;function oa(e,t,n,r,i,s){var o,a=t&N5,l=t&M5,u=t&L5;if(o!==void 0)return o;if(!tl(e))return e;var d=nl(e);if(d){if(o=t5(e),!a)return $k(e,o)}else{var c=tr(e),f=c==Wk||c==V5;if(Dk(e))return IM(e,a);if(c==qk||c==Hk||f&&!i){if(o=l||f?{}:P5(e),!a)return l?HM(e,MM(o,e)):VM(e,RM(o,e))}else{if(!ye[c])return i?e:{};o=C5(e,c,a)}}s||(s=new Eo);var p=s.get(e);if(p)return p;s.set(e,o),F5(e)?e.forEach(function(b){o.add(oa(b,t,n,b,e,s))}):R5(e)&&e.forEach(function(b,m){o.set(m,oa(b,t,n,m,e,s))});var h=u?l?qM:WM:l?eg:Jm,v=d?void 0:h(e);return MN(v||e,function(b,m){v&&(m=b,b=e[m]),Ak(o,m,oa(b,t,n,m,e,s))}),o}var a4=1,l4=4;function Ol(e){return oa(e,a4|l4)}var Yy=Array.isArray,Xy=Object.keys,u4=Object.prototype.hasOwnProperty,c4=typeof Element<"u";function Wp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Yy(e),r=Yy(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Wp(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var c=Xy(e);if(s=c.length,s!==Xy(t).length)return!1;for(i=s;i--!==0;)if(!u4.call(t,c[i]))return!1;if(c4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Wp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var d4=function(t,n){try{return Wp(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const xi=Yi(d4);var f4=4;function Zy(e){return oa(e,f4)}function Kk(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var p4="[object Symbol]";function rg(e){return typeof e=="symbol"||as(e)&&os(e)==p4}var h4="Expected a function";function ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(h4);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(ig.Cache||ui),n}ig.Cache=ui;var m4=500;function g4(e){var t=ig(e,function(r){return n.size===m4&&n.clear(),r}),n=t.cache;return t}var v4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y4=/\\(\\)?/g,x4=g4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(v4,function(n,r,i,s){t.push(i?s.replace(y4,"$1"):r||n)}),t}),w4=1/0;function b4(e){if(typeof e=="string"||rg(e))return e;var t=e+"";return t=="0"&&1/e==-w4?"-0":t}var S4=1/0,Jy=ii?ii.prototype:void 0,ex=Jy?Jy.toString:void 0;function Gk(e){if(typeof e=="string")return e;if(nl(e))return Kk(e,Gk)+"";if(rg(e))return ex?ex.call(e):"";var t=e+"";return t=="0"&&1/e==-S4?"-0":t}function k4(e){return e==null?"":Gk(e)}function Qk(e){return nl(e)?Kk(e,b4):rg(e)?[e]:$k(x4(k4(e)))}var Yk={exports:{}},he={};/** @license React v16.13.1
98
+ `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,d=>{if(d.length)return i(d,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:u}=t,d=v=>{i||(i=!0,n(v,o))},c=v=>{i||(i=!0,r(v,o))},f=s.length,p=[];if(!f)return c([]);let h={value:o,originalValue:a,path:l,options:u,schema:this};for(let v=0;v<s.length;v++){const b=s[v];b(h,d,function(x){x&&(Array.isArray(x)?p.push(...x):p.push(x)),--f<=0&&c(p)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const d=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(c,f,p)=>this.resolve(d)._validate(u,d,f,p)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,u)=>{_t.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new _t(l,u,void 0,void 0,s)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw _t.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new _t(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(_t.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(_t.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Fs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=ms({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=ms({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Dn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Dn.notNull){return this.nullability(!1,t)}required(t=Dn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Dn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ms(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=gk(t).map(s=>new ss(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Vu(i,n):Vu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=ms({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Dn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=ms({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=Dn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=ms({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,d)=>d.findIndex(c=>c.name===l.name)===u)}}}Gn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Gn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=rF(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Gn.prototype[e]=Gn.prototype.oneOf;for(const e of["not","nope"])Gn.prototype[e]=Gn.prototype.notOneOf;const iF=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sF(e){const t=$p(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function $p(e){var t,n;const r=iF.exec(e);return r?{year:Xn(r[1]),month:Xn(r[2],1)-1,day:Xn(r[3],1),hour:Xn(r[4]),minute:Xn(r[5]),second:Xn(r[6]),millisecond:r[7]?Xn(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Xn(r[10]),minuteOffset:Xn(r[11])}:null}function Xn(e,t=0){return Number(e)||t}let oF=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,aF=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,lF=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,uF="^\\d{4}-\\d{2}-\\d{2}",cF="\\d{2}:\\d{2}:\\d{2}",dF="(([+-]\\d{2}(:?\\d{2})?)|Z)",fF=new RegExp(`${uF}T${cF}(\\.\\d+)?${dF}$`),pF=e=>Pi(e)||e===e.trim(),hF={}.toString();function Hu(){return new wk}class wk extends Gn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===hF?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Dn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=St.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=St.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=St.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||St.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=St.email){return this.matches(oF,{name:"email",message:t,excludeEmptyString:!0})}url(t=St.url){return this.matches(aF,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=St.uuid){return this.matches(lF,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(fF,{name:"datetime",message:n||St.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||St.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=$p(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||St.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=$p(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=St.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:pF})}lowercase(t=St.lowercase){return this.transform(n=>Pi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toLowerCase()})}uppercase(t=St.uppercase){return this.transform(n=>Pi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Pi(n)||n===n.toUpperCase()})}}Hu.prototype=wk.prototype;let mF=new Date(""),gF=e=>Object.prototype.toString.call(e)==="[object Date]";class Ec extends Gn{constructor(){super({type:"date",check(t){return gF(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=sF(t),isNaN(t)?Ec.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(ss.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=Ip.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=Ip.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ec.INVALID_DATE=mF;Ec.prototype;function vF(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=zi.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),ss.isRef(a)&&a.isSibling?s(a.path,o):Gm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return WD.array(Array.from(r),n).reverse()}function Ey(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function bk(e){return(t,n)=>Ey(e,t)-Ey(e,n)}const yF=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function su(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=su(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=su(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(su)}):"optional"in e?e.optional():e}const xF=(e,t)=>{const n=[...zi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=zi.getter(zi.join(n),!0)(e);return!!(i&&r in i)};let Ty=e=>Object.prototype.toString.call(e)==="[object Object]";function Cy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const wF=bk([]);function Qm(e){return new Sk(e)}class Sk extends Gn{constructor(t){super({type:"object",check(n){return Ty(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=wF,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const c of a){let f=s[c],p=c in i;if(f){let h,v=i[c];u.path=(n.path?`${n.path}.`:"")+c,f=f.resolve({value:v,context:n.context,parent:l});let b=f instanceof Gn?f.spec:void 0,m=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||c in i;continue}h=!n.__validating||!m?f.cast(i[c],u):i[c],h!==void 0&&(l[c]=h)}else p&&!o&&(l[c]=i[c]);(p!==c in l||l[c]!==i[c])&&(d=!0)}return d?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!a||!Ty(u)){i(l,u);return}o=o||u;let d=[];for(let c of this._nodes){let f=this.fields[c];!f||ss.isRef(f)||d.push(f.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:u,originalValue:o,options:n},r,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=vF(t,n),r._sortErrors=bk(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return su(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=zi.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return xF(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(yF)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||iu.exact,test(n){if(n==null)return!0;const r=Cy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=iu.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Cy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=iu.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys($d.camelCase)}snakeCase(){return this.transformKeys($d.snakeCase)}constantCase(){return this.transformKeys(t=>$d.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}Qm.prototype=Sk.prototype;var bF=function(t){return SF(t)&&!kF(t)};function SF(e){return!!e&&typeof e=="object"}function kF(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||CF(e)}var EF=typeof Symbol=="function"&&Symbol.for,TF=EF?Symbol.for("react.element"):60103;function CF(e){return e.$$typeof===TF}function _F(e){return Array.isArray(e)?[]:{}}function Wu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ma(_F(e),e,t):e}function PF(e,t,n){return e.concat(t).map(function(r){return Wu(r,n)})}function jF(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Wu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Wu(t[i],n):r[i]=Ma(e[i],t[i],n)}),r}function Ma(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||PF,n.isMergeableObject=n.isMergeableObject||bF;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):jF(e,t,n):Wu(t,n)}Ma.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ma(r,i,n)},{})};var zp=Ma,kk=typeof global=="object"&&global&&global.Object===Object&&global,AF=typeof self=="object"&&self&&self.Object===Object&&self,Qn=kk||AF||Function("return this")(),ii=Qn.Symbol,Ek=Object.prototype,RF=Ek.hasOwnProperty,OF=Ek.toString,Lo=ii?ii.toStringTag:void 0;function DF(e){var t=RF.call(e,Lo),n=e[Lo];try{e[Lo]=void 0;var r=!0}catch{}var i=OF.call(e);return r&&(t?e[Lo]=n:delete e[Lo]),i}var FF=Object.prototype,NF=FF.toString;function MF(e){return NF.call(e)}var LF="[object Null]",IF="[object Undefined]",_y=ii?ii.toStringTag:void 0;function os(e){return e==null?e===void 0?IF:LF:_y&&_y in Object(e)?DF(e):MF(e)}function Tk(e,t){return function(n){return e(t(n))}}var Ym=Tk(Object.getPrototypeOf,Object);function as(e){return e!=null&&typeof e=="object"}var $F="[object Object]",zF=Function.prototype,BF=Object.prototype,Ck=zF.toString,VF=BF.hasOwnProperty,UF=Ck.call(Object);function Py(e){if(!as(e)||os(e)!=$F)return!1;var t=Ym(e);if(t===null)return!0;var n=VF.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ck.call(n)==UF}function HF(){this.__data__=[],this.size=0}function _k(e,t){return e===t||e!==e&&t!==t}function Tc(e,t){for(var n=e.length;n--;)if(_k(e[n][0],t))return n;return-1}var WF=Array.prototype,qF=WF.splice;function KF(e){var t=this.__data__,n=Tc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():qF.call(t,n,1),--this.size,!0}function GF(e){var t=this.__data__,n=Tc(t,e);return n<0?void 0:t[n][1]}function QF(e){return Tc(this.__data__,e)>-1}function YF(e,t){var n=this.__data__,r=Tc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function mr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mr.prototype.clear=HF;mr.prototype.delete=KF;mr.prototype.get=GF;mr.prototype.has=QF;mr.prototype.set=YF;function XF(){this.__data__=new mr,this.size=0}function ZF(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function JF(e){return this.__data__.get(e)}function eN(e){return this.__data__.has(e)}function tl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tN="[object AsyncFunction]",nN="[object Function]",rN="[object GeneratorFunction]",iN="[object Proxy]";function Pk(e){if(!tl(e))return!1;var t=os(e);return t==nN||t==rN||t==tN||t==iN}var zd=Qn["__core-js_shared__"],jy=function(){var e=/[^.]+$/.exec(zd&&zd.keys&&zd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sN(e){return!!jy&&jy in e}var oN=Function.prototype,aN=oN.toString;function ls(e){if(e!=null){try{return aN.call(e)}catch{}try{return e+""}catch{}}return""}var lN=/[\\^$.*+?()[\]{}|]/g,uN=/^\[object .+?Constructor\]$/,cN=Function.prototype,dN=Object.prototype,fN=cN.toString,pN=dN.hasOwnProperty,hN=RegExp("^"+fN.call(pN).replace(lN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mN(e){if(!tl(e)||sN(e))return!1;var t=Pk(e)?hN:uN;return t.test(ls(e))}function gN(e,t){return e==null?void 0:e[t]}function us(e,t){var n=gN(e,t);return mN(n)?n:void 0}var La=us(Qn,"Map"),Ia=us(Object,"create");function vN(){this.__data__=Ia?Ia(null):{},this.size=0}function yN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xN="__lodash_hash_undefined__",wN=Object.prototype,bN=wN.hasOwnProperty;function SN(e){var t=this.__data__;if(Ia){var n=t[e];return n===xN?void 0:n}return bN.call(t,e)?t[e]:void 0}var kN=Object.prototype,EN=kN.hasOwnProperty;function TN(e){var t=this.__data__;return Ia?t[e]!==void 0:EN.call(t,e)}var CN="__lodash_hash_undefined__";function _N(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ia&&t===void 0?CN:t,this}function Qi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qi.prototype.clear=vN;Qi.prototype.delete=yN;Qi.prototype.get=SN;Qi.prototype.has=TN;Qi.prototype.set=_N;function PN(){this.size=0,this.__data__={hash:new Qi,map:new(La||mr),string:new Qi}}function jN(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Cc(e,t){var n=e.__data__;return jN(t)?n[typeof t=="string"?"string":"hash"]:n.map}function AN(e){var t=Cc(this,e).delete(e);return this.size-=t?1:0,t}function RN(e){return Cc(this,e).get(e)}function ON(e){return Cc(this,e).has(e)}function DN(e,t){var n=Cc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ui(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ui.prototype.clear=PN;ui.prototype.delete=AN;ui.prototype.get=RN;ui.prototype.has=ON;ui.prototype.set=DN;var FN=200;function NN(e,t){var n=this.__data__;if(n instanceof mr){var r=n.__data__;if(!La||r.length<FN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ui(r)}return n.set(e,t),this.size=n.size,this}function Eo(e){var t=this.__data__=new mr(e);this.size=t.size}Eo.prototype.clear=XF;Eo.prototype.delete=ZF;Eo.prototype.get=JF;Eo.prototype.has=eN;Eo.prototype.set=NN;function MN(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Ay=function(){try{var e=us(Object,"defineProperty");return e({},"",{}),e}catch{}}();function jk(e,t,n){t=="__proto__"&&Ay?Ay(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var LN=Object.prototype,IN=LN.hasOwnProperty;function Ak(e,t,n){var r=e[t];(!(IN.call(e,t)&&_k(r,n))||n===void 0&&!(t in e))&&jk(e,t,n)}function _c(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?jk(n,a,l):Ak(n,a,l)}return n}function $N(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zN="[object Arguments]";function Ry(e){return as(e)&&os(e)==zN}var Rk=Object.prototype,BN=Rk.hasOwnProperty,VN=Rk.propertyIsEnumerable,UN=Ry(function(){return arguments}())?Ry:function(e){return as(e)&&BN.call(e,"callee")&&!VN.call(e,"callee")},nl=Array.isArray;function HN(){return!1}var Ok=typeof $t=="object"&&$t&&!$t.nodeType&&$t,Oy=Ok&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,WN=Oy&&Oy.exports===Ok,Dy=WN?Qn.Buffer:void 0,qN=Dy?Dy.isBuffer:void 0,Dk=qN||HN,KN=9007199254740991,GN=/^(?:0|[1-9]\d*)$/;function QN(e,t){var n=typeof e;return t=t??KN,!!t&&(n=="number"||n!="symbol"&&GN.test(e))&&e>-1&&e%1==0&&e<t}var YN=9007199254740991;function Fk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=YN}var XN="[object Arguments]",ZN="[object Array]",JN="[object Boolean]",eM="[object Date]",tM="[object Error]",nM="[object Function]",rM="[object Map]",iM="[object Number]",sM="[object Object]",oM="[object RegExp]",aM="[object Set]",lM="[object String]",uM="[object WeakMap]",cM="[object ArrayBuffer]",dM="[object DataView]",fM="[object Float32Array]",pM="[object Float64Array]",hM="[object Int8Array]",mM="[object Int16Array]",gM="[object Int32Array]",vM="[object Uint8Array]",yM="[object Uint8ClampedArray]",xM="[object Uint16Array]",wM="[object Uint32Array]",Se={};Se[fM]=Se[pM]=Se[hM]=Se[mM]=Se[gM]=Se[vM]=Se[yM]=Se[xM]=Se[wM]=!0;Se[XN]=Se[ZN]=Se[cM]=Se[JN]=Se[dM]=Se[eM]=Se[tM]=Se[nM]=Se[rM]=Se[iM]=Se[sM]=Se[oM]=Se[aM]=Se[lM]=Se[uM]=!1;function bM(e){return as(e)&&Fk(e.length)&&!!Se[os(e)]}function Xm(e){return function(t){return e(t)}}var Nk=typeof $t=="object"&&$t&&!$t.nodeType&&$t,sa=Nk&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,SM=sa&&sa.exports===Nk,Bd=SM&&kk.process,po=function(){try{var e=sa&&sa.require&&sa.require("util").types;return e||Bd&&Bd.binding&&Bd.binding("util")}catch{}}(),Fy=po&&po.isTypedArray,kM=Fy?Xm(Fy):bM,EM=Object.prototype,TM=EM.hasOwnProperty;function Mk(e,t){var n=nl(e),r=!n&&UN(e),i=!n&&!r&&Dk(e),s=!n&&!r&&!i&&kM(e),o=n||r||i||s,a=o?$N(e.length,String):[],l=a.length;for(var u in e)(t||TM.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||QN(u,l)))&&a.push(u);return a}var CM=Object.prototype;function Zm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||CM;return e===n}var _M=Tk(Object.keys,Object),PM=Object.prototype,jM=PM.hasOwnProperty;function AM(e){if(!Zm(e))return _M(e);var t=[];for(var n in Object(e))jM.call(e,n)&&n!="constructor"&&t.push(n);return t}function Lk(e){return e!=null&&Fk(e.length)&&!Pk(e)}function Jm(e){return Lk(e)?Mk(e):AM(e)}function RM(e,t){return e&&_c(t,Jm(t),e)}function OM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var DM=Object.prototype,FM=DM.hasOwnProperty;function NM(e){if(!tl(e))return OM(e);var t=Zm(e),n=[];for(var r in e)r=="constructor"&&(t||!FM.call(e,r))||n.push(r);return n}function eg(e){return Lk(e)?Mk(e,!0):NM(e)}function MM(e,t){return e&&_c(t,eg(t),e)}var Ik=typeof $t=="object"&&$t&&!$t.nodeType&&$t,Ny=Ik&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,LM=Ny&&Ny.exports===Ik,My=LM?Qn.Buffer:void 0,Ly=My?My.allocUnsafe:void 0;function IM(e,t){if(t)return e.slice();var n=e.length,r=Ly?Ly(n):new e.constructor(n);return e.copy(r),r}function $k(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function $M(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function zk(){return[]}var zM=Object.prototype,BM=zM.propertyIsEnumerable,Iy=Object.getOwnPropertySymbols,tg=Iy?function(e){return e==null?[]:(e=Object(e),$M(Iy(e),function(t){return BM.call(e,t)}))}:zk;function VM(e,t){return _c(e,tg(e),t)}function Bk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var UM=Object.getOwnPropertySymbols,Vk=UM?function(e){for(var t=[];e;)Bk(t,tg(e)),e=Ym(e);return t}:zk;function HM(e,t){return _c(e,Vk(e),t)}function Uk(e,t,n){var r=t(e);return nl(e)?r:Bk(r,n(e))}function WM(e){return Uk(e,Jm,tg)}function qM(e){return Uk(e,eg,Vk)}var Bp=us(Qn,"DataView"),Vp=us(Qn,"Promise"),Up=us(Qn,"Set"),Hp=us(Qn,"WeakMap"),$y="[object Map]",KM="[object Object]",zy="[object Promise]",By="[object Set]",Vy="[object WeakMap]",Uy="[object DataView]",GM=ls(Bp),QM=ls(La),YM=ls(Vp),XM=ls(Up),ZM=ls(Hp),tr=os;(Bp&&tr(new Bp(new ArrayBuffer(1)))!=Uy||La&&tr(new La)!=$y||Vp&&tr(Vp.resolve())!=zy||Up&&tr(new Up)!=By||Hp&&tr(new Hp)!=Vy)&&(tr=function(e){var t=os(e),n=t==KM?e.constructor:void 0,r=n?ls(n):"";if(r)switch(r){case GM:return Uy;case QM:return $y;case YM:return zy;case XM:return By;case ZM:return Vy}return t});var JM=Object.prototype,e5=JM.hasOwnProperty;function t5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&e5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Hy=Qn.Uint8Array;function ng(e){var t=new e.constructor(e.byteLength);return new Hy(t).set(new Hy(e)),t}function n5(e,t){var n=t?ng(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var r5=/\w*$/;function i5(e){var t=new e.constructor(e.source,r5.exec(e));return t.lastIndex=e.lastIndex,t}var Wy=ii?ii.prototype:void 0,qy=Wy?Wy.valueOf:void 0;function s5(e){return qy?Object(qy.call(e)):{}}function o5(e,t){var n=t?ng(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var a5="[object Boolean]",l5="[object Date]",u5="[object Map]",c5="[object Number]",d5="[object RegExp]",f5="[object Set]",p5="[object String]",h5="[object Symbol]",m5="[object ArrayBuffer]",g5="[object DataView]",v5="[object Float32Array]",y5="[object Float64Array]",x5="[object Int8Array]",w5="[object Int16Array]",b5="[object Int32Array]",S5="[object Uint8Array]",k5="[object Uint8ClampedArray]",E5="[object Uint16Array]",T5="[object Uint32Array]";function C5(e,t,n){var r=e.constructor;switch(t){case m5:return ng(e);case a5:case l5:return new r(+e);case g5:return n5(e,n);case v5:case y5:case x5:case w5:case b5:case S5:case k5:case E5:case T5:return o5(e,n);case u5:return new r;case c5:case p5:return new r(e);case d5:return i5(e);case f5:return new r;case h5:return s5(e)}}var Ky=Object.create,_5=function(){function e(){}return function(t){if(!tl(t))return{};if(Ky)return Ky(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function P5(e){return typeof e.constructor=="function"&&!Zm(e)?_5(Ym(e)):{}}var j5="[object Map]";function A5(e){return as(e)&&tr(e)==j5}var Gy=po&&po.isMap,R5=Gy?Xm(Gy):A5,O5="[object Set]";function D5(e){return as(e)&&tr(e)==O5}var Qy=po&&po.isSet,F5=Qy?Xm(Qy):D5,N5=1,M5=2,L5=4,Hk="[object Arguments]",I5="[object Array]",$5="[object Boolean]",z5="[object Date]",B5="[object Error]",Wk="[object Function]",V5="[object GeneratorFunction]",U5="[object Map]",H5="[object Number]",qk="[object Object]",W5="[object RegExp]",q5="[object Set]",K5="[object String]",G5="[object Symbol]",Q5="[object WeakMap]",Y5="[object ArrayBuffer]",X5="[object DataView]",Z5="[object Float32Array]",J5="[object Float64Array]",e4="[object Int8Array]",t4="[object Int16Array]",n4="[object Int32Array]",r4="[object Uint8Array]",i4="[object Uint8ClampedArray]",s4="[object Uint16Array]",o4="[object Uint32Array]",ye={};ye[Hk]=ye[I5]=ye[Y5]=ye[X5]=ye[$5]=ye[z5]=ye[Z5]=ye[J5]=ye[e4]=ye[t4]=ye[n4]=ye[U5]=ye[H5]=ye[qk]=ye[W5]=ye[q5]=ye[K5]=ye[G5]=ye[r4]=ye[i4]=ye[s4]=ye[o4]=!0;ye[B5]=ye[Wk]=ye[Q5]=!1;function oa(e,t,n,r,i,s){var o,a=t&N5,l=t&M5,u=t&L5;if(o!==void 0)return o;if(!tl(e))return e;var d=nl(e);if(d){if(o=t5(e),!a)return $k(e,o)}else{var c=tr(e),f=c==Wk||c==V5;if(Dk(e))return IM(e,a);if(c==qk||c==Hk||f&&!i){if(o=l||f?{}:P5(e),!a)return l?HM(e,MM(o,e)):VM(e,RM(o,e))}else{if(!ye[c])return i?e:{};o=C5(e,c,a)}}s||(s=new Eo);var p=s.get(e);if(p)return p;s.set(e,o),F5(e)?e.forEach(function(b){o.add(oa(b,t,n,b,e,s))}):R5(e)&&e.forEach(function(b,m){o.set(m,oa(b,t,n,m,e,s))});var h=u?l?qM:WM:l?eg:Jm,v=d?void 0:h(e);return MN(v||e,function(b,m){v&&(m=b,b=e[m]),Ak(o,m,oa(b,t,n,m,e,s))}),o}var a4=1,l4=4;function Ol(e){return oa(e,a4|l4)}var Yy=Array.isArray,Xy=Object.keys,u4=Object.prototype.hasOwnProperty,c4=typeof Element<"u";function Wp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Yy(e),r=Yy(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Wp(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var c=Xy(e);if(s=c.length,s!==Xy(t).length)return!1;for(i=s;i--!==0;)if(!u4.call(t,c[i]))return!1;if(c4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!Wp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var d4=function(t,n){try{return Wp(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const xi=Yi(d4);var f4=4;function Zy(e){return oa(e,f4)}function Kk(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var p4="[object Symbol]";function rg(e){return typeof e=="symbol"||as(e)&&os(e)==p4}var h4="Expected a function";function ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(h4);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(ig.Cache||ui),n}ig.Cache=ui;var m4=500;function g4(e){var t=ig(e,function(r){return n.size===m4&&n.clear(),r}),n=t.cache;return t}var v4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y4=/\\(\\)?/g,x4=g4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(v4,function(n,r,i,s){t.push(i?s.replace(y4,"$1"):r||n)}),t}),w4=1/0;function b4(e){if(typeof e=="string"||rg(e))return e;var t=e+"";return t=="0"&&1/e==-w4?"-0":t}var S4=1/0,Jy=ii?ii.prototype:void 0,ex=Jy?Jy.toString:void 0;function Gk(e){if(typeof e=="string")return e;if(nl(e))return Kk(e,Gk)+"";if(rg(e))return ex?ex.call(e):"";var t=e+"";return t=="0"&&1/e==-S4?"-0":t}function k4(e){return e==null?"":Gk(e)}function Qk(e){return nl(e)?Kk(e,b4):rg(e)?[e]:$k(x4(k4(e)))}var Yk={exports:{}},he={};/** @license React v16.13.1
99
99
  * react-is.production.min.js
100
100
  *
101
101
  * Copyright (c) Facebook, Inc. and its affiliates.
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */var Qe=typeof Symbol=="function"&&Symbol.for,sg=Qe?Symbol.for("react.element"):60103,og=Qe?Symbol.for("react.portal"):60106,Pc=Qe?Symbol.for("react.fragment"):60107,jc=Qe?Symbol.for("react.strict_mode"):60108,Ac=Qe?Symbol.for("react.profiler"):60114,Rc=Qe?Symbol.for("react.provider"):60109,Oc=Qe?Symbol.for("react.context"):60110,ag=Qe?Symbol.for("react.async_mode"):60111,Dc=Qe?Symbol.for("react.concurrent_mode"):60111,Fc=Qe?Symbol.for("react.forward_ref"):60112,Nc=Qe?Symbol.for("react.suspense"):60113,E4=Qe?Symbol.for("react.suspense_list"):60120,Mc=Qe?Symbol.for("react.memo"):60115,Lc=Qe?Symbol.for("react.lazy"):60116,T4=Qe?Symbol.for("react.block"):60121,C4=Qe?Symbol.for("react.fundamental"):60117,_4=Qe?Symbol.for("react.responder"):60118,P4=Qe?Symbol.for("react.scope"):60119;function Wt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case sg:switch(e=e.type,e){case ag:case Dc:case Pc:case Ac:case jc:case Nc:return e;default:switch(e=e&&e.$$typeof,e){case Oc:case Fc:case Lc:case Mc:case Rc:return e;default:return t}}case og:return t}}}function Xk(e){return Wt(e)===Dc}he.AsyncMode=ag;he.ConcurrentMode=Dc;he.ContextConsumer=Oc;he.ContextProvider=Rc;he.Element=sg;he.ForwardRef=Fc;he.Fragment=Pc;he.Lazy=Lc;he.Memo=Mc;he.Portal=og;he.Profiler=Ac;he.StrictMode=jc;he.Suspense=Nc;he.isAsyncMode=function(e){return Xk(e)||Wt(e)===ag};he.isConcurrentMode=Xk;he.isContextConsumer=function(e){return Wt(e)===Oc};he.isContextProvider=function(e){return Wt(e)===Rc};he.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===sg};he.isForwardRef=function(e){return Wt(e)===Fc};he.isFragment=function(e){return Wt(e)===Pc};he.isLazy=function(e){return Wt(e)===Lc};he.isMemo=function(e){return Wt(e)===Mc};he.isPortal=function(e){return Wt(e)===og};he.isProfiler=function(e){return Wt(e)===Ac};he.isStrictMode=function(e){return Wt(e)===jc};he.isSuspense=function(e){return Wt(e)===Nc};he.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pc||e===Dc||e===Ac||e===jc||e===Nc||e===E4||typeof e=="object"&&e!==null&&(e.$$typeof===Lc||e.$$typeof===Mc||e.$$typeof===Rc||e.$$typeof===Oc||e.$$typeof===Fc||e.$$typeof===C4||e.$$typeof===_4||e.$$typeof===P4||e.$$typeof===T4)};he.typeOf=Wt;Yk.exports=he;var j4=Yk.exports,Zk=j4,A4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},R4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Jk={};Jk[Zk.ForwardRef]=A4;Jk[Zk.Memo]=R4;function qe(){return qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(this,arguments)}function eE(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 Ic=g.createContext(void 0);Ic.displayName="FormikContext";Ic.Provider;Ic.Consumer;function O4(){var e=g.useContext(Ic);return e}var hn=function(t){return typeof t=="function"},$c=function(t){return t!==null&&typeof t=="object"},D4=function(t){return String(Math.floor(Number(t)))===t},Vd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Ud=function(t){return $c(t)&&hn(t.then)};function Nt(e,t,n,r){r===void 0&&(r=0);for(var i=Qk(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Bi(e,t,n){for(var r=Zy(e),i=r,s=0,o=Qk(t);s<o.length-1;s++){var a=o[s],l=Nt(e,o.slice(0,s+1));if(l&&($c(l)||Array.isArray(l)))i=i[a]=Zy(l);else{var u=o[s+1];i=i[a]=D4(u)&&Number(u)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function tE(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];$c(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},tE(a,t,n,r[o])):r[o]=t}return r}function F4(e,t){switch(t.type){case"SET_VALUES":return qe({},e,{values:t.payload});case"SET_TOUCHED":return qe({},e,{touched:t.payload});case"SET_ERRORS":return xi(e.errors,t.payload)?e:qe({},e,{errors:t.payload});case"SET_STATUS":return qe({},e,{status:t.payload});case"SET_ISSUBMITTING":return qe({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return qe({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return qe({},e,{values:Bi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return qe({},e,{touched:Bi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return qe({},e,{errors:Bi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return qe({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return qe({},e,{touched:tE(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return qe({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return qe({},e,{isSubmitting:!1});default:return e}}var mi={},Dl={};function N4(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,d=e.onSubmit,c=eE(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=qe({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},c),p=g.useRef(f.initialValues),h=g.useRef(f.initialErrors||mi),v=g.useRef(f.initialTouched||Dl),b=g.useRef(f.initialStatus),m=g.useRef(!1),x=g.useRef({});g.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var w=g.useState(0),E=w[1],T=g.useRef({values:Ol(f.initialValues),errors:Ol(f.initialErrors)||mi,touched:Ol(f.initialTouched)||Dl,status:Ol(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=T.current,_=g.useCallback(function(P){var I=T.current;T.current=F4(I,P),I!==T.current&&E(function(A){return A+1})},[]),k=g.useCallback(function(P,I){return new Promise(function(A,O){var B=f.validate(P,I);B==null?A(mi):Ud(B)?B.then(function(q){A(q||mi)},function(q){O(q)}):A(B)})},[f.validate]),j=g.useCallback(function(P,I){var A=f.validationSchema,O=hn(A)?A(I):A,B=I&&O.validateAt?O.validateAt(I,P):L4(P,O);return new Promise(function(q,oe){B.then(function(){q(mi)},function($e){$e.name==="ValidationError"?q(M4($e)):oe($e)})})},[f.validationSchema]),R=g.useCallback(function(P,I){return new Promise(function(A){return A(x.current[P].validate(I))})},[]),M=g.useCallback(function(P){var I=Object.keys(x.current).filter(function(O){return hn(x.current[O].validate)}),A=I.length>0?I.map(function(O){return R(O,Nt(P,O))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(A).then(function(O){return O.reduce(function(B,q,oe){return q==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||q&&(B=Bi(B,I[oe],q)),B},{})})},[R]),G=g.useCallback(function(P){return Promise.all([M(P),f.validationSchema?j(P):{},f.validate?k(P):{}]).then(function(I){var A=I[0],O=I[1],B=I[2],q=zp.all([A,O,B],{arrayMerge:I4});return q})},[f.validate,f.validationSchema,M,k,j]),ne=Qt(function(P){return P===void 0&&(P=C.values),_({type:"SET_ISVALIDATING",payload:!0}),G(P).then(function(I){return m.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:I})),I})});g.useEffect(function(){o&&m.current===!0&&xi(p.current,f.initialValues)&&ne(p.current)},[o,ne]);var J=g.useCallback(function(P){var I=P&&P.values?P.values:p.current,A=P&&P.errors?P.errors:h.current?h.current:f.initialErrors||{},O=P&&P.touched?P.touched:v.current?v.current:f.initialTouched||{},B=P&&P.status?P.status:b.current?b.current:f.initialStatus;p.current=I,h.current=A,v.current=O,b.current=B;var q=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!P&&!!P.isSubmitting,errors:A,touched:O,status:B,values:I,isValidating:!!P&&!!P.isValidating,submitCount:P&&P.submitCount&&typeof P.submitCount=="number"?P.submitCount:0}})};if(f.onReset){var oe=f.onReset(C.values,ci);Ud(oe)?oe.then(q):q()}else q()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);g.useEffect(function(){m.current===!0&&!xi(p.current,f.initialValues)&&u&&(p.current=f.initialValues,J(),o&&ne(p.current))},[u,f.initialValues,J,o,ne]),g.useEffect(function(){u&&m.current===!0&&!xi(h.current,f.initialErrors)&&(h.current=f.initialErrors||mi,_({type:"SET_ERRORS",payload:f.initialErrors||mi}))},[u,f.initialErrors]),g.useEffect(function(){u&&m.current===!0&&!xi(v.current,f.initialTouched)&&(v.current=f.initialTouched||Dl,_({type:"SET_TOUCHED",payload:f.initialTouched||Dl}))},[u,f.initialTouched]),g.useEffect(function(){u&&m.current===!0&&!xi(b.current,f.initialStatus)&&(b.current=f.initialStatus,_({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var ee=Qt(function(P){if(x.current[P]&&hn(x.current[P].validate)){var I=Nt(C.values,P),A=x.current[P].validate(I);return Ud(A)?(_({type:"SET_ISVALIDATING",payload:!0}),A.then(function(O){return O}).then(function(O){_({type:"SET_FIELD_ERROR",payload:{field:P,value:O}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:P,value:A}}),Promise.resolve(A))}else if(f.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),j(C.values,P).then(function(O){return O}).then(function(O){_({type:"SET_FIELD_ERROR",payload:{field:P,value:Nt(O,P)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=g.useCallback(function(P,I){var A=I.validate;x.current[P]={validate:A}},[]),X=g.useCallback(function(P){delete x.current[P]},[]),D=Qt(function(P,I){_({type:"SET_TOUCHED",payload:P});var A=I===void 0?i:I;return A?ne(C.values):Promise.resolve()}),L=g.useCallback(function(P){_({type:"SET_ERRORS",payload:P})},[]),U=Qt(function(P,I){var A=hn(P)?P(C.values):P;_({type:"SET_VALUES",payload:A});var O=I===void 0?n:I;return O?ne(A):Promise.resolve()}),V=g.useCallback(function(P,I){_({type:"SET_FIELD_ERROR",payload:{field:P,value:I}})},[]),H=Qt(function(P,I,A){_({type:"SET_FIELD_VALUE",payload:{field:P,value:I}});var O=A===void 0?n:A;return O?ne(Bi(C.values,P,I)):Promise.resolve()}),Z=g.useCallback(function(P,I){var A=I,O=P,B;if(!Vd(P)){P.persist&&P.persist();var q=P.target?P.target:P.currentTarget,oe=q.type,$e=q.name,Ze=q.id,Cn=q.value,qt=q.checked,fs=q.outerHTML,Yn=q.options,xr=q.multiple;A=I||$e||Ze,O=/number|range/.test(oe)?(B=parseFloat(Cn),isNaN(B)?"":B):/checkbox/.test(oe)?z4(Nt(C.values,A),qt,Cn):Yn&&xr?$4(Yn):Cn}A&&H(A,O)},[H,C.values]),ue=Qt(function(P){if(Vd(P))return function(I){return Z(I,P)};Z(P)}),me=Qt(function(P,I,A){I===void 0&&(I=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:P,value:I}});var O=A===void 0?i:A;return O?ne(C.values):Promise.resolve()}),te=g.useCallback(function(P,I){P.persist&&P.persist();var A=P.target,O=A.name,B=A.id,q=A.outerHTML,oe=I||O||B;me(oe,!0)},[me]),Fe=Qt(function(P){if(Vd(P))return function(I){return te(I,P)};te(P)}),Ye=g.useCallback(function(P){hn(P)?_({type:"SET_FORMIK_STATE",payload:P}):_({type:"SET_FORMIK_STATE",payload:function(){return P}})},[]),Xe=g.useCallback(function(P){_({type:"SET_STATUS",payload:P})},[]),Ot=g.useCallback(function(P){_({type:"SET_ISSUBMITTING",payload:P})},[]),Tn=Qt(function(){return _({type:"SUBMIT_ATTEMPT"}),ne().then(function(P){var I=P instanceof Error,A=!I&&Object.keys(P).length===0;if(A){var O;try{if(O=gr(),O===void 0)return}catch(B){throw B}return Promise.resolve(O).then(function(B){return m.current&&_({type:"SUBMIT_SUCCESS"}),B}).catch(function(B){if(m.current)throw _({type:"SUBMIT_FAILURE"}),B})}else if(m.current&&(_({type:"SUBMIT_FAILURE"}),I))throw P})}),cn=Qt(function(P){P&&P.preventDefault&&hn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&hn(P.stopPropagation)&&P.stopPropagation(),Tn().catch(function(I){console.warn("Warning: An unhandled error was caught from submitForm()",I)})}),ci={resetForm:J,validateForm:ne,validateField:ee,setErrors:L,setFieldError:V,setFieldTouched:me,setFieldValue:H,setStatus:Xe,setSubmitting:Ot,setTouched:D,setValues:U,setFormikState:Ye,submitForm:Tn},gr=Qt(function(){return d(C.values,ci)}),ds=Qt(function(P){P&&P.preventDefault&&hn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&hn(P.stopPropagation)&&P.stopPropagation(),J()}),di=g.useCallback(function(P){return{value:Nt(C.values,P),error:Nt(C.errors,P),touched:!!Nt(C.touched,P),initialValue:Nt(p.current,P),initialTouched:!!Nt(v.current,P),initialError:Nt(h.current,P)}},[C.errors,C.touched,C.values]),bt=g.useCallback(function(P){return{setValue:function(A,O){return H(P,A,O)},setTouched:function(A,O){return me(P,A,O)},setError:function(A){return V(P,A)}}},[H,me,V]),vr=g.useCallback(function(P){var I=$c(P),A=I?P.name:P,O=Nt(C.values,A),B={name:A,value:O,onChange:ue,onBlur:Fe};if(I){var q=P.type,oe=P.value,$e=P.as,Ze=P.multiple;q==="checkbox"?oe===void 0?B.checked=!!O:(B.checked=!!(Array.isArray(O)&&~O.indexOf(oe)),B.value=oe):q==="radio"?(B.checked=O===oe,B.value=oe):$e==="select"&&Ze&&(B.value=B.value||[],B.multiple=!0)}return B},[Fe,ue,C.values]),He=g.useMemo(function(){return!xi(p.current,C.values)},[p.current,C.values]),yr=g.useMemo(function(){return typeof a<"u"?He?C.errors&&Object.keys(C.errors).length===0:a!==!1&&hn(a)?a(f):a:C.errors&&Object.keys(C.errors).length===0},[a,He,C.errors,f]),To=qe({},C,{initialValues:p.current,initialErrors:h.current,initialTouched:v.current,initialStatus:b.current,handleBlur:Fe,handleChange:ue,handleReset:ds,handleSubmit:cn,resetForm:J,setErrors:L,setFormikState:Ye,setFieldTouched:me,setFieldValue:H,setFieldError:V,setStatus:Xe,setSubmitting:Ot,setTouched:D,setValues:U,submitForm:Tn,validateForm:ne,validateField:ee,isValid:yr,dirty:He,unregisterField:X,registerField:Q,getFieldProps:vr,getFieldMeta:di,getFieldHelpers:bt,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return To}function M4(e){var t={};if(e.inner){if(e.inner.length===0)return Bi(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Nt(t,o.path)||(t=Bi(t,o.path,o.message))}}return t}function L4(e,t,n,r){n===void 0&&(n=!1);var i=qp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function qp(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||Py(i)?qp(i):i!==""?i:void 0}):Py(e[r])?t[r]=qp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function I4(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?zp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=zp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function $4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function z4(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var B4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?g.useLayoutEffect:g.useEffect;function Qt(e){var t=g.useRef(e);return B4(function(){t.current=e}),g.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var V4=g.forwardRef(function(e,t){var n=e.action,r=eE(e,["action"]),i=n??"#",s=O4(),o=s.handleReset,a=s.handleSubmit;return g.createElement("form",qe({onSubmit:a,ref:t,onReset:o,action:i},r))});V4.displayName="Form";const nE=({init:e,schema:t,action:n})=>N4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function U4(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const H4=e=>{switch(e){case"success":return K4;case"info":return Q4;case"warning":return G4;case"error":return Y4;default:return null}},W4=Array(12).fill(0),q4=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},W4.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),K4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),G4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Q4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Y4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),X4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Z4=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Kp=1;class J4{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Kp++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],F.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(tL(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:f,...p})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:c,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>a.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Kp++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Tt=new J4,eL=(e,t)=>{const n=(t==null?void 0:t.id)||Kp++;return Tt.addToast({title:e,...t,id:n}),n},tL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",nL=eL,rL=()=>Tt.toasts,iL=()=>Tt.getActiveToasts(),rE=Object.assign(nL,{success:Tt.success,info:Tt.info,warning:Tt.warning,error:Tt.error,custom:Tt.custom,message:Tt.message,promise:Tt.promise,dismiss:Tt.dismiss,loading:Tt.loading},{getHistory:rL,getToasts:iL});U4("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Fl(e){return e.label!==void 0}const sL=3,oL="24px",aL="16px",tx=4e3,lL=356,uL=14,cL=45,dL=200;function jn(...e){return e.filter(Boolean).join(" ")}function fL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const pL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:d,toast:c,unstyled:f,interacting:p,setHeights:h,visibleToasts:v,heights:b,index:m,toasts:x,expanded:w,removeToast:E,defaultRichColors:T,closeButton:C,style:_,cancelButtonStyle:k,actionButtonStyle:j,className:R="",descriptionClassName:M="",duration:G,position:ne,gap:J,expandByDefault:ee,classNames:Q,icons:X,closeButtonAriaLabel:D="Close toast"}=e,[L,U]=F.useState(null),[V,H]=F.useState(null),[Z,ue]=F.useState(!1),[me,te]=F.useState(!1),[Fe,Ye]=F.useState(!1),[Xe,Ot]=F.useState(!1),[Tn,cn]=F.useState(!1),[ci,gr]=F.useState(0),[ds,di]=F.useState(0),bt=F.useRef(c.duration||G||tx),vr=F.useRef(null),He=F.useRef(null),yr=m===0,To=m+1<=v,P=c.type,I=c.dismissible!==!1,A=c.className||"",O=c.descriptionClassName||"",B=F.useMemo(()=>b.findIndex(re=>re.toastId===c.id)||0,[b,c.id]),q=F.useMemo(()=>{var re;return(re=c.closeButton)!=null?re:C},[c.closeButton,C]),oe=F.useMemo(()=>c.duration||G||tx,[c.duration,G]),$e=F.useRef(0),Ze=F.useRef(0),Cn=F.useRef(0),qt=F.useRef(null),[fs,Yn]=ne.split("-"),xr=F.useMemo(()=>b.reduce((re,We,ot)=>ot>=B?re:re+We.height,0),[b,B]),ps=Z4(),Co=c.invert||d,fi=P==="loading";Ze.current=F.useMemo(()=>B*J+xr,[B,xr]),F.useEffect(()=>{bt.current=oe},[oe]),F.useEffect(()=>{ue(!0)},[]),F.useEffect(()=>{const re=He.current;if(re){const We=re.getBoundingClientRect().height;return di(We),h(ot=>[{toastId:c.id,height:We,position:c.position},...ot]),()=>h(ot=>ot.filter(Dt=>Dt.toastId!==c.id))}},[h,c.id]),F.useLayoutEffect(()=>{if(!Z)return;const re=He.current,We=re.style.height;re.style.height="auto";const ot=re.getBoundingClientRect().height;re.style.height=We,di(ot),h(Dt=>Dt.find(Je=>Je.toastId===c.id)?Dt.map(Je=>Je.toastId===c.id?{...Je,height:ot}:Je):[{toastId:c.id,height:ot,position:c.position},...Dt])},[Z,c.title,c.description,h,c.id]);const _n=F.useCallback(()=>{te(!0),gr(Ze.current),h(re=>re.filter(We=>We.toastId!==c.id)),setTimeout(()=>{E(c)},dL)},[c,E,h,Ze]);F.useEffect(()=>{if(c.promise&&P==="loading"||c.duration===1/0||c.type==="loading")return;let re;return w||p||ps?(()=>{if(Cn.current<$e.current){const Dt=new Date().getTime()-$e.current;bt.current=bt.current-Dt}Cn.current=new Date().getTime()})():(()=>{bt.current!==1/0&&($e.current=new Date().getTime(),re=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),_n()},bt.current))})(),()=>clearTimeout(re)},[w,p,c,P,ps,_n]),F.useEffect(()=>{c.delete&&_n()},[_n,c.delete]);function IE(){var re;if(X!=null&&X.loading){var We;return F.createElement("div",{className:jn(Q==null?void 0:Q.loader,c==null||(We=c.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":P==="loading"},X.loading)}return F.createElement(q4,{className:jn(Q==null?void 0:Q.loader,c==null||(re=c.classNames)==null?void 0:re.loader),visible:P==="loading"})}var hg,mg;return F.createElement("li",{tabIndex:0,ref:He,className:jn(R,A,Q==null?void 0:Q.toast,c==null||(t=c.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[P],c==null||(n=c.classNames)==null?void 0:n[P]),"data-sonner-toast":"","data-rich-colors":(hg=c.richColors)!=null?hg:T,"data-styled":!(c.jsx||c.unstyled||f),"data-mounted":Z,"data-promise":!!c.promise,"data-swiped":Tn,"data-removed":me,"data-visible":To,"data-y-position":fs,"data-x-position":Yn,"data-index":m,"data-front":yr,"data-swiping":Fe,"data-dismissible":I,"data-type":P,"data-invert":Co,"data-swipe-out":Xe,"data-swipe-direction":V,"data-expanded":!!(w||ee&&Z),style:{"--index":m,"--toasts-before":m,"--z-index":x.length-m,"--offset":`${me?ci:Ze.current}px`,"--initial-height":ee?"auto":`${ds}px`,..._,...c.style},onDragEnd:()=>{Ye(!1),U(null),qt.current=null},onPointerDown:re=>{fi||!I||(vr.current=new Date,gr(Ze.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Ye(!0),qt.current={x:re.clientX,y:re.clientY}))},onPointerUp:()=>{var re,We,ot;if(Xe||!I)return;qt.current=null;const Dt=Number(((re=He.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),il=Number(((We=He.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Je=new Date().getTime()-((ot=vr.current)==null?void 0:ot.getTime()),Kt=L==="x"?Dt:il,sl=Math.abs(Kt)/Je;if(Math.abs(Kt)>=cL||sl>.11){gr(Ze.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Dt>0?"right":"left":il>0?"down":"up"),_n(),Ot(!0);return}else{var dn,fn;(dn=He.current)==null||dn.style.setProperty("--swipe-amount-x","0px"),(fn=He.current)==null||fn.style.setProperty("--swipe-amount-y","0px")}cn(!1),Ye(!1),U(null)},onPointerMove:re=>{var We,ot,Dt;if(!qt.current||!I||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const Je=re.clientY-qt.current.y,Kt=re.clientX-qt.current.x;var sl;const dn=(sl=e.swipeDirections)!=null?sl:fL(ne);!L&&(Math.abs(Kt)>1||Math.abs(Je)>1)&&U(Math.abs(Kt)>Math.abs(Je)?"x":"y");let fn={x:0,y:0};const gg=pi=>1/(1.5+Math.abs(pi)/20);if(L==="y"){if(dn.includes("top")||dn.includes("bottom"))if(dn.includes("top")&&Je<0||dn.includes("bottom")&&Je>0)fn.y=Je;else{const pi=Je*gg(Je);fn.y=Math.abs(pi)<Math.abs(Je)?pi:Je}}else if(L==="x"&&(dn.includes("left")||dn.includes("right")))if(dn.includes("left")&&Kt<0||dn.includes("right")&&Kt>0)fn.x=Kt;else{const pi=Kt*gg(Kt);fn.x=Math.abs(pi)<Math.abs(Kt)?pi:Kt}(Math.abs(fn.x)>0||Math.abs(fn.y)>0)&&cn(!0),(ot=He.current)==null||ot.style.setProperty("--swipe-amount-x",`${fn.x}px`),(Dt=He.current)==null||Dt.style.setProperty("--swipe-amount-y",`${fn.y}px`)}},q&&!c.jsx&&P!=="loading"?F.createElement("button",{"aria-label":D,"data-disabled":fi,"data-close-button":!0,onClick:fi||!I?()=>{}:()=>{_n(),c.onDismiss==null||c.onDismiss.call(c,c)},className:jn(Q==null?void 0:Q.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(mg=X==null?void 0:X.close)!=null?mg:X4):null,P||c.icon||c.promise?F.createElement("div",{"data-icon":"",className:jn(Q==null?void 0:Q.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||IE():null,c.type!=="loading"?c.icon||(X==null?void 0:X[P])||H4(P):null):null,F.createElement("div",{"data-content":"",className:jn(Q==null?void 0:Q.content,c==null||(s=c.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:jn(Q==null?void 0:Q.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?F.createElement("div",{"data-description":"",className:jn(M,O,Q==null?void 0:Q.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),F.isValidElement(c.cancel)?c.cancel:c.cancel&&Fl(c.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||k,onClick:re=>{Fl(c.cancel)&&I&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,re),_n())},className:jn(Q==null?void 0:Q.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,F.isValidElement(c.action)?c.action:c.action&&Fl(c.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:re=>{Fl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,re),!re.defaultPrevented&&_n())},className:jn(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function nx(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function hL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?aL:oL;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const mL=F.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:d,theme:c="light",richColors:f,duration:p,style:h,visibleToasts:v=sL,toastOptions:b,dir:m=nx(),gap:x=uL,icons:w,containerAriaLabel:E="Notifications"}=t,[T,C]=F.useState([]),_=F.useMemo(()=>Array.from(new Set([i].concat(T.filter(V=>V.position).map(V=>V.position)))),[T,i]),[k,j]=F.useState([]),[R,M]=F.useState(!1),[G,ne]=F.useState(!1),[J,ee]=F.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=F.useRef(null),X=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=F.useRef(null),L=F.useRef(!1),U=F.useCallback(V=>{C(H=>{var Z;return(Z=H.find(ue=>ue.id===V.id))!=null&&Z.delete||Tt.dismiss(V.id),H.filter(({id:ue})=>ue!==V.id)})},[]);return F.useEffect(()=>Tt.subscribe(V=>{if(V.dismiss){const H=T.map(Z=>Z.id===V.id?{...Z,delete:!0}:Z);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{f2.flushSync(()=>{C(H=>{const Z=H.findIndex(ue=>ue.id===V.id);return Z!==-1?[...H.slice(0,Z),{...H[Z],...V},...H.slice(Z+1)]:[V,...H]})})})}),[T]),F.useEffect(()=>{if(c!=="system"){ee(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:H})=>{ee(H?"dark":"light")})}catch{V.addListener(({matches:Z})=>{try{ee(Z?"dark":"light")}catch(ue){console.error(ue)}})}},[c]),F.useEffect(()=>{T.length<=1&&M(!1)},[T]),F.useEffect(()=>{const V=H=>{var Z;if(s.every(te=>H[te]||H.code===te)){var me;M(!0),(me=Q.current)==null||me.focus()}H.code==="Escape"&&(document.activeElement===Q.current||(Z=Q.current)!=null&&Z.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),F.useEffect(()=>{if(Q.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,L.current=!1)}},[Q.current]),F.createElement("section",{ref:n,"aria-label":`${E} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((V,H)=>{var Z;const[ue,me]=V.split("-");return T.length?F.createElement("ol",{key:V,dir:m==="auto"?nx():m,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":ue,"data-lifted":R&&T.length>1&&!o,"data-x-position":me,style:{"--front-toast-height":`${((Z=k[0])==null?void 0:Z.height)||0}px`,"--width":`${lL}px`,"--gap":`${x}px`,...h,...hL(u,d)},onBlur:te=>{L.current&&!te.currentTarget.contains(te.relatedTarget)&&(L.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||L.current||(L.current=!0,D.current=te.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{G||M(!1)},onDragEnd:()=>M(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},T.filter(te=>!te.position&&H===0||te.position===V).map((te,Fe)=>{var Ye,Xe;return F.createElement(pL,{key:te.id,icons:w,index:Fe,toast:te,defaultRichColors:f,duration:(Ye=b==null?void 0:b.duration)!=null?Ye:p,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:v,closeButton:(Xe=b==null?void 0:b.closeButton)!=null?Xe:a,interacting:G,position:V,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:U,toasts:T.filter(Ot=>Ot.position==te.position),heights:k.filter(Ot=>Ot.position==te.position),setHeights:j,expandByDefault:o,gap:x,expanded:R,swipeDirections:t.swipeDirections})})):null}))});function rx(e){return rE.custom(t=>y.jsx(gL,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Hd={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function gL(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return y.jsxs("div",{className:fe("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",Hd[s||"info"].bg),children:[y.jsx("div",{className:"flex flex-1 items-center",children:y.jsxs("div",{className:"w-full",children:[t&&y.jsx("p",{className:fe("text-sm font-medium",Hd[s||"info"].text),children:t}),y.jsx("p",{className:fe("text-sm",Hd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&y.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:y.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),rE.dismiss(i)},children:r.label})})]})}function vL(e){return Array.isArray(e)&&e[0].field!==void 0}const iE=(e,t)=>{var n;if(vL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||rx({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||rx({description:e.error,variant:"error"});return}};function yL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function lg({id:e,text:t,className:n,required:r}){return t?y.jsxs("label",{htmlFor:e,className:fe("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&y.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Wd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function xL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:u,className:d,ariaInvalid:c,ariaLabel:f,autoFocus:p,...h}){const v=hr();return y.jsxs("div",{className:fe({"mb-2":!o},d),children:[y.jsx(lg,{id:e,text:t,required:a}),y.jsxs("div",{className:"flex items-center",children:[r&&y.jsx("span",{className:fe("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Wd[i],{"border-red-500!":!!l}),children:r}),y.jsx("input",{id:e,className:fe("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Wd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":f,style:{color:v.getColor(Y.InputText),backgroundColor:v.getColor(Y.InputBackground),borderColor:v.getColor(Y.InputBorder),borderRadius:v.getRadius()},...h}),n&&y.jsx("span",{className:fe("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Wd[i],{"border-red-500!":!!l}),children:n})]}),!!l&&y.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const wL=(e,t)=>{document.cookie=`${e}=${t}`},sE=g.createContext({}),bL=()=>`${window.location.pathname}_$$_${document.title}`,SL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},kL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function EL({children:e}){const[t,n]=g.useState("/"),[r,i]=g.useState(kL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return y.jsx(sE.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function ug(){return g.useContext(sE)}function TL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return y.jsxs("div",{className:r||"",children:[e&&y.jsx(lg,{id:t,required:o,text:e}),y.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&y.jsx("p",{className:"1 texm text-r500",children:a})]})}const ix={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},CL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},_L={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},PL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function jL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:d="ring",reversed:c=!1,variant:f="blue",error:p,...h}){return y.jsxs("div",{children:[y.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${ix[d].label}`,children:[y.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[y.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${CL[f]} ${_L[u]} ${ix[d].input}`,required:n,checked:i,value:r,onChange:v=>s==null?void 0:s(v.target.checked),onBlur:v=>o==null?void 0:o(v.target.checked),...h}),y.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:y.jsx(ve.Check,{className:PL[u]})})]}),y.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&y.jsx("small",{className:"text-xs text-red-500",children:a}),p&&y.jsx("small",{className:"text-xs text-red-500",children:p})]})}function AL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return y.jsxs("label",{htmlFor:e,className:fe("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[y.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),y.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function RL({id:e,label:t,children:n,required:r,className:i,error:s}){return y.jsxs("fieldset",{id:e,className:i,children:[t&&y.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&y.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),y.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&y.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const sx=Object.assign(AL,{Group:RL});function cg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:d,inputRef:c,autoFocus:f=!0,style:p,...h}){const v=hr();return y.jsxs("div",{className:fe({"mb-2":!s},i),children:[t&&y.jsx(lg,{id:e,text:t,required:l}),y.jsx("textarea",{className:fe("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":d,...h,ref:c,autoFocus:f,style:{...p,color:v.getColor(Y.InputText),backgroundColor:v.getColor(Y.InputBackground),borderColor:v.getColor(Y.InputBorder),borderRadius:v.getRadius()}}),!!u&&y.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function OL({onOk:e,clientId:t,widgetId:n,appearance:r}){var b,m,x,w,E,T,C,_;const i=hr(),{defaultValues:s}=un(),[o,a]=g.useState(!1),l=ug(),u=yD(),d=!!s&&"username"in s,c=(m=(b=r==null?void 0:r.body)==null?void 0:b.inputs)==null?void 0:m.reduce((k,j)=>{let R=j.remember?ru(j.name):s==null?void 0:s[j.name];return j.options&&R&&!j.options.includes(R)&&(R=void 0),j.name==="username"&&d&&(R=s.username),k[j.name]=R||"",k},{}),f=(w=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:w.reduce((k,j)=>(k[j.name]="",k),{}),p=Qm((T=(E=r==null?void 0:r.body)==null?void 0:E.inputs)==null?void 0:T.reduce((k,j)=>(k[j.name]=j.required?Hu().required(`${j.label} alanı zorunludur`):Hu(),k),{})),h=nE({init:{...c},schema:p,action:async k=>{var M;if(o)return;a(!0),d&&(k.username=s.username);const[j,R]=await u.mutateAsync({inputs:k,history:l.history,client_id:t,widget_id:n});if(dc(R)){vD(j)&&(Ld(Wn.CustomerToken,j.customer_token),Ld(Wn.CustomerRefreshToken,j.customer_refresh_token),Ld(Wn.DeviceId,j.device_id)),l.clearHistory();for(const G of((M=r==null?void 0:r.body)==null?void 0:M.inputs)||[])G.remember&&wL(G.name,k[G.name]);a(!1),e==null||e();return}a(!1),iE(j,{form:h})}}),v=!yL(f||{},(h==null?void 0:h.values)||{});return y.jsx("section",{className:"h-full overflow-y-auto px-4 py-3 bg-white",style:{backgroundColor:i.getColor(Y.GreeterBackground)},children:y.jsxs("form",{className:"grid grid-cols-1 gap-2",onSubmit:k=>{k.preventDefault(),h.handleSubmit()},children:[(_=(C=r==null?void 0:r.body)==null?void 0:C.inputs)==null?void 0:_.map(k=>{var j,R;if(["text","email","phone"].includes(k.type))return y.jsx(xL,{id:k.name,name:k.name,type:k.type,label:k.label,value:h.values[k.name],onChange:h.handleChange,onBlur:h.handleBlur,disabled:k.name==="username"&&d,readOnly:k.name==="username"&&d,autoComplete:"off",placeholder:k.placeholder,error:h.errors[k.name],ariaInvalid:h.errors.name?!0:void 0,required:k.required,noMargin:!0},k.name);if(k.type==="select")return y.jsx(TL,{id:k.name,name:k.name,value:h.values[k.name],onChange:h.handleChange,label:k.label,error:h.errors[k.name],required:k.required,children:(j=k.options)==null?void 0:j.map(M=>y.jsx("option",{value:M,children:M},M))},k.name);if(k.type==="checkbox")return y.jsx(jL,{id:k.name,name:k.name,value:h.values[k.name],checked:h.values[k.name]==="true",onChange:h.handleChange,required:k.required,error:h.errors[k.name],children:k.label},k.name);if(k.type==="radio")return y.jsx(sx.Group,{id:k.name,label:k.label,required:k.required,error:h.errors[k.name],children:(R=k.options)==null?void 0:R.map(M=>y.jsx(sx,{onChange:G=>{G?h.setFieldValue(k.name,M):h.setFieldValue(k.name,"")},id:M,name:k.name,value:M===h.values[k.name],children:M},M))},k.name);if(k.type==="textarea")return y.jsx(cg,{id:k.name,name:k.name,value:h.values[k.name],onChange:h.handleChange,placeholder:k.placeholder,error:h.errors[k.name],required:k.required,label:k.label},k.name)}),y.jsx(rn,{textKey:Y.GreeterButtonText,bgKey:Y.GreeterButtonBackground,type:"submit",disabled:!v||o,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:o?"Yükleniyor...":"Sohbet Oluştur"})]})})}function DL({onClose:e}){return y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:y.jsx(ve.X,{className:"size-5"})})}function FL({image_url:e,name:t,size:n="size-9"}){return e?y.jsx("img",{src:e,alt:t,className:fe("rounded-md",n)}):y.jsx("div",{className:"flex items-center justify-center gap-1",children:y.jsx(ve.Website,{className:fe("text-slate-500",n)})})}function NL(){const e=ug(),t=g.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Um("popstate",t),null}function ML(){const e=rs(),t=ug(),n=g.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Kn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Um("popstate",n),g.useEffect(()=>{if(!e)return;const r=SL(),i=bL();r!==i&&(e.emit(Kn.PageChange,{page:i}),t.setPage(i))},[e]),null}function LL({children:e}){const t=hr(),{widget:n}=un();return n?y.jsx(Yr,{children:y.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[y.jsx(Te.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(Y.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function IL(){return NL(),null}const qd=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function $L(){var c,f,p,h,v,b;const e=hr(),{widget:t,setOpen:n}=un(),[r,i]=g.useState(!0),s=Vm(),o=ko();if(!t)return null;const a=()=>{n(!1)};if(g.useEffect(()=>{xD(t.client_id).then(([m,x])=>{dc(x)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=qd(((f=(c=t.appearance)==null?void 0:c.head)==null?void 0:f.elements)||[],"text"),u=qd(((h=(p=t.appearance)==null?void 0:p.head)==null?void 0:h.elements)||[],"title"),d=qd(((b=(v=t.appearance)==null?void 0:v.head)==null?void 0:b.elements)||[],"logo");return y.jsxs(LL,{children:[y.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&y.jsx(DL,{onClose:a}),d&&y.jsx(Te.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:y.jsx(FL,{name:t.name,image_url:d,size:"size-20"})}),u&&y.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&y.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),y.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:o?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:y.jsx(OL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function zL(){return y.jsxs(y.Fragment,{children:[y.jsx(fk,{border:!0,children:y.jsx($L,{})}),y.jsx(IL,{})]})}const BL=[{path:"/",component:zL,name:"registration"}];var gs=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(gs||{}),bi=(e=>(e.AdminJoin="admin_join",e.ChatCreated="chat_created",e))(bi||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function VL({name:e,avatar:t,className:n="text-neutral-500"}){return y.jsxs(Te.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[y.jsx("div",{className:"min-w-max",children:y.jsxs("span",{children:[t&&y.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&y.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),y.jsx("div",{className:"flex flex-col",children:y.jsx("span",{className:fe("line-clamp-1 font-medium",n),children:e})})]})}var UL=Object.defineProperty,HL=(e,t,n)=>t in e?UL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kd=(e,t,n)=>(HL(e,typeof t!="symbol"?t+"":t,n),n);let WL=class{constructor(){Kd(this,"current",this.detect()),Kd(this,"handoffState","pending"),Kd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ou=new WL;function qL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function zc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return qL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=zc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function oE(){let[e]=g.useState(zc);return g.useEffect(()=>()=>e.dispose(),[e]),e}let Jr=(e,t)=>{ou.isServer?g.useEffect(e,t):g.useLayoutEffect(e,t)};function aE(e){let t=g.useRef(e);return Jr(()=>{t.current=e},[e]),t}let sr=function(e){let t=aE(e);return F.useCallback((...n)=>t.current(...n),[t])};function Gp(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Bc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Bc),r}var lE=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(lE||{}),zr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(zr||{});function uE(){let e=GL();return g.useCallback(t=>KL({mergeRefs:e,...t}),[e])}function KL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??QL;let l=cE(t,e);if(s)return Nl(l,n,r,o,a);let u=i??0;if(u&2){let{static:d=!1,...c}=l;if(d)return Nl(c,n,r,o,a)}if(u&1){let{unmount:d=!0,...c}=l;return Bc(d?0:1,{0(){return null},1(){return Nl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Nl(l,n,r,o,a)}function Nl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Gd(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let f=!1,p=[];for(let[h,v]of Object.entries(t))typeof v=="boolean"&&(f=!0),v===!0&&p.push(h.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(f){c["data-headlessui-state"]=p.join(" ");for(let h of p)c[`data-${h}`]=""}}if(s===g.Fragment&&(Object.keys(wi(l)).length>0||Object.keys(wi(c)).length>0))if(!g.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(wi(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(wi(l)).concat(Object.keys(wi(c))).map(f=>` - ${f}`).join(`
105
+ */var Qe=typeof Symbol=="function"&&Symbol.for,sg=Qe?Symbol.for("react.element"):60103,og=Qe?Symbol.for("react.portal"):60106,Pc=Qe?Symbol.for("react.fragment"):60107,jc=Qe?Symbol.for("react.strict_mode"):60108,Ac=Qe?Symbol.for("react.profiler"):60114,Rc=Qe?Symbol.for("react.provider"):60109,Oc=Qe?Symbol.for("react.context"):60110,ag=Qe?Symbol.for("react.async_mode"):60111,Dc=Qe?Symbol.for("react.concurrent_mode"):60111,Fc=Qe?Symbol.for("react.forward_ref"):60112,Nc=Qe?Symbol.for("react.suspense"):60113,E4=Qe?Symbol.for("react.suspense_list"):60120,Mc=Qe?Symbol.for("react.memo"):60115,Lc=Qe?Symbol.for("react.lazy"):60116,T4=Qe?Symbol.for("react.block"):60121,C4=Qe?Symbol.for("react.fundamental"):60117,_4=Qe?Symbol.for("react.responder"):60118,P4=Qe?Symbol.for("react.scope"):60119;function Wt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case sg:switch(e=e.type,e){case ag:case Dc:case Pc:case Ac:case jc:case Nc:return e;default:switch(e=e&&e.$$typeof,e){case Oc:case Fc:case Lc:case Mc:case Rc:return e;default:return t}}case og:return t}}}function Xk(e){return Wt(e)===Dc}he.AsyncMode=ag;he.ConcurrentMode=Dc;he.ContextConsumer=Oc;he.ContextProvider=Rc;he.Element=sg;he.ForwardRef=Fc;he.Fragment=Pc;he.Lazy=Lc;he.Memo=Mc;he.Portal=og;he.Profiler=Ac;he.StrictMode=jc;he.Suspense=Nc;he.isAsyncMode=function(e){return Xk(e)||Wt(e)===ag};he.isConcurrentMode=Xk;he.isContextConsumer=function(e){return Wt(e)===Oc};he.isContextProvider=function(e){return Wt(e)===Rc};he.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===sg};he.isForwardRef=function(e){return Wt(e)===Fc};he.isFragment=function(e){return Wt(e)===Pc};he.isLazy=function(e){return Wt(e)===Lc};he.isMemo=function(e){return Wt(e)===Mc};he.isPortal=function(e){return Wt(e)===og};he.isProfiler=function(e){return Wt(e)===Ac};he.isStrictMode=function(e){return Wt(e)===jc};he.isSuspense=function(e){return Wt(e)===Nc};he.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pc||e===Dc||e===Ac||e===jc||e===Nc||e===E4||typeof e=="object"&&e!==null&&(e.$$typeof===Lc||e.$$typeof===Mc||e.$$typeof===Rc||e.$$typeof===Oc||e.$$typeof===Fc||e.$$typeof===C4||e.$$typeof===_4||e.$$typeof===P4||e.$$typeof===T4)};he.typeOf=Wt;Yk.exports=he;var j4=Yk.exports,Zk=j4,A4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},R4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Jk={};Jk[Zk.ForwardRef]=A4;Jk[Zk.Memo]=R4;function qe(){return qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(this,arguments)}function eE(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 Ic=g.createContext(void 0);Ic.displayName="FormikContext";Ic.Provider;Ic.Consumer;function O4(){var e=g.useContext(Ic);return e}var mn=function(t){return typeof t=="function"},$c=function(t){return t!==null&&typeof t=="object"},D4=function(t){return String(Math.floor(Number(t)))===t},Vd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Ud=function(t){return $c(t)&&mn(t.then)};function Nt(e,t,n,r){r===void 0&&(r=0);for(var i=Qk(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Bi(e,t,n){for(var r=Zy(e),i=r,s=0,o=Qk(t);s<o.length-1;s++){var a=o[s],l=Nt(e,o.slice(0,s+1));if(l&&($c(l)||Array.isArray(l)))i=i[a]=Zy(l);else{var u=o[s+1];i=i[a]=D4(u)&&Number(u)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function tE(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];$c(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},tE(a,t,n,r[o])):r[o]=t}return r}function F4(e,t){switch(t.type){case"SET_VALUES":return qe({},e,{values:t.payload});case"SET_TOUCHED":return qe({},e,{touched:t.payload});case"SET_ERRORS":return xi(e.errors,t.payload)?e:qe({},e,{errors:t.payload});case"SET_STATUS":return qe({},e,{status:t.payload});case"SET_ISSUBMITTING":return qe({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return qe({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return qe({},e,{values:Bi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return qe({},e,{touched:Bi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return qe({},e,{errors:Bi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return qe({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return qe({},e,{touched:tE(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return qe({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return qe({},e,{isSubmitting:!1});default:return e}}var mi={},Dl={};function N4(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,d=e.onSubmit,c=eE(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=qe({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},c),p=g.useRef(f.initialValues),h=g.useRef(f.initialErrors||mi),v=g.useRef(f.initialTouched||Dl),b=g.useRef(f.initialStatus),m=g.useRef(!1),x=g.useRef({});g.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var w=g.useState(0),E=w[1],T=g.useRef({values:Ol(f.initialValues),errors:Ol(f.initialErrors)||mi,touched:Ol(f.initialTouched)||Dl,status:Ol(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=T.current,_=g.useCallback(function(P){var I=T.current;T.current=F4(I,P),I!==T.current&&E(function(A){return A+1})},[]),k=g.useCallback(function(P,I){return new Promise(function(A,O){var B=f.validate(P,I);B==null?A(mi):Ud(B)?B.then(function(q){A(q||mi)},function(q){O(q)}):A(B)})},[f.validate]),j=g.useCallback(function(P,I){var A=f.validationSchema,O=mn(A)?A(I):A,B=I&&O.validateAt?O.validateAt(I,P):L4(P,O);return new Promise(function(q,oe){B.then(function(){q(mi)},function($e){$e.name==="ValidationError"?q(M4($e)):oe($e)})})},[f.validationSchema]),R=g.useCallback(function(P,I){return new Promise(function(A){return A(x.current[P].validate(I))})},[]),M=g.useCallback(function(P){var I=Object.keys(x.current).filter(function(O){return mn(x.current[O].validate)}),A=I.length>0?I.map(function(O){return R(O,Nt(P,O))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(A).then(function(O){return O.reduce(function(B,q,oe){return q==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||q&&(B=Bi(B,I[oe],q)),B},{})})},[R]),G=g.useCallback(function(P){return Promise.all([M(P),f.validationSchema?j(P):{},f.validate?k(P):{}]).then(function(I){var A=I[0],O=I[1],B=I[2],q=zp.all([A,O,B],{arrayMerge:I4});return q})},[f.validate,f.validationSchema,M,k,j]),ne=Qt(function(P){return P===void 0&&(P=C.values),_({type:"SET_ISVALIDATING",payload:!0}),G(P).then(function(I){return m.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:I})),I})});g.useEffect(function(){o&&m.current===!0&&xi(p.current,f.initialValues)&&ne(p.current)},[o,ne]);var J=g.useCallback(function(P){var I=P&&P.values?P.values:p.current,A=P&&P.errors?P.errors:h.current?h.current:f.initialErrors||{},O=P&&P.touched?P.touched:v.current?v.current:f.initialTouched||{},B=P&&P.status?P.status:b.current?b.current:f.initialStatus;p.current=I,h.current=A,v.current=O,b.current=B;var q=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!P&&!!P.isSubmitting,errors:A,touched:O,status:B,values:I,isValidating:!!P&&!!P.isValidating,submitCount:P&&P.submitCount&&typeof P.submitCount=="number"?P.submitCount:0}})};if(f.onReset){var oe=f.onReset(C.values,ci);Ud(oe)?oe.then(q):q()}else q()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);g.useEffect(function(){m.current===!0&&!xi(p.current,f.initialValues)&&u&&(p.current=f.initialValues,J(),o&&ne(p.current))},[u,f.initialValues,J,o,ne]),g.useEffect(function(){u&&m.current===!0&&!xi(h.current,f.initialErrors)&&(h.current=f.initialErrors||mi,_({type:"SET_ERRORS",payload:f.initialErrors||mi}))},[u,f.initialErrors]),g.useEffect(function(){u&&m.current===!0&&!xi(v.current,f.initialTouched)&&(v.current=f.initialTouched||Dl,_({type:"SET_TOUCHED",payload:f.initialTouched||Dl}))},[u,f.initialTouched]),g.useEffect(function(){u&&m.current===!0&&!xi(b.current,f.initialStatus)&&(b.current=f.initialStatus,_({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var ee=Qt(function(P){if(x.current[P]&&mn(x.current[P].validate)){var I=Nt(C.values,P),A=x.current[P].validate(I);return Ud(A)?(_({type:"SET_ISVALIDATING",payload:!0}),A.then(function(O){return O}).then(function(O){_({type:"SET_FIELD_ERROR",payload:{field:P,value:O}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:P,value:A}}),Promise.resolve(A))}else if(f.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),j(C.values,P).then(function(O){return O}).then(function(O){_({type:"SET_FIELD_ERROR",payload:{field:P,value:Nt(O,P)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=g.useCallback(function(P,I){var A=I.validate;x.current[P]={validate:A}},[]),X=g.useCallback(function(P){delete x.current[P]},[]),D=Qt(function(P,I){_({type:"SET_TOUCHED",payload:P});var A=I===void 0?i:I;return A?ne(C.values):Promise.resolve()}),L=g.useCallback(function(P){_({type:"SET_ERRORS",payload:P})},[]),U=Qt(function(P,I){var A=mn(P)?P(C.values):P;_({type:"SET_VALUES",payload:A});var O=I===void 0?n:I;return O?ne(A):Promise.resolve()}),V=g.useCallback(function(P,I){_({type:"SET_FIELD_ERROR",payload:{field:P,value:I}})},[]),H=Qt(function(P,I,A){_({type:"SET_FIELD_VALUE",payload:{field:P,value:I}});var O=A===void 0?n:A;return O?ne(Bi(C.values,P,I)):Promise.resolve()}),Z=g.useCallback(function(P,I){var A=I,O=P,B;if(!Vd(P)){P.persist&&P.persist();var q=P.target?P.target:P.currentTarget,oe=q.type,$e=q.name,Ze=q.id,_n=q.value,qt=q.checked,fs=q.outerHTML,Yn=q.options,xr=q.multiple;A=I||$e||Ze,O=/number|range/.test(oe)?(B=parseFloat(_n),isNaN(B)?"":B):/checkbox/.test(oe)?z4(Nt(C.values,A),qt,_n):Yn&&xr?$4(Yn):_n}A&&H(A,O)},[H,C.values]),ue=Qt(function(P){if(Vd(P))return function(I){return Z(I,P)};Z(P)}),me=Qt(function(P,I,A){I===void 0&&(I=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:P,value:I}});var O=A===void 0?i:A;return O?ne(C.values):Promise.resolve()}),te=g.useCallback(function(P,I){P.persist&&P.persist();var A=P.target,O=A.name,B=A.id,q=A.outerHTML,oe=I||O||B;me(oe,!0)},[me]),Fe=Qt(function(P){if(Vd(P))return function(I){return te(I,P)};te(P)}),Ye=g.useCallback(function(P){mn(P)?_({type:"SET_FORMIK_STATE",payload:P}):_({type:"SET_FORMIK_STATE",payload:function(){return P}})},[]),Xe=g.useCallback(function(P){_({type:"SET_STATUS",payload:P})},[]),Ot=g.useCallback(function(P){_({type:"SET_ISSUBMITTING",payload:P})},[]),Cn=Qt(function(){return _({type:"SUBMIT_ATTEMPT"}),ne().then(function(P){var I=P instanceof Error,A=!I&&Object.keys(P).length===0;if(A){var O;try{if(O=gr(),O===void 0)return}catch(B){throw B}return Promise.resolve(O).then(function(B){return m.current&&_({type:"SUBMIT_SUCCESS"}),B}).catch(function(B){if(m.current)throw _({type:"SUBMIT_FAILURE"}),B})}else if(m.current&&(_({type:"SUBMIT_FAILURE"}),I))throw P})}),dn=Qt(function(P){P&&P.preventDefault&&mn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&mn(P.stopPropagation)&&P.stopPropagation(),Cn().catch(function(I){console.warn("Warning: An unhandled error was caught from submitForm()",I)})}),ci={resetForm:J,validateForm:ne,validateField:ee,setErrors:L,setFieldError:V,setFieldTouched:me,setFieldValue:H,setStatus:Xe,setSubmitting:Ot,setTouched:D,setValues:U,setFormikState:Ye,submitForm:Cn},gr=Qt(function(){return d(C.values,ci)}),ds=Qt(function(P){P&&P.preventDefault&&mn(P.preventDefault)&&P.preventDefault(),P&&P.stopPropagation&&mn(P.stopPropagation)&&P.stopPropagation(),J()}),di=g.useCallback(function(P){return{value:Nt(C.values,P),error:Nt(C.errors,P),touched:!!Nt(C.touched,P),initialValue:Nt(p.current,P),initialTouched:!!Nt(v.current,P),initialError:Nt(h.current,P)}},[C.errors,C.touched,C.values]),bt=g.useCallback(function(P){return{setValue:function(A,O){return H(P,A,O)},setTouched:function(A,O){return me(P,A,O)},setError:function(A){return V(P,A)}}},[H,me,V]),vr=g.useCallback(function(P){var I=$c(P),A=I?P.name:P,O=Nt(C.values,A),B={name:A,value:O,onChange:ue,onBlur:Fe};if(I){var q=P.type,oe=P.value,$e=P.as,Ze=P.multiple;q==="checkbox"?oe===void 0?B.checked=!!O:(B.checked=!!(Array.isArray(O)&&~O.indexOf(oe)),B.value=oe):q==="radio"?(B.checked=O===oe,B.value=oe):$e==="select"&&Ze&&(B.value=B.value||[],B.multiple=!0)}return B},[Fe,ue,C.values]),He=g.useMemo(function(){return!xi(p.current,C.values)},[p.current,C.values]),yr=g.useMemo(function(){return typeof a<"u"?He?C.errors&&Object.keys(C.errors).length===0:a!==!1&&mn(a)?a(f):a:C.errors&&Object.keys(C.errors).length===0},[a,He,C.errors,f]),To=qe({},C,{initialValues:p.current,initialErrors:h.current,initialTouched:v.current,initialStatus:b.current,handleBlur:Fe,handleChange:ue,handleReset:ds,handleSubmit:dn,resetForm:J,setErrors:L,setFormikState:Ye,setFieldTouched:me,setFieldValue:H,setFieldError:V,setStatus:Xe,setSubmitting:Ot,setTouched:D,setValues:U,submitForm:Cn,validateForm:ne,validateField:ee,isValid:yr,dirty:He,unregisterField:X,registerField:Q,getFieldProps:vr,getFieldMeta:di,getFieldHelpers:bt,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return To}function M4(e){var t={};if(e.inner){if(e.inner.length===0)return Bi(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Nt(t,o.path)||(t=Bi(t,o.path,o.message))}}return t}function L4(e,t,n,r){n===void 0&&(n=!1);var i=qp(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function qp(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||Py(i)?qp(i):i!==""?i:void 0}):Py(e[r])?t[r]=qp(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function I4(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?zp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=zp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function $4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function z4(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var B4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?g.useLayoutEffect:g.useEffect;function Qt(e){var t=g.useRef(e);return B4(function(){t.current=e}),g.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var V4=g.forwardRef(function(e,t){var n=e.action,r=eE(e,["action"]),i=n??"#",s=O4(),o=s.handleReset,a=s.handleSubmit;return g.createElement("form",qe({onSubmit:a,ref:t,onReset:o,action:i},r))});V4.displayName="Form";const nE=({init:e,schema:t,action:n})=>N4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function U4(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const H4=e=>{switch(e){case"success":return K4;case"info":return Q4;case"warning":return G4;case"error":return Y4;default:return null}},W4=Array(12).fill(0),q4=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},W4.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),K4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),G4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Q4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Y4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),X4=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Z4=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Kp=1;class J4{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Kp++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],F.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(tL(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:f,...p})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:c,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>a.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Kp++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Tt=new J4,eL=(e,t)=>{const n=(t==null?void 0:t.id)||Kp++;return Tt.addToast({title:e,...t,id:n}),n},tL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",nL=eL,rL=()=>Tt.toasts,iL=()=>Tt.getActiveToasts(),rE=Object.assign(nL,{success:Tt.success,info:Tt.info,warning:Tt.warning,error:Tt.error,custom:Tt.custom,message:Tt.message,promise:Tt.promise,dismiss:Tt.dismiss,loading:Tt.loading},{getHistory:rL,getToasts:iL});U4("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Fl(e){return e.label!==void 0}const sL=3,oL="24px",aL="16px",tx=4e3,lL=356,uL=14,cL=45,dL=200;function An(...e){return e.filter(Boolean).join(" ")}function fL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const pL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:d,toast:c,unstyled:f,interacting:p,setHeights:h,visibleToasts:v,heights:b,index:m,toasts:x,expanded:w,removeToast:E,defaultRichColors:T,closeButton:C,style:_,cancelButtonStyle:k,actionButtonStyle:j,className:R="",descriptionClassName:M="",duration:G,position:ne,gap:J,expandByDefault:ee,classNames:Q,icons:X,closeButtonAriaLabel:D="Close toast"}=e,[L,U]=F.useState(null),[V,H]=F.useState(null),[Z,ue]=F.useState(!1),[me,te]=F.useState(!1),[Fe,Ye]=F.useState(!1),[Xe,Ot]=F.useState(!1),[Cn,dn]=F.useState(!1),[ci,gr]=F.useState(0),[ds,di]=F.useState(0),bt=F.useRef(c.duration||G||tx),vr=F.useRef(null),He=F.useRef(null),yr=m===0,To=m+1<=v,P=c.type,I=c.dismissible!==!1,A=c.className||"",O=c.descriptionClassName||"",B=F.useMemo(()=>b.findIndex(re=>re.toastId===c.id)||0,[b,c.id]),q=F.useMemo(()=>{var re;return(re=c.closeButton)!=null?re:C},[c.closeButton,C]),oe=F.useMemo(()=>c.duration||G||tx,[c.duration,G]),$e=F.useRef(0),Ze=F.useRef(0),_n=F.useRef(0),qt=F.useRef(null),[fs,Yn]=ne.split("-"),xr=F.useMemo(()=>b.reduce((re,We,ot)=>ot>=B?re:re+We.height,0),[b,B]),ps=Z4(),Co=c.invert||d,fi=P==="loading";Ze.current=F.useMemo(()=>B*J+xr,[B,xr]),F.useEffect(()=>{bt.current=oe},[oe]),F.useEffect(()=>{ue(!0)},[]),F.useEffect(()=>{const re=He.current;if(re){const We=re.getBoundingClientRect().height;return di(We),h(ot=>[{toastId:c.id,height:We,position:c.position},...ot]),()=>h(ot=>ot.filter(Dt=>Dt.toastId!==c.id))}},[h,c.id]),F.useLayoutEffect(()=>{if(!Z)return;const re=He.current,We=re.style.height;re.style.height="auto";const ot=re.getBoundingClientRect().height;re.style.height=We,di(ot),h(Dt=>Dt.find(Je=>Je.toastId===c.id)?Dt.map(Je=>Je.toastId===c.id?{...Je,height:ot}:Je):[{toastId:c.id,height:ot,position:c.position},...Dt])},[Z,c.title,c.description,h,c.id]);const Pn=F.useCallback(()=>{te(!0),gr(Ze.current),h(re=>re.filter(We=>We.toastId!==c.id)),setTimeout(()=>{E(c)},dL)},[c,E,h,Ze]);F.useEffect(()=>{if(c.promise&&P==="loading"||c.duration===1/0||c.type==="loading")return;let re;return w||p||ps?(()=>{if(_n.current<$e.current){const Dt=new Date().getTime()-$e.current;bt.current=bt.current-Dt}_n.current=new Date().getTime()})():(()=>{bt.current!==1/0&&($e.current=new Date().getTime(),re=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Pn()},bt.current))})(),()=>clearTimeout(re)},[w,p,c,P,ps,Pn]),F.useEffect(()=>{c.delete&&Pn()},[Pn,c.delete]);function IE(){var re;if(X!=null&&X.loading){var We;return F.createElement("div",{className:An(Q==null?void 0:Q.loader,c==null||(We=c.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":P==="loading"},X.loading)}return F.createElement(q4,{className:An(Q==null?void 0:Q.loader,c==null||(re=c.classNames)==null?void 0:re.loader),visible:P==="loading"})}var hg,mg;return F.createElement("li",{tabIndex:0,ref:He,className:An(R,A,Q==null?void 0:Q.toast,c==null||(t=c.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[P],c==null||(n=c.classNames)==null?void 0:n[P]),"data-sonner-toast":"","data-rich-colors":(hg=c.richColors)!=null?hg:T,"data-styled":!(c.jsx||c.unstyled||f),"data-mounted":Z,"data-promise":!!c.promise,"data-swiped":Cn,"data-removed":me,"data-visible":To,"data-y-position":fs,"data-x-position":Yn,"data-index":m,"data-front":yr,"data-swiping":Fe,"data-dismissible":I,"data-type":P,"data-invert":Co,"data-swipe-out":Xe,"data-swipe-direction":V,"data-expanded":!!(w||ee&&Z),style:{"--index":m,"--toasts-before":m,"--z-index":x.length-m,"--offset":`${me?ci:Ze.current}px`,"--initial-height":ee?"auto":`${ds}px`,..._,...c.style},onDragEnd:()=>{Ye(!1),U(null),qt.current=null},onPointerDown:re=>{fi||!I||(vr.current=new Date,gr(Ze.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Ye(!0),qt.current={x:re.clientX,y:re.clientY}))},onPointerUp:()=>{var re,We,ot;if(Xe||!I)return;qt.current=null;const Dt=Number(((re=He.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),il=Number(((We=He.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Je=new Date().getTime()-((ot=vr.current)==null?void 0:ot.getTime()),Kt=L==="x"?Dt:il,sl=Math.abs(Kt)/Je;if(Math.abs(Kt)>=cL||sl>.11){gr(Ze.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Dt>0?"right":"left":il>0?"down":"up"),Pn(),Ot(!0);return}else{var fn,pn;(fn=He.current)==null||fn.style.setProperty("--swipe-amount-x","0px"),(pn=He.current)==null||pn.style.setProperty("--swipe-amount-y","0px")}dn(!1),Ye(!1),U(null)},onPointerMove:re=>{var We,ot,Dt;if(!qt.current||!I||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const Je=re.clientY-qt.current.y,Kt=re.clientX-qt.current.x;var sl;const fn=(sl=e.swipeDirections)!=null?sl:fL(ne);!L&&(Math.abs(Kt)>1||Math.abs(Je)>1)&&U(Math.abs(Kt)>Math.abs(Je)?"x":"y");let pn={x:0,y:0};const gg=pi=>1/(1.5+Math.abs(pi)/20);if(L==="y"){if(fn.includes("top")||fn.includes("bottom"))if(fn.includes("top")&&Je<0||fn.includes("bottom")&&Je>0)pn.y=Je;else{const pi=Je*gg(Je);pn.y=Math.abs(pi)<Math.abs(Je)?pi:Je}}else if(L==="x"&&(fn.includes("left")||fn.includes("right")))if(fn.includes("left")&&Kt<0||fn.includes("right")&&Kt>0)pn.x=Kt;else{const pi=Kt*gg(Kt);pn.x=Math.abs(pi)<Math.abs(Kt)?pi:Kt}(Math.abs(pn.x)>0||Math.abs(pn.y)>0)&&dn(!0),(ot=He.current)==null||ot.style.setProperty("--swipe-amount-x",`${pn.x}px`),(Dt=He.current)==null||Dt.style.setProperty("--swipe-amount-y",`${pn.y}px`)}},q&&!c.jsx&&P!=="loading"?F.createElement("button",{"aria-label":D,"data-disabled":fi,"data-close-button":!0,onClick:fi||!I?()=>{}:()=>{Pn(),c.onDismiss==null||c.onDismiss.call(c,c)},className:An(Q==null?void 0:Q.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(mg=X==null?void 0:X.close)!=null?mg:X4):null,P||c.icon||c.promise?F.createElement("div",{"data-icon":"",className:An(Q==null?void 0:Q.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||IE():null,c.type!=="loading"?c.icon||(X==null?void 0:X[P])||H4(P):null):null,F.createElement("div",{"data-content":"",className:An(Q==null?void 0:Q.content,c==null||(s=c.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:An(Q==null?void 0:Q.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?F.createElement("div",{"data-description":"",className:An(M,O,Q==null?void 0:Q.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),F.isValidElement(c.cancel)?c.cancel:c.cancel&&Fl(c.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||k,onClick:re=>{Fl(c.cancel)&&I&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,re),Pn())},className:An(Q==null?void 0:Q.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,F.isValidElement(c.action)?c.action:c.action&&Fl(c.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:re=>{Fl(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,re),!re.defaultPrevented&&Pn())},className:An(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function nx(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function hL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?aL:oL;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const mL=F.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:d,theme:c="light",richColors:f,duration:p,style:h,visibleToasts:v=sL,toastOptions:b,dir:m=nx(),gap:x=uL,icons:w,containerAriaLabel:E="Notifications"}=t,[T,C]=F.useState([]),_=F.useMemo(()=>Array.from(new Set([i].concat(T.filter(V=>V.position).map(V=>V.position)))),[T,i]),[k,j]=F.useState([]),[R,M]=F.useState(!1),[G,ne]=F.useState(!1),[J,ee]=F.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=F.useRef(null),X=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=F.useRef(null),L=F.useRef(!1),U=F.useCallback(V=>{C(H=>{var Z;return(Z=H.find(ue=>ue.id===V.id))!=null&&Z.delete||Tt.dismiss(V.id),H.filter(({id:ue})=>ue!==V.id)})},[]);return F.useEffect(()=>Tt.subscribe(V=>{if(V.dismiss){const H=T.map(Z=>Z.id===V.id?{...Z,delete:!0}:Z);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{f2.flushSync(()=>{C(H=>{const Z=H.findIndex(ue=>ue.id===V.id);return Z!==-1?[...H.slice(0,Z),{...H[Z],...V},...H.slice(Z+1)]:[V,...H]})})})}),[T]),F.useEffect(()=>{if(c!=="system"){ee(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:H})=>{ee(H?"dark":"light")})}catch{V.addListener(({matches:Z})=>{try{ee(Z?"dark":"light")}catch(ue){console.error(ue)}})}},[c]),F.useEffect(()=>{T.length<=1&&M(!1)},[T]),F.useEffect(()=>{const V=H=>{var Z;if(s.every(te=>H[te]||H.code===te)){var me;M(!0),(me=Q.current)==null||me.focus()}H.code==="Escape"&&(document.activeElement===Q.current||(Z=Q.current)!=null&&Z.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),F.useEffect(()=>{if(Q.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,L.current=!1)}},[Q.current]),F.createElement("section",{ref:n,"aria-label":`${E} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((V,H)=>{var Z;const[ue,me]=V.split("-");return T.length?F.createElement("ol",{key:V,dir:m==="auto"?nx():m,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":ue,"data-lifted":R&&T.length>1&&!o,"data-x-position":me,style:{"--front-toast-height":`${((Z=k[0])==null?void 0:Z.height)||0}px`,"--width":`${lL}px`,"--gap":`${x}px`,...h,...hL(u,d)},onBlur:te=>{L.current&&!te.currentTarget.contains(te.relatedTarget)&&(L.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||L.current||(L.current=!0,D.current=te.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{G||M(!1)},onDragEnd:()=>M(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},T.filter(te=>!te.position&&H===0||te.position===V).map((te,Fe)=>{var Ye,Xe;return F.createElement(pL,{key:te.id,icons:w,index:Fe,toast:te,defaultRichColors:f,duration:(Ye=b==null?void 0:b.duration)!=null?Ye:p,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:v,closeButton:(Xe=b==null?void 0:b.closeButton)!=null?Xe:a,interacting:G,position:V,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:U,toasts:T.filter(Ot=>Ot.position==te.position),heights:k.filter(Ot=>Ot.position==te.position),setHeights:j,expandByDefault:o,gap:x,expanded:R,swipeDirections:t.swipeDirections})})):null}))});function rx(e){return rE.custom(t=>y.jsx(gL,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Hd={success:{bg:"bg-green-100 border-green-200",text:"text-green-800"},error:{bg:"bg-red-100 border-red-200",text:"text-red-800"},warning:{bg:"bg-orange-100 border-orange-200",text:"text-orange-800"},info:{bg:"bg-blue-100 border-blue-200",text:"text-blue-800"}};function gL(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return y.jsxs("div",{className:fe("flex rounded-lg shadow-lg ring-1 ring-black/5 w-full md:max-w-[364px] items-center p-3 backdrop-blur-sm border mb-2",Hd[s||"info"].bg),children:[y.jsx("div",{className:"flex flex-1 items-center",children:y.jsxs("div",{className:"w-full",children:[t&&y.jsx("p",{className:fe("text-sm font-medium",Hd[s||"info"].text),children:t}),y.jsx("p",{className:fe("text-sm",Hd[s||"info"].text,{"mt-1":!!t}),children:n})]})}),r&&y.jsx("div",{className:"ml-5 shrink-0 rounded-md text-sm font-medium text-indigo-600 hover:text-indigo-500 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden",children:y.jsx("button",{className:"rounded bg-indigo-50 px-3 py-1 text-sm font-semibold text-indigo-600 hover:bg-indigo-100",onClick:()=>{r.onClick(),rE.dismiss(i)},children:r.label})})]})}function vL(e){return Array.isArray(e)&&e[0].field!==void 0}const iE=(e,t)=>{var n;if(vL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||rx({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||rx({description:e.error,variant:"error"});return}};function yL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function lg({id:e,text:t,className:n,required:r}){return t?y.jsxs("label",{htmlFor:e,className:fe("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&y.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Wd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function xL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:u,className:d,ariaInvalid:c,ariaLabel:f,autoFocus:p,...h}){const v=hr();return y.jsxs("div",{className:fe({"mb-2":!o},d),children:[y.jsx(lg,{id:e,text:t,required:a}),y.jsxs("div",{className:"flex items-center",children:[r&&y.jsx("span",{className:fe("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Wd[i],{"border-red-500!":!!l}),children:r}),y.jsx("input",{id:e,className:fe("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Wd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":f,style:{color:v.getColor(Y.InputText),backgroundColor:v.getColor(Y.InputBackground),borderColor:v.getColor(Y.InputBorder),borderRadius:v.getRadius()},...h}),n&&y.jsx("span",{className:fe("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Wd[i],{"border-red-500!":!!l}),children:n})]}),!!l&&y.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const wL=(e,t)=>{document.cookie=`${e}=${t}`},sE=g.createContext({}),bL=()=>`${window.location.pathname}_$$_${document.title}`,SL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},kL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function EL({children:e}){const[t,n]=g.useState("/"),[r,i]=g.useState(kL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return y.jsx(sE.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function ug(){return g.useContext(sE)}function TL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return y.jsxs("div",{className:r||"",children:[e&&y.jsx(lg,{id:t,required:o,text:e}),y.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&y.jsx("p",{className:"1 texm text-r500",children:a})]})}const ix={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},CL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},_L={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},PL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function jL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:d="ring",reversed:c=!1,variant:f="blue",error:p,...h}){return y.jsxs("div",{children:[y.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${ix[d].label}`,children:[y.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[y.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${CL[f]} ${_L[u]} ${ix[d].input}`,required:n,checked:i,value:r,onChange:v=>s==null?void 0:s(v.target.checked),onBlur:v=>o==null?void 0:o(v.target.checked),...h}),y.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:y.jsx(ve.Check,{className:PL[u]})})]}),y.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&y.jsx("small",{className:"text-xs text-red-500",children:a}),p&&y.jsx("small",{className:"text-xs text-red-500",children:p})]})}function AL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return y.jsxs("label",{htmlFor:e,className:fe("relative flex cursor-pointer items-center rounded-md focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[y.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,defaultChecked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),y.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function RL({id:e,label:t,children:n,required:r,className:i,error:s}){return y.jsxs("fieldset",{id:e,className:i,children:[t&&y.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&y.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),y.jsx("div",{className:"flex flex-col gap-1.5 mt-0.5",children:n}),s&&y.jsx("p",{className:"text-red-500 text-sm",children:s})]})}const sx=Object.assign(AL,{Group:RL});function cg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:d,inputRef:c,autoFocus:f=!0,style:p,...h}){const v=hr();return y.jsxs("div",{className:fe({"mb-2":!s},i),children:[t&&y.jsx(lg,{id:e,text:t,required:l}),y.jsx("textarea",{className:fe("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":d,...h,ref:c,autoFocus:f,style:{...p,color:v.getColor(Y.InputText),backgroundColor:v.getColor(Y.InputBackground),borderColor:v.getColor(Y.InputBorder),borderRadius:v.getRadius()}}),!!u&&y.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function OL({onOk:e,clientId:t,widgetId:n,appearance:r}){var b,m,x,w,E,T,C,_;const i=hr(),{defaultValues:s}=cn(),[o,a]=g.useState(!1),l=ug(),u=yD(),d=!!s&&"username"in s,c=(m=(b=r==null?void 0:r.body)==null?void 0:b.inputs)==null?void 0:m.reduce((k,j)=>{let R=j.remember?ru(j.name):s==null?void 0:s[j.name];return j.options&&R&&!j.options.includes(R)&&(R=void 0),j.name==="username"&&d&&(R=s.username),k[j.name]=R||"",k},{}),f=(w=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:w.reduce((k,j)=>(k[j.name]="",k),{}),p=Qm((T=(E=r==null?void 0:r.body)==null?void 0:E.inputs)==null?void 0:T.reduce((k,j)=>(k[j.name]=j.required?Hu().required(`${j.label} alanı zorunludur`):Hu(),k),{})),h=nE({init:{...c},schema:p,action:async k=>{var M;if(o)return;a(!0),d&&(k.username=s.username);const[j,R]=await u.mutateAsync({inputs:k,history:l.history,client_id:t,widget_id:n});if(dc(R)){vD(j)&&(yd(on.CustomerToken,j.customer_token),yd(on.CustomerRefreshToken,j.customer_refresh_token),yd(on.DeviceId,j.device_id)),l.clearHistory();for(const G of((M=r==null?void 0:r.body)==null?void 0:M.inputs)||[])G.remember&&wL(G.name,k[G.name]);a(!1),e==null||e();return}a(!1),iE(j,{form:h})}}),v=!yL(f||{},(h==null?void 0:h.values)||{});return y.jsx("section",{className:"h-full overflow-y-auto px-4 py-3 bg-white",style:{backgroundColor:i.getColor(Y.GreeterBackground)},children:y.jsxs("form",{className:"grid grid-cols-1 gap-2",onSubmit:k=>{k.preventDefault(),h.handleSubmit()},children:[(_=(C=r==null?void 0:r.body)==null?void 0:C.inputs)==null?void 0:_.map(k=>{var j,R;if(["text","email","phone"].includes(k.type))return y.jsx(xL,{id:k.name,name:k.name,type:k.type,label:k.label,value:h.values[k.name],onChange:h.handleChange,onBlur:h.handleBlur,disabled:k.name==="username"&&d,readOnly:k.name==="username"&&d,autoComplete:"off",placeholder:k.placeholder,error:h.errors[k.name],ariaInvalid:h.errors.name?!0:void 0,required:k.required,noMargin:!0},k.name);if(k.type==="select")return y.jsx(TL,{id:k.name,name:k.name,value:h.values[k.name],onChange:h.handleChange,label:k.label,error:h.errors[k.name],required:k.required,children:(j=k.options)==null?void 0:j.map(M=>y.jsx("option",{value:M,children:M},M))},k.name);if(k.type==="checkbox")return y.jsx(jL,{id:k.name,name:k.name,value:h.values[k.name],checked:h.values[k.name]==="true",onChange:h.handleChange,required:k.required,error:h.errors[k.name],children:k.label},k.name);if(k.type==="radio")return y.jsx(sx.Group,{id:k.name,label:k.label,required:k.required,error:h.errors[k.name],children:(R=k.options)==null?void 0:R.map(M=>y.jsx(sx,{onChange:G=>{G?h.setFieldValue(k.name,M):h.setFieldValue(k.name,"")},id:M,name:k.name,value:M===h.values[k.name],children:M},M))},k.name);if(k.type==="textarea")return y.jsx(cg,{id:k.name,name:k.name,value:h.values[k.name],onChange:h.handleChange,placeholder:k.placeholder,error:h.errors[k.name],required:k.required,label:k.label},k.name)}),y.jsx(rn,{textKey:Y.GreeterButtonText,bgKey:Y.GreeterButtonBackground,type:"submit",disabled:!v||o,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:o?"Yükleniyor...":"Sohbet Oluştur"})]})})}function DL({onClose:e}){return y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:y.jsx(ve.X,{className:"size-5"})})}function FL({image_url:e,name:t,size:n="size-9"}){return e?y.jsx("img",{src:e,alt:t,className:fe("rounded-md",n)}):y.jsx("div",{className:"flex items-center justify-center gap-1",children:y.jsx(ve.Website,{className:fe("text-slate-500",n)})})}function NL(){const e=ug(),t=g.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Um("popstate",t),null}function ML(){const e=rs(),t=ug(),n=g.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Kn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Um("popstate",n),g.useEffect(()=>{if(!e)return;const r=SL(),i=bL();r!==i&&(e.emit(Kn.PageChange,{page:i}),t.setPage(i))},[e]),null}function LL({children:e}){const t=hr(),{widget:n}=cn();return n?y.jsx(Yr,{children:y.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[y.jsx(Te.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(Y.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function IL(){return NL(),null}const qd=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function $L(){var c,f,p,h,v,b;const e=hr(),{widget:t,setOpen:n}=cn(),[r,i]=g.useState(!0),s=Vm(),o=ko();if(!t)return null;const a=()=>{n(!1)};if(g.useEffect(()=>{xD(t.client_id).then(([m,x])=>{dc(x)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=qd(((f=(c=t.appearance)==null?void 0:c.head)==null?void 0:f.elements)||[],"text"),u=qd(((h=(p=t.appearance)==null?void 0:p.head)==null?void 0:h.elements)||[],"title"),d=qd(((b=(v=t.appearance)==null?void 0:v.head)==null?void 0:b.elements)||[],"logo");return y.jsxs(LL,{children:[y.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&y.jsx(DL,{onClose:a}),d&&y.jsx(Te.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:y.jsx(FL,{name:t.name,image_url:d,size:"size-20"})}),u&&y.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&y.jsx(Te.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(Y.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),y.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:o?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:y.jsx(OL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function zL(){return y.jsxs(y.Fragment,{children:[y.jsx(fk,{border:!0,children:y.jsx($L,{})}),y.jsx(IL,{})]})}const BL=[{path:"/",component:zL,name:"registration"}];var gs=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(gs||{}),bi=(e=>(e.AdminJoin="admin_join",e.ChatCreated="chat_created",e))(bi||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function VL({name:e,avatar:t,className:n="text-neutral-500"}){return y.jsxs(Te.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[y.jsx("div",{className:"min-w-max",children:y.jsxs("span",{children:[t&&y.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&y.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),y.jsx("div",{className:"flex flex-col",children:y.jsx("span",{className:fe("line-clamp-1 font-medium",n),children:e})})]})}var UL=Object.defineProperty,HL=(e,t,n)=>t in e?UL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kd=(e,t,n)=>(HL(e,typeof t!="symbol"?t+"":t,n),n);let WL=class{constructor(){Kd(this,"current",this.detect()),Kd(this,"handoffState","pending"),Kd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ou=new WL;function qL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function zc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return qL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=zc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function oE(){let[e]=g.useState(zc);return g.useEffect(()=>()=>e.dispose(),[e]),e}let Jr=(e,t)=>{ou.isServer?g.useEffect(e,t):g.useLayoutEffect(e,t)};function aE(e){let t=g.useRef(e);return Jr(()=>{t.current=e},[e]),t}let sr=function(e){let t=aE(e);return F.useCallback((...n)=>t.current(...n),[t])};function Gp(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Bc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Bc),r}var lE=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(lE||{}),zr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(zr||{});function uE(){let e=GL();return g.useCallback(t=>KL({mergeRefs:e,...t}),[e])}function KL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??QL;let l=cE(t,e);if(s)return Nl(l,n,r,o,a);let u=i??0;if(u&2){let{static:d=!1,...c}=l;if(d)return Nl(c,n,r,o,a)}if(u&1){let{unmount:d=!0,...c}=l;return Bc(d?0:1,{0(){return null},1(){return Nl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Nl(l,n,r,o,a)}function Nl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Gd(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let f=!1,p=[];for(let[h,v]of Object.entries(t))typeof v=="boolean"&&(f=!0),v===!0&&p.push(h.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(f){c["data-headlessui-state"]=p.join(" ");for(let h of p)c[`data-${h}`]=""}}if(s===g.Fragment&&(Object.keys(wi(l)).length>0||Object.keys(wi(c)).length>0))if(!g.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(wi(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(wi(l)).concat(Object.keys(wi(c))).map(f=>` - ${f}`).join(`
106
106
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
107
107
  `)].join(`
108
108
  `))}else{let f=d.props,p=f==null?void 0:f.className,h=typeof p=="function"?(...m)=>Gp(p(...m),l.className):Gp(p,l.className),v=h?{className:h}:{},b=cE(d.props,wi(Gd(l,["ref"])));for(let m in c)m in b&&delete c[m];return g.cloneElement(d,Object.assign({},b,c,u,{ref:i(YL(d),u.ref)},v))}return g.createElement(s,Object.assign({},Gd(l,["ref"]),s!==g.Fragment&&u,s!==g.Fragment&&c),d)}function GL(){let e=g.useRef([]),t=g.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function QL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function cE(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function dg(e){var t;return Object.assign(g.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function wi(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Gd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function YL(e){return F.version.split(".")[0]>="19"?e.props.ref:e.ref}let XL=Symbol();function dE(...e){let t=g.useRef(e);g.useEffect(()=>{t.current=e},[e]);let n=sr(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[XL]))?void 0:n}function ZL(e=0){let[t,n]=g.useState(e),r=g.useCallback(l=>n(l),[t]),i=g.useCallback(l=>n(u=>u|l),[t]),s=g.useCallback(l=>(t&l)===l,[t]),o=g.useCallback(l=>n(u=>u&~l),[n]),a=g.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var JL={},ox,ax;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ox=process==null?void 0:JL)==null?void 0:ox.NODE_ENV)==="test"&&typeof((ax=Element==null?void 0:Element.prototype)==null?void 0:ax.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
109
- `)),[]});var eI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(eI||{});function tI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function nI(e,t,n,r){let[i,s]=g.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=ZL(e&&i?3:0),u=g.useRef(!1),d=g.useRef(!1),c=oE();return Jr(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),rI(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var p;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(p=r==null?void 0:r.end)==null||p.call(r,n))}})}},[e,n,t,c]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function rI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=zc();return sI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(iI(e,r))})}),s.dispose}function iI(e,t){var n,r;let i=zc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function sI(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let fg=g.createContext(null);fg.displayName="OpenClosedContext";var ji=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ji||{});function fE(){return g.useContext(fg)}function oI({value:e,children:t}){return F.createElement(fg.Provider,{value:e},t)}function aI(){let e=typeof document>"u";return"useSyncExternalStore"in Xd?(t=>t.useSyncExternalStore)(Xd)(()=>()=>{},()=>!1,()=>!e):!1}function pE(){let e=aI(),[t,n]=g.useState(ou.isHandoffComplete);return t&&ou.isHandoffComplete===!1&&n(!1),g.useEffect(()=>{t!==!0&&n(!0)},[t]),g.useEffect(()=>ou.handoff(),[]),e?!1:t}function lI(){let e=g.useRef(!1);return Jr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function hE(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:gE)!==g.Fragment||F.Children.count(e.children)===1}let Vc=g.createContext(null);Vc.displayName="TransitionContext";var uI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(uI||{});function cI(){let e=g.useContext(Vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dI(){let e=g.useContext(Uc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Uc=g.createContext(null);Uc.displayName="NestingContext";function Hc(e){return"children"in e?Hc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function mE(e,t){let n=aE(e),r=g.useRef([]),i=lI(),s=oE(),o=sr((p,h=zr.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===p);v!==-1&&(Bc(h,{[zr.Unmount](){r.current.splice(v,1)},[zr.Hidden](){r.current[v].state="hidden"}}),s.microTask(()=>{var b;!Hc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=sr(p=>{let h=r.current.find(({el:v})=>v===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,zr.Unmount)}),l=g.useRef([]),u=g.useRef(Promise.resolve()),d=g.useRef({enter:[],leave:[]}),c=sr((p,h,v)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==p)),t==null||t.chains.current[h].push([p,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[h].push([p,new Promise(b=>{Promise.all(d.current[h].map(([m,x])=>x)).then(()=>b())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(h)):v(h)}),f=sr((p,h,v)=>{Promise.all(d.current[h].splice(0).map(([b,m])=>m)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>v(h))});return g.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:f,wait:u,chains:d}),[a,o,r,c,f,d,u])}let gE=g.Fragment,vE=lE.RenderStrategy;function fI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:f,leave:p,leaveFrom:h,leaveTo:v,...b}=e,[m,x]=g.useState(null),w=g.useRef(null),E=hE(e),T=dE(...E?[w,t,x]:t===null?[]:[t]),C=(n=b.unmount)==null||n?zr.Unmount:zr.Hidden,{show:_,appear:k,initial:j}=cI(),[R,M]=g.useState(_?"visible":"hidden"),G=dI(),{register:ne,unregister:J}=G;Jr(()=>ne(w),[ne,w]),Jr(()=>{if(C===zr.Hidden&&w.current){if(_&&R!=="visible"){M("visible");return}return Bc(R,{hidden:()=>J(w),visible:()=>ne(w)})}},[R,w,ne,J,_,C]);let ee=pE();Jr(()=>{if(E&&ee&&R==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,R,ee,E]);let Q=j&&!k,X=k&&_&&j,D=g.useRef(!1),L=mE(()=>{D.current||(M("hidden"),J(w))},G),U=sr(Fe=>{D.current=!0;let Ye=Fe?"enter":"leave";L.onStart(w,Ye,Xe=>{Xe==="enter"?s==null||s():Xe==="leave"&&(a==null||a())})}),V=sr(Fe=>{let Ye=Fe?"enter":"leave";D.current=!1,L.onStop(w,Ye,Xe=>{Xe==="enter"?o==null||o():Xe==="leave"&&(l==null||l())}),Ye==="leave"&&!Hc(L)&&(M("hidden"),J(w))});g.useEffect(()=>{E&&i||(U(_),V(_))},[_,E,i]);let H=!(!i||!E||!ee||Q),[,Z]=nI(H,m,_,{start:U,end:V}),ue=wi({ref:T,className:((r=Gp(b.className,X&&u,X&&d,Z.enter&&u,Z.enter&&Z.closed&&d,Z.enter&&!Z.closed&&c,Z.leave&&p,Z.leave&&!Z.closed&&h,Z.leave&&Z.closed&&v,!Z.transition&&_&&f))==null?void 0:r.trim())||void 0,...tI(Z)}),me=0;R==="visible"&&(me|=ji.Open),R==="hidden"&&(me|=ji.Closed),_&&R==="hidden"&&(me|=ji.Opening),!_&&R==="visible"&&(me|=ji.Closing);let te=uE();return F.createElement(Uc.Provider,{value:L},F.createElement(oI,{value:me},te({ourProps:ue,theirProps:b,defaultTag:gE,features:vE,visible:R==="visible",name:"Transition.Child"})))}function pI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=g.useRef(null),a=hE(e),l=dE(...a?[o,t]:t===null?[]:[t]);pE();let u=fE();if(n===void 0&&u!==null&&(n=(u&ji.Open)===ji.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=g.useState(n?"visible":"hidden"),f=mE(()=>{n||c("hidden")}),[p,h]=g.useState(!0),v=g.useRef([n]);Jr(()=>{p!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),h(!1))},[v,n]);let b=g.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);Jr(()=>{n?c("visible"):!Hc(f)&&o.current!==null&&c("hidden")},[n,f]);let m={unmount:i},x=sr(()=>{var T;p&&h(!1),(T=e.beforeEnter)==null||T.call(e)}),w=sr(()=>{var T;p&&h(!1),(T=e.beforeLeave)==null||T.call(e)}),E=uE();return F.createElement(Uc.Provider,{value:f},F.createElement(Vc.Provider,{value:b},E({ourProps:{...m,as:g.Fragment,children:F.createElement(yE,{ref:l,...m,...s,beforeEnter:x,beforeLeave:w})},theirProps:{},defaultTag:g.Fragment,features:vE,visible:d==="visible",name:"Transition"})))}function hI(e,t){let n=g.useContext(Vc)!==null,r=fE()!==null;return F.createElement(F.Fragment,null,!n&&r?F.createElement(Qp,{ref:t,...e}):F.createElement(yE,{ref:t,...e}))}let Qp=dg(pI),yE=dg(fI),mI=dg(hI),gI=Object.assign(Qp,{Child:mI,Root:Qp});const pg=g.createContext(void 0),aa=({as:e="div",children:t,className:n})=>{const[r,i]=g.useState(!1),s=g.useCallback(()=>{i(a=>!a)},[]),o=g.useRef(null);return g.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),y.jsx(pg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:y.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},vI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=g.useContext(pg),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return y.jsx("div",{children:e==="a"?y.jsx(uP,{id:r,to:"/#",onClick:d=>{d.preventDefault(),o()},className:u+(s?" show":""),children:t}):y.jsx("button",{id:r,onClick:d=>{d.stopPropagation(),d.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},yI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=g.useContext(pg),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=g.useState("right-end");g.useEffect(()=>{r&&l(r)},[r]);const u=g.useRef(null),d=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const f=u.current;f.style.position="absolute",d==="rtl"?f.style.inset="0px auto auto 0px":f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto 0px 0px auto",f.style.margin="0px",f.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto auto 0px 0px",f.style.margin="0px",f.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.right="0px",f.style.transform="translate(0px, -20px)"}return{}};return y.jsx(gI,{as:F.Fragment,show:i,children:f=>y.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${f==="entered"?"transition-all":""}`,style:c(),children:n})})};aa.Trigger=vI;aa.Content=yI;const xI={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function wI({onChatClose:e}){const[t,n]=g.useState(!1),r=rs(),i=()=>{r==null||r.emit(Kn.ChatClose,{}),e()};return y.jsxs(y.Fragment,{children:[y.jsx(Yr,{children:t&&y.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 bg-slate-900/40 z-50 flex items-center justify-center p-4",children:y.jsxs(Te.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[y.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),y.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),y.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[y.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),y.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),y.jsxs(aa,{className:"relative flex items-center h-full",children:[y.jsx(aa.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:y.jsx(ve.Menu,{className:"size-5 text-slate-600"})}),y.jsx(Yr,{children:!t&&y.jsx(Te.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:y.jsxs(aa.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[y.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),y.jsx("ul",{className:"py-2 px-2",children:y.jsx("li",{children:y.jsxs("button",{className:fe("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",xI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[y.jsx(ve.X,{className:"w-4 h-4"}),y.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function bI({text:e}){const n=(r=>{const i=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,s=r.split(/(<[^>]*>)/g);let o="",a=!1;for(let l=0;l<s.length;l++){const u=s[l];if(u.startsWith("<")&&u.endsWith(">"))if(console.log("Processing HTML tag:",u),u.match(/^<a\s/i)){if(u.includes("style="))o+=u;else{const d=u.replace(/^(<a\s[^>]*)(>)$/i,'$1 style="color: #f97316; text-decoration: underline;"$2');o+=d}a=!0,console.log("Entering <a> tag")}else u.match(/^<\/a>/i)?(o+=u,a=!1,console.log("Exiting <a> tag")):o+=u;else if(!a&&u.trim()){const d=u.replace(i,c=>{const f=c.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(f)?f:`https://${f}`}" target="_blank" rel="noopener noreferrer" style="color: #f97316; text-decoration: underline;">${f}</a>`});o+=d}else console.log("Skipping linkify for part:",u),o+=u}return o})(e);return y.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:n}})}const lx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function xE({files:e,className:t,onDelete:n,hideName:r}){const i=ko(),[s,o]=g.useState(new Map);g.useEffect(()=>{const h=new Map;for(let v=0;v<e.length;v++){const b=e[v];if(b instanceof File){const m=URL.createObjectURL(b);h.set(v,m)}}return o(h),()=>{for(const v of h.values())URL.revokeObjectURL(v)}},[e]);const a=h=>{var b;return((b=(h instanceof File?h.name:h).split(".").pop())==null?void 0:b.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,u=h=>{const[v,b]=h.split(".");return v.length>10?`${v.slice(0,10)}...${b}`:h},d=h=>{const v=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(h);return v.includes(b)},c=(h,v)=>{if(h instanceof File){const b=s.get(v);b&&window.open(b,"_blank")}else window.open(h,"_blank")},f=(h,v)=>{h.stopPropagation(),n==null||n(v)},p=(h,v)=>h instanceof File?s.get(v)||"":h;return y.jsx("div",{className:fe("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,v)=>{const b=l(h),m=a(h),x=d(h),w=p(h,v);return y.jsxs("div",{onClick:()=>c(h,v),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&y.jsx("button",{onClick:E=>f(E,v),className:fe("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:y.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),x?y.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:y.jsx("img",{src:w,alt:b,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):y.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:y.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),y.jsx("div",{className:fe("text-[10px] font-medium text-gray-600 uppercase",{[lx]:r}),children:m||"file"})]})}),y.jsx("div",{className:fe("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[lx]:r}),title:b,children:u(b)})]},v)})})}const SI={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},ux=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function kI({messages:e,isTyping:t}){var d,c,f,p;const n=g.useRef(null),r=g.useRef(null),[i,s]=g.useState(!0),{widget:o}=un(),a=ko(),l=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},u=()=>{if(r.current){const{scrollTop:h,scrollHeight:v,clientHeight:b}=r.current,m=v-h<=b+10;s(m)}};return g.useEffect(()=>{(i||t)&&l()},[e,i,t]),y.jsxs("section",{onScroll:u,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_message)&&y.jsx("div",{className:"flex w-full items-center justify-start",children:y.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(p=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:p.greeting_message})}),y.jsx(Yr,{children:e.filter(h=>!!h.content&&h.content!==`
109
+ `)),[]});var eI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(eI||{});function tI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function nI(e,t,n,r){let[i,s]=g.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=ZL(e&&i?3:0),u=g.useRef(!1),d=g.useRef(!1),c=oE();return Jr(()=>{var f;if(e){if(n&&s(!0),!t){n&&a(3);return}return(f=r==null?void 0:r.start)==null||f.call(r,n),rI(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var p;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(p=r==null?void 0:r.end)==null||p.call(r,n))}})}},[e,n,t,c]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function rI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=zc();return sI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(iI(e,r))})}),s.dispose}function iI(e,t){var n,r;let i=zc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function sI(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let fg=g.createContext(null);fg.displayName="OpenClosedContext";var ji=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ji||{});function fE(){return g.useContext(fg)}function oI({value:e,children:t}){return F.createElement(fg.Provider,{value:e},t)}function aI(){let e=typeof document>"u";return"useSyncExternalStore"in Xd?(t=>t.useSyncExternalStore)(Xd)(()=>()=>{},()=>!1,()=>!e):!1}function pE(){let e=aI(),[t,n]=g.useState(ou.isHandoffComplete);return t&&ou.isHandoffComplete===!1&&n(!1),g.useEffect(()=>{t!==!0&&n(!0)},[t]),g.useEffect(()=>ou.handoff(),[]),e?!1:t}function lI(){let e=g.useRef(!1);return Jr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function hE(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:gE)!==g.Fragment||F.Children.count(e.children)===1}let Vc=g.createContext(null);Vc.displayName="TransitionContext";var uI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(uI||{});function cI(){let e=g.useContext(Vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dI(){let e=g.useContext(Uc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Uc=g.createContext(null);Uc.displayName="NestingContext";function Hc(e){return"children"in e?Hc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function mE(e,t){let n=aE(e),r=g.useRef([]),i=lI(),s=oE(),o=sr((p,h=zr.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===p);v!==-1&&(Bc(h,{[zr.Unmount](){r.current.splice(v,1)},[zr.Hidden](){r.current[v].state="hidden"}}),s.microTask(()=>{var b;!Hc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=sr(p=>{let h=r.current.find(({el:v})=>v===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,zr.Unmount)}),l=g.useRef([]),u=g.useRef(Promise.resolve()),d=g.useRef({enter:[],leave:[]}),c=sr((p,h,v)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([b])=>b!==p)),t==null||t.chains.current[h].push([p,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[h].push([p,new Promise(b=>{Promise.all(d.current[h].map(([m,x])=>x)).then(()=>b())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(h)):v(h)}),f=sr((p,h,v)=>{Promise.all(d.current[h].splice(0).map(([b,m])=>m)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>v(h))});return g.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:f,wait:u,chains:d}),[a,o,r,c,f,d,u])}let gE=g.Fragment,vE=lE.RenderStrategy;function fI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:f,leave:p,leaveFrom:h,leaveTo:v,...b}=e,[m,x]=g.useState(null),w=g.useRef(null),E=hE(e),T=dE(...E?[w,t,x]:t===null?[]:[t]),C=(n=b.unmount)==null||n?zr.Unmount:zr.Hidden,{show:_,appear:k,initial:j}=cI(),[R,M]=g.useState(_?"visible":"hidden"),G=dI(),{register:ne,unregister:J}=G;Jr(()=>ne(w),[ne,w]),Jr(()=>{if(C===zr.Hidden&&w.current){if(_&&R!=="visible"){M("visible");return}return Bc(R,{hidden:()=>J(w),visible:()=>ne(w)})}},[R,w,ne,J,_,C]);let ee=pE();Jr(()=>{if(E&&ee&&R==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,R,ee,E]);let Q=j&&!k,X=k&&_&&j,D=g.useRef(!1),L=mE(()=>{D.current||(M("hidden"),J(w))},G),U=sr(Fe=>{D.current=!0;let Ye=Fe?"enter":"leave";L.onStart(w,Ye,Xe=>{Xe==="enter"?s==null||s():Xe==="leave"&&(a==null||a())})}),V=sr(Fe=>{let Ye=Fe?"enter":"leave";D.current=!1,L.onStop(w,Ye,Xe=>{Xe==="enter"?o==null||o():Xe==="leave"&&(l==null||l())}),Ye==="leave"&&!Hc(L)&&(M("hidden"),J(w))});g.useEffect(()=>{E&&i||(U(_),V(_))},[_,E,i]);let H=!(!i||!E||!ee||Q),[,Z]=nI(H,m,_,{start:U,end:V}),ue=wi({ref:T,className:((r=Gp(b.className,X&&u,X&&d,Z.enter&&u,Z.enter&&Z.closed&&d,Z.enter&&!Z.closed&&c,Z.leave&&p,Z.leave&&!Z.closed&&h,Z.leave&&Z.closed&&v,!Z.transition&&_&&f))==null?void 0:r.trim())||void 0,...tI(Z)}),me=0;R==="visible"&&(me|=ji.Open),R==="hidden"&&(me|=ji.Closed),_&&R==="hidden"&&(me|=ji.Opening),!_&&R==="visible"&&(me|=ji.Closing);let te=uE();return F.createElement(Uc.Provider,{value:L},F.createElement(oI,{value:me},te({ourProps:ue,theirProps:b,defaultTag:gE,features:vE,visible:R==="visible",name:"Transition.Child"})))}function pI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=g.useRef(null),a=hE(e),l=dE(...a?[o,t]:t===null?[]:[t]);pE();let u=fE();if(n===void 0&&u!==null&&(n=(u&ji.Open)===ji.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=g.useState(n?"visible":"hidden"),f=mE(()=>{n||c("hidden")}),[p,h]=g.useState(!0),v=g.useRef([n]);Jr(()=>{p!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),h(!1))},[v,n]);let b=g.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);Jr(()=>{n?c("visible"):!Hc(f)&&o.current!==null&&c("hidden")},[n,f]);let m={unmount:i},x=sr(()=>{var T;p&&h(!1),(T=e.beforeEnter)==null||T.call(e)}),w=sr(()=>{var T;p&&h(!1),(T=e.beforeLeave)==null||T.call(e)}),E=uE();return F.createElement(Uc.Provider,{value:f},F.createElement(Vc.Provider,{value:b},E({ourProps:{...m,as:g.Fragment,children:F.createElement(yE,{ref:l,...m,...s,beforeEnter:x,beforeLeave:w})},theirProps:{},defaultTag:g.Fragment,features:vE,visible:d==="visible",name:"Transition"})))}function hI(e,t){let n=g.useContext(Vc)!==null,r=fE()!==null;return F.createElement(F.Fragment,null,!n&&r?F.createElement(Qp,{ref:t,...e}):F.createElement(yE,{ref:t,...e}))}let Qp=dg(pI),yE=dg(fI),mI=dg(hI),gI=Object.assign(Qp,{Child:mI,Root:Qp});const pg=g.createContext(void 0),aa=({as:e="div",children:t,className:n})=>{const[r,i]=g.useState(!1),s=g.useCallback(()=>{i(a=>!a)},[]),o=g.useRef(null);return g.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),y.jsx(pg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:y.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},vI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=g.useContext(pg),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return y.jsx("div",{children:e==="a"?y.jsx(uP,{id:r,to:"/#",onClick:d=>{d.preventDefault(),o()},className:u+(s?" show":""),children:t}):y.jsx("button",{id:r,onClick:d=>{d.stopPropagation(),d.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},yI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=g.useContext(pg),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=g.useState("right-end");g.useEffect(()=>{r&&l(r)},[r]);const u=g.useRef(null),d=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const f=u.current;f.style.position="absolute",d==="rtl"?f.style.inset="0px auto auto 0px":f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto 0px 0px auto",f.style.margin="0px",f.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px 0px auto auto",f.style.margin="0px",f.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="auto auto 0px 0px",f.style.margin="0px",f.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const f=u.current;f.style.position="absolute",f.style.inset="0px auto auto 0px",f.style.margin="0px",f.style.right="0px",f.style.transform="translate(0px, -20px)"}return{}};return y.jsx(gI,{as:F.Fragment,show:i,children:f=>y.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${f==="entered"?"transition-all":""}`,style:c(),children:n})})};aa.Trigger=vI;aa.Content=yI;const xI={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function wI({onChatClose:e}){const[t,n]=g.useState(!1),r=rs(),i=()=>{r==null||r.emit(Kn.ChatClose,{}),e()};return y.jsxs(y.Fragment,{children:[y.jsx(Yr,{children:t&&y.jsx(Te.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 bg-slate-900/40 z-50 flex items-center justify-center p-4",children:y.jsxs(Te.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[y.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),y.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),y.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[y.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),y.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),y.jsxs(aa,{className:"relative flex items-center h-full",children:[y.jsx(aa.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:y.jsx(ve.Menu,{className:"size-5 text-slate-600"})}),y.jsx(Yr,{children:!t&&y.jsx(Te.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:y.jsxs(aa.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[y.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),y.jsx("ul",{className:"py-2 px-2",children:y.jsx("li",{children:y.jsxs("button",{className:fe("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",xI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[y.jsx(ve.X,{className:"w-4 h-4"}),y.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function bI({text:e}){const n=(r=>{const i=/(https?:\/\/(?:[-\w.])+(?:\:[0-9]+)?(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?|(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}(?:\/(?:[\w\/_.\-~!$&'()*+,;=:@])*(?:\?(?:[\w&=%.\-~!$'()*+,;=:@/])*)?(?:\#(?:[\w.\-~!$&'()*+,;=:@/])*)?)?)/gi,s=r.split(/(<[^>]*>)/g);let o="",a=!1;for(let l=0;l<s.length;l++){const u=s[l];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))o+=u;else{const d=u.replace(/^(<a\s[^>]*)(>)$/i,'$1 style="color: #f97316; text-decoration: underline;"$2');o+=d}a=!0}else u.match(/^<\/a>/i)?(o+=u,a=!1):o+=u;else if(!a&&u.trim()){const d=u.replace(i,c=>{const f=c.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(f)?f:`https://${f}`}" target="_blank" rel="noopener noreferrer" style="color: #f97316; text-decoration: underline;">${f}</a>`});o+=d}else o+=u}return o})(e);return y.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:n}})}const lx="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function xE({files:e,className:t,onDelete:n,hideName:r}){const i=ko(),[s,o]=g.useState(new Map);g.useEffect(()=>{const h=new Map;for(let v=0;v<e.length;v++){const b=e[v];if(b instanceof File){const m=URL.createObjectURL(b);h.set(v,m)}}return o(h),()=>{for(const v of h.values())URL.revokeObjectURL(v)}},[e]);const a=h=>{var b;return((b=(h instanceof File?h.name:h).split(".").pop())==null?void 0:b.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,u=h=>{const[v,b]=h.split(".");return v.length>10?`${v.slice(0,10)}...${b}`:h},d=h=>{const v=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(h);return v.includes(b)},c=(h,v)=>{if(h instanceof File){const b=s.get(v);b&&window.open(b,"_blank")}else window.open(h,"_blank")},f=(h,v)=>{h.stopPropagation(),n==null||n(v)},p=(h,v)=>h instanceof File?s.get(v)||"":h;return y.jsx("div",{className:fe("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,v)=>{const b=l(h),m=a(h),x=d(h),w=p(h,v);return y.jsxs("div",{onClick:()=>c(h,v),className:"min-w-28 max-w-28 cursor-pointer group/item border border-gray-200 rounded-lg p-2 hover:shadow-md transition-all duration-200 hover:border-gray-300 bg-white relative",children:[n&&y.jsx("button",{onClick:E=>f(E,v),className:fe("absolute top-1 right-1 w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full flex items-center justify-center transition-opacity duration-200 z-10",{"opacity-0 group-hover/item:opacity-100":!i}),children:y.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),x?y.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:y.jsx("img",{src:w,alt:b,className:"w-24 h-24 min-h-24 min-w-24 object-cover group-hover/item:scale-105 transition-transform duration-200"})}):y.jsx("div",{className:"min-w-24 aspect-square w-full mb-1 flex items-center justify-center bg-gray-50 rounded group-hover/item:bg-gray-100 transition-colors duration-200",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"w-8 h-8 mx-auto mb-1 bg-blue-100 rounded flex items-center justify-center",children:y.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:y.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),y.jsx("div",{className:fe("text-[10px] font-medium text-gray-600 uppercase",{[lx]:r}),children:m||"file"})]})}),y.jsx("div",{className:fe("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[lx]:r}),title:b,children:u(b)})]},v)})})}const SI={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},ux=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function kI({messages:e,isTyping:t}){var d,c,f,p;const n=g.useRef(null),r=g.useRef(null),[i,s]=g.useState(!0),{widget:o}=cn(),a=ko(),l=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},u=()=>{if(r.current){const{scrollTop:h,scrollHeight:v,clientHeight:b}=r.current,m=v-h<=b+10;s(m)}};return g.useEffect(()=>{(i||t)&&l()},[e,i,t]),y.jsxs("section",{onScroll:u,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_message)&&y.jsx("div",{className:"flex w-full items-center justify-start",children:y.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(p=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:p.greeting_message})}),y.jsx(Yr,{children:e.filter(h=>!!h.content&&h.content!==`
110
110
  `).map((h,v)=>y.jsxs(Te.div,{custom:v,initial:"hidden",animate:"visible",variants:SI,className:fe("flex w-full items-center break-words",{"justify-end":h.sender_type===et.Customer||h.activity_type===bi.ChatCreated,"justify-start":h.sender_type===et.User,"justify-center":h.sender_type===et.System||h.sender_type===et.Activity}),children:[h.sender_type===et.System&&y.jsx("div",{className:"whitespace-pre-wrap text-slate-600 bg-slate-100 px-3 py-1.5 rounded-lg text-sm shadow-sm",children:h.content}),([et.Customer,et.User].includes(h.sender_type)||h.activity_type===bi.ChatCreated)&&y.jsxs(Te.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:fe("max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 shadow-sm",{"bg-indigo-100 text-indigo-800":h.sender_type===et.Customer||h.activity_type===bi.ChatCreated,"bg-blue-600 text-white":h.sender_type===et.User}),children:[h.files&&h.files.length>0&&y.jsx(xE,{files:h.files,className:"mb-1",hideName:!0}),h.sender_type===et.User?y.jsx(bI,{text:h.content}):h.content,h.created_at&&y.jsx("div",{className:fe("text-[0.5rem] text-right",{"text-indigo-400":h.sender_type===et.Customer||h.activity_type===bi.ChatCreated,"text-blue-100":h.sender_type===et.User}),children:ux(h.created_at)})]}),h.sender_type===et.Activity&&h.activity_type!==bi.ChatCreated&&(h.content.split("_").length===3?y.jsxs("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:[h.content.split("_")[2]," odaya katıldı"]}):y.jsx("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:h.content})),et.System===h.sender_type&&y.jsx("div",{className:"text-xs text-slate-400",children:h.created_at&&ux(h.created_at)})]},h.id||v))}),t&&y.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:y.jsx("div",{className:"flex items-center bg-slate-100 rounded-full px-3 py-1.5 shadow-none",children:y.jsxs("div",{className:"flex space-x-1",children:[y.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),y.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),y.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),!i&&y.jsx("div",{className:fe("fixed",{"bottom-40 right-14":!a,"bottom-28 right-4":a}),children:y.jsx(rn,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,v;(v=r.current)==null||v.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:y.jsx(ve.ArrowDown,{className:"size-4"})})}),y.jsx("div",{ref:n})]})}/**
111
111
  * @license lucide-react v0.511.0 - ISC
112
112
  *
@@ -134,6 +134,6 @@ attempted value: ${o}
134
134
  * See the LICENSE file in the root directory of this source tree.
135
135
  */const AI=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],bE=jI("cloud-upload",AI);var SE={exports:{}},RI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OI=RI,DI=OI;function kE(){}function EE(){}EE.resetWarningCache=kE;var FI=function(){function e(r,i,s,o,a,l){if(l!==DI){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:EE,resetWarningCache:kE};return n.PropTypes=n,n};SE.exports=FI();var NI=SE.exports;const ge=Yi(NI);function cs(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(d){try{u(r.next(d))}catch(c){o(c)}}function l(d){try{u(r.throw(d))}catch(c){o(c)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}const MI=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function ho(e,t,n){const r=LI(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&dx(r,"path",s),dx(r,"relativePath",s),r}function LI(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=MI.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function dx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const II=[".DS_Store","Thumbs.db"];function $I(e){return cs(this,void 0,void 0,function*(){return qu(e)&&zI(e.dataTransfer)?HI(e.dataTransfer,e.type):BI(e)?VI(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?UI(e):[]})}function zI(e){return qu(e)}function BI(e){return qu(e)&&qu(e.target)}function qu(e){return typeof e=="object"&&e!==null}function VI(e){return Yp(e.target.files).map(t=>ho(t))}function UI(e){return cs(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ho(n))})}function HI(e,t){return cs(this,void 0,void 0,function*(){if(e.items){const n=Yp(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(WI));return fx(TE(r))}return fx(Yp(e.files).map(n=>ho(n)))})}function fx(e){return e.filter(t=>II.indexOf(t.name)===-1)}function Yp(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function WI(e){if(typeof e.webkitGetAsEntry!="function")return px(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?CE(t):px(e,t)}function TE(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?TE(n):[n]],[])}function px(e,t){return cs(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const o=yield s.getFile();return o.handle=s,ho(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ho(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function qI(e){return cs(this,void 0,void 0,function*(){return e.isDirectory?CE(e):KI(e)})}function CE(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>cs(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(qI));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function KI(e){return cs(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=ho(r,e.fullPath);t(i)},r=>{n(r)})})})}var Qd=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):i===a})}return!0};function hx(e){return YI(e)||QI(e)||PE(e)||GI()}function GI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
136
136
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YI(e){if(Array.isArray(e))return Xp(e)}function mx(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 gx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mx(Object(n),!0).forEach(function(r){_E(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $a(e,t){return JI(e)||ZI(e,t)||PE(e,t)||XI()}function XI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PE(e,t){if(e){if(typeof e=="string")return Xp(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 Xp(e,t)}}function Xp(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 ZI(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 JI(e){if(Array.isArray(e))return e}var e$=typeof Qd=="function"?Qd:Qd.default,t$="file-invalid-type",n$="file-too-large",r$="file-too-small",i$="too-many-files",s$=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:t$,message:"File type must be ".concat(r)}},vx=function(t){return{code:n$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},yx=function(t){return{code:r$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},o$={code:i$,message:"Too many files"};function jE(e,t){var n=e.type==="application/x-moz-file"||e$(e,t);return[n,n?null:s$(t)]}function AE(e,t,n){if(Si(e.size))if(Si(t)&&Si(n)){if(e.size>n)return[!1,vx(n)];if(e.size<t)return[!1,yx(t)]}else{if(Si(t)&&e.size<t)return[!1,yx(t)];if(Si(n)&&e.size>n)return[!1,vx(n)]}return[!0,null]}function Si(e){return e!=null}function a$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var u=jE(l,n),d=$a(u,1),c=d[0],f=AE(l,r,i),p=$a(f,1),h=p[0],v=a?a(l):null;return c&&h&&!v})}function Ku(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ml(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function xx(e){e.preventDefault()}function l$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function u$(e){return e.indexOf("Edge/")!==-1}function c$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return l$(e)||u$(e)}function An(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!Ku(r)&&a&&a.apply(void 0,[r].concat(s)),Ku(r)})}}function d$(){return"showOpenFilePicker"in window}function f$(e){if(Si(e)){var t=Object.entries(e).filter(function(n){var r=$a(n,2),i=r[0],s=r[1],o=!0;return RE(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(OE))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=$a(r,2),s=i[0],o=i[1];return gx(gx({},n),{},_E({},s,o))},{});return[{description:"Files",accept:t}]}return e}function p$(e){if(Si(e))return Object.entries(e).reduce(function(t,n){var r=$a(n,2),i=r[0],s=r[1];return[].concat(hx(t),[i],hx(s))},[]).filter(function(t){return RE(t)||OE(t)}).join(",")}function h$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function m$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function RE(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function OE(e){return/^.*\.[\w]+$/.test(e)}var g$=["children"],v$=["open"],y$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],x$=["refKey","onChange","onClick"];function w$(e){return k$(e)||S$(e)||DE(e)||b$()}function b$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
137
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PE(e,t){if(e){if(typeof e=="string")return Xp(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 Xp(e,t)}}function Xp(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 ZI(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 JI(e){if(Array.isArray(e))return e}var e$=typeof Qd=="function"?Qd:Qd.default,t$="file-invalid-type",n$="file-too-large",r$="file-too-small",i$="too-many-files",s$=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:t$,message:"File type must be ".concat(r)}},vx=function(t){return{code:n$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},yx=function(t){return{code:r$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},o$={code:i$,message:"Too many files"};function jE(e,t){var n=e.type==="application/x-moz-file"||e$(e,t);return[n,n?null:s$(t)]}function AE(e,t,n){if(Si(e.size))if(Si(t)&&Si(n)){if(e.size>n)return[!1,vx(n)];if(e.size<t)return[!1,yx(t)]}else{if(Si(t)&&e.size<t)return[!1,yx(t)];if(Si(n)&&e.size>n)return[!1,vx(n)]}return[!0,null]}function Si(e){return e!=null}function a$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var u=jE(l,n),d=$a(u,1),c=d[0],f=AE(l,r,i),p=$a(f,1),h=p[0],v=a?a(l):null;return c&&h&&!v})}function Ku(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ml(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function xx(e){e.preventDefault()}function l$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function u$(e){return e.indexOf("Edge/")!==-1}function c$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return l$(e)||u$(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!Ku(r)&&a&&a.apply(void 0,[r].concat(s)),Ku(r)})}}function d$(){return"showOpenFilePicker"in window}function f$(e){if(Si(e)){var t=Object.entries(e).filter(function(n){var r=$a(n,2),i=r[0],s=r[1],o=!0;return RE(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(OE))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=$a(r,2),s=i[0],o=i[1];return gx(gx({},n),{},_E({},s,o))},{});return[{description:"Files",accept:t}]}return e}function p$(e){if(Si(e))return Object.entries(e).reduce(function(t,n){var r=$a(n,2),i=r[0],s=r[1];return[].concat(hx(t),[i],hx(s))},[]).filter(function(t){return RE(t)||OE(t)}).join(",")}function h$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function m$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function RE(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function OE(e){return/^.*\.[\w]+$/.test(e)}var g$=["children"],v$=["open"],y$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],x$=["refKey","onChange","onClick"];function w$(e){return k$(e)||S$(e)||DE(e)||b$()}function b$(){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 S$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function k$(e){if(Array.isArray(e))return Zp(e)}function Yd(e,t){return C$(e)||T$(e,t)||DE(e,t)||E$()}function E$(){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 DE(e,t){if(e){if(typeof e=="string")return Zp(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 Zp(e,t)}}function Zp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function C$(e){if(Array.isArray(e))return 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 Ce(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){Jp(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 Jp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gu(e,t){if(e==null)return{};var n=_$(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 _$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var rl=g.forwardRef(function(e,t){var n=e.children,r=Gu(e,g$),i=P$(r),s=i.open,o=Gu(i,v$);return g.useImperativeHandle(t,function(){return{open:s}},[s]),F.createElement(g.Fragment,null,n(Ce(Ce({},o),{},{open:s})))});rl.displayName="Dropzone";var FE={disabled:!1,getFilesFromEvent:$I,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};rl.defaultProps=FE;rl.propTypes={children:ge.func,accept:ge.objectOf(ge.arrayOf(ge.string)),multiple:ge.bool,preventDropOnDocument:ge.bool,noClick:ge.bool,noKeyboard:ge.bool,noDrag:ge.bool,noDragEventsBubbling:ge.bool,minSize:ge.number,maxSize:ge.number,maxFiles:ge.number,disabled:ge.bool,getFilesFromEvent:ge.func,onFileDialogCancel:ge.func,onFileDialogOpen:ge.func,useFsAccessApi:ge.bool,autoFocus:ge.bool,onDragEnter:ge.func,onDragLeave:ge.func,onDragOver:ge.func,onDrop:ge.func,onDropAccepted:ge.func,onDropRejected:ge.func,onError:ge.func,validator:ge.func};var eh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function P$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ce(Ce({},FE),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,c=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,v=t.onFileDialogCancel,b=t.onFileDialogOpen,m=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,E=t.noClick,T=t.noKeyboard,C=t.noDrag,_=t.noDragEventsBubbling,k=t.onError,j=t.validator,R=g.useMemo(function(){return p$(n)},[n]),M=g.useMemo(function(){return f$(n)},[n]),G=g.useMemo(function(){return typeof b=="function"?b:bx},[b]),ne=g.useMemo(function(){return typeof v=="function"?v:bx},[v]),J=g.useRef(null),ee=g.useRef(null),Q=g.useReducer(j$,eh),X=Yd(Q,2),D=X[0],L=X[1],U=D.isFocused,V=D.isFileDialogActive,H=g.useRef(typeof window<"u"&&window.isSecureContext&&m&&d$()),Z=function(){!H.current&&V&&setTimeout(function(){if(ee.current){var O=ee.current.files;O.length||(L({type:"closeDialog"}),ne())}},300)};g.useEffect(function(){return window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)}},[ee,V,ne,H]);var ue=g.useRef([]),me=function(O){J.current&&J.current.contains(O.target)||(O.preventDefault(),ue.current=[])};g.useEffect(function(){return w&&(document.addEventListener("dragover",xx,!1),document.addEventListener("drop",me,!1)),function(){w&&(document.removeEventListener("dragover",xx),document.removeEventListener("drop",me))}},[J,w]),g.useEffect(function(){return!r&&x&&J.current&&J.current.focus(),function(){}},[J,x,r]);var te=g.useCallback(function(A){k?k(A):console.error(A)},[k]),Fe=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[].concat(w$(ue.current),[A.target]),Ml(A)&&Promise.resolve(i(A)).then(function(O){if(!(Ku(A)&&!_)){var B=O.length,q=B>0&&a$({files:O,accept:R,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:j}),oe=B>0&&!q;L({isDragAccept:q,isDragReject:oe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(A)}}).catch(function(O){return te(O)})},[i,u,te,_,R,o,s,a,l,j]),Ye=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var O=Ml(A);if(O&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return O&&c&&c(A),!1},[c,_]),Xe=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var O=ue.current.filter(function(q){return J.current&&J.current.contains(q)}),B=O.indexOf(A.target);B!==-1&&O.splice(B,1),ue.current=O,!(O.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ml(A)&&d&&d(A))},[J,d,_]),Ot=g.useCallback(function(A,O){var B=[],q=[];A.forEach(function(oe){var $e=jE(oe,R),Ze=Yd($e,2),Cn=Ze[0],qt=Ze[1],fs=AE(oe,o,s),Yn=Yd(fs,2),xr=Yn[0],ps=Yn[1],Co=j?j(oe):null;if(Cn&&xr&&!Co)B.push(oe);else{var fi=[qt,ps];Co&&(fi=fi.concat(Co)),q.push({file:oe,errors:fi.filter(function(_n){return _n})})}}),(!a&&B.length>1||a&&l>=1&&B.length>l)&&(B.forEach(function(oe){q.push({file:oe,errors:[o$]})}),B.splice(0)),L({acceptedFiles:B,fileRejections:q,isDragReject:q.length>0,type:"setFiles"}),f&&f(B,q,O),q.length>0&&h&&h(q,O),B.length>0&&p&&p(B,O)},[L,a,R,o,s,l,f,p,h,j]),Tn=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[],Ml(A)&&Promise.resolve(i(A)).then(function(O){Ku(A)&&!_||Ot(O,A)}).catch(function(O){return te(O)}),L({type:"reset"})},[i,Ot,te,_]),cn=g.useCallback(function(){if(H.current){L({type:"openDialog"}),G();var A={multiple:a,types:M};window.showOpenFilePicker(A).then(function(O){return i(O)}).then(function(O){Ot(O,null),L({type:"closeDialog"})}).catch(function(O){h$(O)?(ne(O),L({type:"closeDialog"})):m$(O)?(H.current=!1,ee.current?(ee.current.value=null,ee.current.click()):te(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."))):te(O)});return}ee.current&&(L({type:"openDialog"}),G(),ee.current.value=null,ee.current.click())},[L,G,ne,m,Ot,te,M,a]),ci=g.useCallback(function(A){!J.current||!J.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),cn())},[J,cn]),gr=g.useCallback(function(){L({type:"focus"})},[]),ds=g.useCallback(function(){L({type:"blur"})},[]),di=g.useCallback(function(){E||(c$()?setTimeout(cn,0):cn())},[E,cn]),bt=function(O){return r?null:O},vr=function(O){return T?null:bt(O)},He=function(O){return C?null:bt(O)},yr=function(O){_&&O.stopPropagation()},To=g.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=A.refKey,B=O===void 0?"ref":O,q=A.role,oe=A.onKeyDown,$e=A.onFocus,Ze=A.onBlur,Cn=A.onClick,qt=A.onDragEnter,fs=A.onDragOver,Yn=A.onDragLeave,xr=A.onDrop,ps=Gu(A,y$);return Ce(Ce(Jp({onKeyDown:vr(An(oe,ci)),onFocus:vr(An($e,gr)),onBlur:vr(An(Ze,ds)),onClick:bt(An(Cn,di)),onDragEnter:He(An(qt,Fe)),onDragOver:He(An(fs,Ye)),onDragLeave:He(An(Yn,Xe)),onDrop:He(An(xr,Tn)),role:typeof q=="string"&&q!==""?q:"presentation"},B,J),!r&&!T?{tabIndex:0}:{}),ps)}},[J,ci,gr,ds,di,Fe,Ye,Xe,Tn,T,C,r]),P=g.useCallback(function(A){A.stopPropagation()},[]),I=g.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=A.refKey,B=O===void 0?"ref":O,q=A.onChange,oe=A.onClick,$e=Gu(A,x$),Ze=Jp({accept:R,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:bt(An(q,Tn)),onClick:bt(An(oe,P)),tabIndex:-1},B,ee);return Ce(Ce({},Ze),$e)}},[ee,n,a,Tn,r]);return Ce(Ce({},D),{},{isFocused:U&&!r,getRootProps:To,getInputProps:I,rootRef:J,inputRef:ee,open:bt(cn)})}function j$(e,t){switch(t.type){case"focus":return Ce(Ce({},e),{},{isFocused:!0});case"blur":return Ce(Ce({},e),{},{isFocused:!1});case"openDialog":return Ce(Ce({},eh),{},{isFileDialogActive:!0});case"closeDialog":return Ce(Ce({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ce(Ce({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ce(Ce({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ce({},eh);default:return e}}function bx(){}function NE({onDrop:e}){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(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...t(),children:[y.jsx("input",{...n()}),y.jsx("div",{className:"mb-3",children:y.jsx(bE,{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"})]})]})})})}NE.Button=({onDrop:e})=>y.jsx(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>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",...t(),children:[y.jsx("input",{...n()}),y.jsx(bE,{className:"size-6 text-slate-500 fill-slate-200"})]})});function A$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=g.useRef(null),s=rs(),o=SD(t),[a,l]=g.useState(""),[u,d]=g.useState("3rem"),[c,f]=g.useState(!1),[p,h]=g.useState([]),[v,b]=g.useState(0),[m,x]=g.useState(!1),[w,E]=g.useState(0),[T,C]=g.useState(null);g.useEffect(()=>{if(r.length>0){const j=r[r.length-1];j.id!==T&&(C(j.id),j.sender_type===et.User&&(b(0),x(!1)))}},[r,T]),g.useEffect(()=>{let j;return m&&w>0&&(j=window.setTimeout(()=>{E(R=>R<=1?(x(!1),b(0),0):R-1)},1e3)),()=>clearTimeout(j)},[m,w]),Um("paste",j=>{if(!n)return;const R=j.clipboardData.items;for(const M of R)if(M.type.startsWith("image/")){const G=M.getAsFile();G&&h([...p,G])}});const _=async()=>{if(!a.trim())return;if(v>5&&!m){x(!0),E(3);return}if(m)return;f(!0);let j;if(n&&p.length>0){const[R,M]=await o.mutateAsync(p);dc(M)&&kD(R)&&(j=R.file_urls)}s==null||s.emit(Kn.MessageCreate,{content:a,files:j},R=>{l(""),e(R),f(!1),h([]),b(M=>M+1),i.current&&(i.current.style.height="3rem",d("3rem"))})},k=j=>{s==null||s.emit(Kn.MessageTyping,{content:j})};return y.jsxs(y.Fragment,{children:[m&&y.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] bg-red-100 border border-red-200 p-2 flex items-center justify-center",children:[y.jsx(ve.XCircle,{className:"size-4 mr-2 text-red-600"}),y.jsxs("span",{className:"text-sm font-medium text-red-800",children:["Çok fazla mesaj gönderdiniz. Lütfen ",w," saniye bekleyin."]})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl relative",onSubmit:j=>{j.preventDefault(),_(),j.currentTarget.reset()},children:[n&&p&&p.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(xE,{files:p,onDelete:j=>{h(p.filter((R,M)=>M!==j))}})}),y.jsx("div",{className:"grow relative",children:y.jsx(cg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:u,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:j=>{if(l(j.target.value),k(j.target.value),j.target.value.length>0&&j.currentTarget.scrollHeight>j.currentTarget.clientHeight){const R=`${j.currentTarget.scrollHeight}px`;j.currentTarget.style.height=R,d(R)}else j.currentTarget.style.height="3rem",d("3rem")},onKeyDown:j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),j.stopPropagation(),j.currentTarget.value="",_())}})}),y.jsxs(Te.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(NE.Button,{onDrop:j=>{j.length&&h([...p,...j])}}),y.jsx(rn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:c||!a.trim()||m,children:c?y.jsx(ve.Spin,{className:"size-6 animate-spin"}):m?y.jsx("span",{className:"text-xs font-bold",children:w}):y.jsx(ve.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function R$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var d,c;const{widget:o,setOpen:a}=un(),l=hr(),u=ko();return y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(Y.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(VL,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):y.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(wI,{onChatClose:s}),u&&y.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:y.jsx(ve.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx(kI,{messages:r,isTyping:t||n.length>0}),y.jsx(A$,{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 text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",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 O$({rating:e,onChange:t}){return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children: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("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children: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"})})}),r&&y.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children: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(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function D$({onOk:e}){const[t,n]=g.useState(0),[r,i]=g.useState(!1),[s,o]=g.useState(10),a=bD(),[l,u]=g.useState(!1);g.useEffect(()=>{if(r){const p=setInterval(()=>{o(h=>h<=1?(clearInterval(p),e(!0),0):h-1)},1e3);return()=>clearInterval(p)}},[r]);const d=Qm({comment:Hu()}),c=nE({init:{comment:""},schema:d,action:async p=>{const[h,v]=await a.mutateAsync({rating:t,comment:p.comment});if(dc(v)){i(!0);return}iE(h,{form:c})}}),f=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"}),y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(ve.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?y.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"text-green-500 mb-4",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 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),y.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),y.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),y.jsx(rn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):y.jsxs(Te.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-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),y.jsx(O$,{rating:t,onChange:p=>{n(p),p>=1&&u(!1)}}),t>0&&y.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]}),t>0&&t<1||l?y.jsx("p",{className:"text-center text-sm text-red-500 mt-1",children:"Lütfen en az 1 yıldız seçiniz."}):null]}),y.jsxs("form",{onSubmit:c.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),y.jsx(cg,{id:"comment",onChange:c.handleChange,onBlur:c.handleBlur,value:c.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm",error:c.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(rn,{type:"submit",onClick:p=>{t<1&&(p.preventDefault(),p.stopPropagation(),u(!0))},className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),y.jsx(rn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[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 F$({children:e}){const{widget:t}=un();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function N$({children:e}){const t=rs();return g.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function M$(){const{widget:e,setOpen:t,setIsHaveChat:n}=un(),r=rs(),i=Vm(),s=ko(),[o,a]=g.useState(null),[l,u]=g.useState([]),[d,c]=g.useState(!1),[f,p]=g.useState([]),h=()=>{if(o){a({...o,status:gs.Closed});return}v()},v=m=>{m||(t(!1),vy()),n(!1),a(null),u([]),p([]),Np(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};g.useEffect(()=>{r==null||r.emit(Kn.ChatView,{},m=>{if(m===null){t(!1),n(!1),Np(e.client_id),u([]),p([]),vy(),i.push("registration");return}a(m),n(!0)})},[]);const b=g.useCallback(m=>{o&&![gs.Closed,gs.Deleted].includes(o.status)&&u([...l,m])},[l,o]);return g.useEffect(()=>{if(!r)return;const m=C=>{const _={content:C.content,created_at:C.created_at,files:C.files,id:C._id,sender_type:C.sender_type,answers:C.answers,reply_id:C.reply_id};if(f.length>0){p(k=>[...k,_]);return}C.is_shortcut?p([_]):b(_),c(!1)},x=C=>{a({...o,agent_name:C.name,agent_avatar:C.avatar,is_customer_uploadable:(o==null?void 0:o.is_customer_uploadable)??!1,status:(o==null?void 0:o.status)??gs.Open}),b({content:` _ _${C.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:bi.AdminJoin,sender_name:C.name})},w=()=>{c(!0)},E=()=>{h()},T=({is_customer_uploadable:C})=>{a(o?{...o,is_customer_uploadable:C}:null)};return r.on(rt.MessageAgentCreate,m),r.on(rt.ChatUserAssignee,x),r.on(rt.MessageAgentTyping,w),r.on(rt.ChatUserClose,E),r.on(rt.ChatToggleUpload,T),()=>{r.off(rt.MessageAgentCreate,m),r.off(rt.ChatUserAssignee,x),r.off(rt.MessageAgentTyping,w),r.off(rt.ChatUserClose,E),r.off(rt.ChatToggleUpload,T)}},[b]),g.useEffect(()=>{!r||!o||r.emit(Kn.MessageList,{},m=>{u(m)})},[r,o]),g.useEffect(()=>{const m=setTimeout(()=>{c(!1)},2e3);return()=>clearTimeout(m)},[d]),g.useEffect(()=>{if(!e||f.length===0)return;let m=0;e.writing_timeout&&(m=[...f[0].content].length/e.writing_timeout,m<0&&(m=0));const x=setTimeout(()=>{b(f[0]),p(f.slice(1))},m*1e3);return()=>clearTimeout(x)},[f,e]),o?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Yr,{children:y.jsx(Te.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},style:{height:s?"100%":"",minHeight:s?"var(--app-height, 100dvh)":"",maxHeight:s?"var(--app-height, 100dvh)":""},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:o.status===gs.Closed?y.jsx(D$,{onOk:v}):y.jsx(R$,{chat:o,isTyping:d,messages:l,shortcutMessages:f,onNewMessage:b,onChatClose:h})})})]}):null}function L$(){return ML(),null}function I$(){return y.jsxs(N$,{children:[y.jsx(fk,{defaultOpen:!0,children:y.jsx(F$,{children:y.jsx(M$,{})})}),y.jsx(L$,{})]})}const $$=[{path:"/chat",component:I$,name:"chat"}],ME=[...$$],LE=[...BL],z$=[...ME,...LE];function B$(){return y.jsx(J_,{future:{v7_startTransition:!0},children:y.jsxs(tP,{children:[ME.map((e,t)=>y.jsx(op,{path:e.path,element:y.jsx(e.component,{})},t)),LE.map((e,t)=>y.jsx(op,{path:e.path,element:y.jsx(e.component,{})},t))]})})}function V$({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=un(),{data:a,isLoading:l}=a_(e);return g.useEffect(()=>{Array.isArray(a)&&u_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:y.jsx(EL,{children:y.jsx(gD,{children:y.jsx(B$,{})})})}const U$=new U2;function H$({container:e,link_id:t,defaultValues:n,soundPath:r}){Ww(e).render(y.jsxs(G2,{client:U$,children:[y.jsx(V$,{link_id:t,defaultValues:n,soundPath:r}),y.jsx(mL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]}))}window.widget=H$});export default W$();
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DE(e,t){if(e){if(typeof e=="string")return Zp(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 Zp(e,t)}}function Zp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function C$(e){if(Array.isArray(e))return 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 Ce(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){Jp(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 Jp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gu(e,t){if(e==null)return{};var n=_$(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 _$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var rl=g.forwardRef(function(e,t){var n=e.children,r=Gu(e,g$),i=P$(r),s=i.open,o=Gu(i,v$);return g.useImperativeHandle(t,function(){return{open:s}},[s]),F.createElement(g.Fragment,null,n(Ce(Ce({},o),{},{open:s})))});rl.displayName="Dropzone";var FE={disabled:!1,getFilesFromEvent:$I,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};rl.defaultProps=FE;rl.propTypes={children:ge.func,accept:ge.objectOf(ge.arrayOf(ge.string)),multiple:ge.bool,preventDropOnDocument:ge.bool,noClick:ge.bool,noKeyboard:ge.bool,noDrag:ge.bool,noDragEventsBubbling:ge.bool,minSize:ge.number,maxSize:ge.number,maxFiles:ge.number,disabled:ge.bool,getFilesFromEvent:ge.func,onFileDialogCancel:ge.func,onFileDialogOpen:ge.func,useFsAccessApi:ge.bool,autoFocus:ge.bool,onDragEnter:ge.func,onDragLeave:ge.func,onDragOver:ge.func,onDrop:ge.func,onDropAccepted:ge.func,onDropRejected:ge.func,onError:ge.func,validator:ge.func};var eh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function P$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ce(Ce({},FE),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,c=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,v=t.onFileDialogCancel,b=t.onFileDialogOpen,m=t.useFsAccessApi,x=t.autoFocus,w=t.preventDropOnDocument,E=t.noClick,T=t.noKeyboard,C=t.noDrag,_=t.noDragEventsBubbling,k=t.onError,j=t.validator,R=g.useMemo(function(){return p$(n)},[n]),M=g.useMemo(function(){return f$(n)},[n]),G=g.useMemo(function(){return typeof b=="function"?b:bx},[b]),ne=g.useMemo(function(){return typeof v=="function"?v:bx},[v]),J=g.useRef(null),ee=g.useRef(null),Q=g.useReducer(j$,eh),X=Yd(Q,2),D=X[0],L=X[1],U=D.isFocused,V=D.isFileDialogActive,H=g.useRef(typeof window<"u"&&window.isSecureContext&&m&&d$()),Z=function(){!H.current&&V&&setTimeout(function(){if(ee.current){var O=ee.current.files;O.length||(L({type:"closeDialog"}),ne())}},300)};g.useEffect(function(){return window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)}},[ee,V,ne,H]);var ue=g.useRef([]),me=function(O){J.current&&J.current.contains(O.target)||(O.preventDefault(),ue.current=[])};g.useEffect(function(){return w&&(document.addEventListener("dragover",xx,!1),document.addEventListener("drop",me,!1)),function(){w&&(document.removeEventListener("dragover",xx),document.removeEventListener("drop",me))}},[J,w]),g.useEffect(function(){return!r&&x&&J.current&&J.current.focus(),function(){}},[J,x,r]);var te=g.useCallback(function(A){k?k(A):console.error(A)},[k]),Fe=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[].concat(w$(ue.current),[A.target]),Ml(A)&&Promise.resolve(i(A)).then(function(O){if(!(Ku(A)&&!_)){var B=O.length,q=B>0&&a$({files:O,accept:R,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:j}),oe=B>0&&!q;L({isDragAccept:q,isDragReject:oe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(A)}}).catch(function(O){return te(O)})},[i,u,te,_,R,o,s,a,l,j]),Ye=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var O=Ml(A);if(O&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return O&&c&&c(A),!1},[c,_]),Xe=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var O=ue.current.filter(function(q){return J.current&&J.current.contains(q)}),B=O.indexOf(A.target);B!==-1&&O.splice(B,1),ue.current=O,!(O.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ml(A)&&d&&d(A))},[J,d,_]),Ot=g.useCallback(function(A,O){var B=[],q=[];A.forEach(function(oe){var $e=jE(oe,R),Ze=Yd($e,2),_n=Ze[0],qt=Ze[1],fs=AE(oe,o,s),Yn=Yd(fs,2),xr=Yn[0],ps=Yn[1],Co=j?j(oe):null;if(_n&&xr&&!Co)B.push(oe);else{var fi=[qt,ps];Co&&(fi=fi.concat(Co)),q.push({file:oe,errors:fi.filter(function(Pn){return Pn})})}}),(!a&&B.length>1||a&&l>=1&&B.length>l)&&(B.forEach(function(oe){q.push({file:oe,errors:[o$]})}),B.splice(0)),L({acceptedFiles:B,fileRejections:q,isDragReject:q.length>0,type:"setFiles"}),f&&f(B,q,O),q.length>0&&h&&h(q,O),B.length>0&&p&&p(B,O)},[L,a,R,o,s,l,f,p,h,j]),Cn=g.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ue.current=[],Ml(A)&&Promise.resolve(i(A)).then(function(O){Ku(A)&&!_||Ot(O,A)}).catch(function(O){return te(O)}),L({type:"reset"})},[i,Ot,te,_]),dn=g.useCallback(function(){if(H.current){L({type:"openDialog"}),G();var A={multiple:a,types:M};window.showOpenFilePicker(A).then(function(O){return i(O)}).then(function(O){Ot(O,null),L({type:"closeDialog"})}).catch(function(O){h$(O)?(ne(O),L({type:"closeDialog"})):m$(O)?(H.current=!1,ee.current?(ee.current.value=null,ee.current.click()):te(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."))):te(O)});return}ee.current&&(L({type:"openDialog"}),G(),ee.current.value=null,ee.current.click())},[L,G,ne,m,Ot,te,M,a]),ci=g.useCallback(function(A){!J.current||!J.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),dn())},[J,dn]),gr=g.useCallback(function(){L({type:"focus"})},[]),ds=g.useCallback(function(){L({type:"blur"})},[]),di=g.useCallback(function(){E||(c$()?setTimeout(dn,0):dn())},[E,dn]),bt=function(O){return r?null:O},vr=function(O){return T?null:bt(O)},He=function(O){return C?null:bt(O)},yr=function(O){_&&O.stopPropagation()},To=g.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=A.refKey,B=O===void 0?"ref":O,q=A.role,oe=A.onKeyDown,$e=A.onFocus,Ze=A.onBlur,_n=A.onClick,qt=A.onDragEnter,fs=A.onDragOver,Yn=A.onDragLeave,xr=A.onDrop,ps=Gu(A,y$);return Ce(Ce(Jp({onKeyDown:vr(Rn(oe,ci)),onFocus:vr(Rn($e,gr)),onBlur:vr(Rn(Ze,ds)),onClick:bt(Rn(_n,di)),onDragEnter:He(Rn(qt,Fe)),onDragOver:He(Rn(fs,Ye)),onDragLeave:He(Rn(Yn,Xe)),onDrop:He(Rn(xr,Cn)),role:typeof q=="string"&&q!==""?q:"presentation"},B,J),!r&&!T?{tabIndex:0}:{}),ps)}},[J,ci,gr,ds,di,Fe,Ye,Xe,Cn,T,C,r]),P=g.useCallback(function(A){A.stopPropagation()},[]),I=g.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=A.refKey,B=O===void 0?"ref":O,q=A.onChange,oe=A.onClick,$e=Gu(A,x$),Ze=Jp({accept:R,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:bt(Rn(q,Cn)),onClick:bt(Rn(oe,P)),tabIndex:-1},B,ee);return Ce(Ce({},Ze),$e)}},[ee,n,a,Cn,r]);return Ce(Ce({},D),{},{isFocused:U&&!r,getRootProps:To,getInputProps:I,rootRef:J,inputRef:ee,open:bt(dn)})}function j$(e,t){switch(t.type){case"focus":return Ce(Ce({},e),{},{isFocused:!0});case"blur":return Ce(Ce({},e),{},{isFocused:!1});case"openDialog":return Ce(Ce({},eh),{},{isFileDialogActive:!0});case"closeDialog":return Ce(Ce({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ce(Ce({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ce(Ce({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ce({},eh);default:return e}}function bx(){}function NE({onDrop:e}){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(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...t(),children:[y.jsx("input",{...n()}),y.jsx("div",{className:"mb-3",children:y.jsx(bE,{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"})]})]})})})}NE.Button=({onDrop:e})=>y.jsx(rl,{onDrop:e,children:({getRootProps:t,getInputProps:n})=>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",...t(),children:[y.jsx("input",{...n()}),y.jsx(bE,{className:"size-6 text-slate-500 fill-slate-200"})]})});function A$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=g.useRef(null),s=rs(),o=SD(t),[a,l]=g.useState(""),[u,d]=g.useState("3rem"),[c,f]=g.useState(!1),[p,h]=g.useState([]),[v,b]=g.useState(0),[m,x]=g.useState(!1),[w,E]=g.useState(0),[T,C]=g.useState(null);g.useEffect(()=>{if(r.length>0){const j=r[r.length-1];j.id!==T&&(C(j.id),j.sender_type===et.User&&(b(0),x(!1)))}},[r,T]),g.useEffect(()=>{let j;return m&&w>0&&(j=window.setTimeout(()=>{E(R=>R<=1?(x(!1),b(0),0):R-1)},1e3)),()=>clearTimeout(j)},[m,w]),Um("paste",j=>{if(!n)return;const R=j.clipboardData.items;for(const M of R)if(M.type.startsWith("image/")){const G=M.getAsFile();G&&h([...p,G])}});const _=async()=>{if(!a.trim())return;if(v>5&&!m){x(!0),E(3);return}if(m)return;f(!0);let j;if(n&&p.length>0){const[R,M]=await o.mutateAsync(p);dc(M)&&kD(R)&&(j=R.file_urls)}s==null||s.emit(Kn.MessageCreate,{content:a,files:j},R=>{l(""),e(R),f(!1),h([]),b(M=>M+1),i.current&&(i.current.style.height="3rem",d("3rem"))})},k=j=>{s==null||s.emit(Kn.MessageTyping,{content:j})};return y.jsxs(y.Fragment,{children:[m&&y.jsxs(Te.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] bg-red-100 border border-red-200 p-2 flex items-center justify-center",children:[y.jsx(ve.XCircle,{className:"size-4 mr-2 text-red-600"}),y.jsxs("span",{className:"text-sm font-medium text-red-800",children:["Çok fazla mesaj gönderdiniz. Lütfen ",w," saniye bekleyin."]})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl relative",onSubmit:j=>{j.preventDefault(),_(),j.currentTarget.reset()},children:[n&&p&&p.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(xE,{files:p,onDelete:j=>{h(p.filter((R,M)=>M!==j))}})}),y.jsx("div",{className:"grow relative",children:y.jsx(cg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:u,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:j=>{if(l(j.target.value),k(j.target.value),j.target.value.length>0&&j.currentTarget.scrollHeight>j.currentTarget.clientHeight){const R=`${j.currentTarget.scrollHeight}px`;j.currentTarget.style.height=R,d(R)}else j.currentTarget.style.height="3rem",d("3rem")},onKeyDown:j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),j.stopPropagation(),j.currentTarget.value="",_())}})}),y.jsxs(Te.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(NE.Button,{onDrop:j=>{j.length&&h([...p,...j])}}),y.jsx(rn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:c||!a.trim()||m,children:c?y.jsx(ve.Spin,{className:"size-6 animate-spin"}):m?y.jsx("span",{className:"text-xs font-bold",children:w}):y.jsx(ve.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function R$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var d,c;const{widget:o,setOpen:a}=cn(),l=hr(),u=ko();return y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(Y.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(VL,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):y.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(d=o==null?void 0:o.appearance)==null?void 0:d.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(wI,{onChatClose:s}),u&&y.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:y.jsx(ve.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx(kI,{messages:r,isTyping:t||n.length>0}),y.jsx(A$,{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 text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",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 O$({rating:e,onChange:t}){return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children: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("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children: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"})})}),r&&y.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children: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(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function D$({onOk:e}){const[t,n]=g.useState(0),[r,i]=g.useState(!1),[s,o]=g.useState(10),a=bD(),[l,u]=g.useState(!1);g.useEffect(()=>{if(r){const p=setInterval(()=>{o(h=>h<=1?(clearInterval(p),e(!0),0):h-1)},1e3);return()=>clearInterval(p)}},[r]);const d=Qm({comment:Hu()}),c=nE({init:{comment:""},schema:d,action:async p=>{const[h,v]=await a.mutateAsync({rating:t,comment:p.comment});if(dc(v)){i(!0);return}iE(h,{form:c})}}),f=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"}),y.jsx(rn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(ve.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?y.jsxs(Te.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"text-green-500 mb-4",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 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),y.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),y.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),y.jsx(rn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):y.jsxs(Te.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-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),y.jsx(O$,{rating:t,onChange:p=>{n(p),p>=1&&u(!1)}}),t>0&&y.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]}),t>0&&t<1||l?y.jsx("p",{className:"text-center text-sm text-red-500 mt-1",children:"Lütfen en az 1 yıldız seçiniz."}):null]}),y.jsxs("form",{onSubmit:c.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),y.jsx(cg,{id:"comment",onChange:c.handleChange,onBlur:c.handleBlur,value:c.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm",error:c.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(rn,{type:"submit",onClick:p=>{t<1&&(p.preventDefault(),p.stopPropagation(),u(!0))},className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),y.jsx(rn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[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 F$({children:e}){const{widget:t}=cn();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function N$({children:e}){const t=rs();return g.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function M$(){const{widget:e,setOpen:t,setIsHaveChat:n}=cn(),r=rs(),i=Vm(),s=ko(),[o,a]=g.useState(null),[l,u]=g.useState([]),[d,c]=g.useState(!1),[f,p]=g.useState([]),h=()=>{if(o){a({...o,status:gs.Closed});return}v()},v=m=>{m||(t(!1),_v()),n(!1),a(null),u([]),p([]),Np(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};g.useEffect(()=>{r==null||r.emit(Kn.ChatView,{},m=>{if(m===null){t(!1),n(!1),Np(e.client_id),u([]),p([]),_v(),i.push("registration");return}a(m),n(!0)})},[]);const b=g.useCallback(m=>{o&&![gs.Closed,gs.Deleted].includes(o.status)&&u([...l,m])},[l,o]);return g.useEffect(()=>{if(!r)return;const m=C=>{const _={content:C.content,created_at:C.created_at,files:C.files,id:C._id,sender_type:C.sender_type,answers:C.answers,reply_id:C.reply_id};if(f.length>0){p(k=>[...k,_]);return}C.is_shortcut?p([_]):b(_),c(!1)},x=C=>{a({...o,agent_name:C.name,agent_avatar:C.avatar,is_customer_uploadable:(o==null?void 0:o.is_customer_uploadable)??!1,status:(o==null?void 0:o.status)??gs.Open}),b({content:` _ _${C.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:bi.AdminJoin,sender_name:C.name})},w=()=>{c(!0)},E=()=>{h()},T=({is_customer_uploadable:C})=>{a(o?{...o,is_customer_uploadable:C}:null)};return r.on(rt.MessageAgentCreate,m),r.on(rt.ChatUserAssignee,x),r.on(rt.MessageAgentTyping,w),r.on(rt.ChatUserClose,E),r.on(rt.ChatToggleUpload,T),()=>{r.off(rt.MessageAgentCreate,m),r.off(rt.ChatUserAssignee,x),r.off(rt.MessageAgentTyping,w),r.off(rt.ChatUserClose,E),r.off(rt.ChatToggleUpload,T)}},[b]),g.useEffect(()=>{!r||!o||r.emit(Kn.MessageList,{},m=>{u(m)})},[r,o]),g.useEffect(()=>{const m=setTimeout(()=>{c(!1)},2e3);return()=>clearTimeout(m)},[d]),g.useEffect(()=>{if(!e||f.length===0)return;let m=0;e.writing_timeout&&(m=[...f[0].content].length/e.writing_timeout,m<0&&(m=0));const x=setTimeout(()=>{b(f[0]),p(f.slice(1))},m*1e3);return()=>clearTimeout(x)},[f,e]),o?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Yr,{children:y.jsx(Te.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},style:{height:s?"100%":"",minHeight:s?"var(--app-height, 100dvh)":"",maxHeight:s?"var(--app-height, 100dvh)":""},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:o.status===gs.Closed?y.jsx(D$,{onOk:v}):y.jsx(R$,{chat:o,isTyping:d,messages:l,shortcutMessages:f,onNewMessage:b,onChatClose:h})})})]}):null}function L$(){return ML(),null}function I$(){return y.jsxs(N$,{children:[y.jsx(fk,{defaultOpen:!0,children:y.jsx(F$,{children:y.jsx(M$,{})})}),y.jsx(L$,{})]})}const $$=[{path:"/chat",component:I$,name:"chat"}],ME=[...$$],LE=[...BL],z$=[...ME,...LE];function B$(){return y.jsx(J_,{future:{v7_startTransition:!0},children:y.jsxs(tP,{children:[ME.map((e,t)=>y.jsx(op,{path:e.path,element:y.jsx(e.component,{})},t)),LE.map((e,t)=>y.jsx(op,{path:e.path,element:y.jsx(e.component,{})},t))]})})}function V$({link_id:e,defaultValues:t,soundPath:n}){const{setWidget:r,widget:i,setDefaultValues:s,setSoundPath:o}=cn(),{data:a,isLoading:l}=a_(e);return g.useEffect(()=>{Array.isArray(a)&&u_(a[0])&&(r(a[0]),s(t),o(n))},[a]),l||!i?null:y.jsx(EL,{children:y.jsx(gD,{children:y.jsx(B$,{})})})}const U$=new U2;function H$({container:e,link_id:t,defaultValues:n,soundPath:r}){Ww(e).render(y.jsxs(G2,{client:U$,children:[y.jsx(V$,{link_id:t,defaultValues:n,soundPath:r}),y.jsx(mL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]}))}window.widget=H$});export default W$();