@alfatech/livechat 2025.10.2-1.2 → 2025.10.2-2.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.
- package/dist/main.js +25 -25
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Cg=e=>{throw TypeError(e)};var GC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Zc=(e,t,n)=>t.has(e)||Cg("Cannot "+n);var S=(e,t,n)=>(Zc(e,t,"read from private field"),n?n.call(e):t.get(e)),
|
|
1
|
+
var Cg=e=>{throw TypeError(e)};var GC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Zc=(e,t,n)=>t.has(e)||Cg("Cannot "+n);var S=(e,t,n)=>(Zc(e,t,"read from private field"),n?n.call(e):t.get(e)),K=(e,t,n)=>t.has(e)?Cg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),U=(e,t,n,r)=>(Zc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(Zc(e,t,"access private method"),n);var cl=(e,t,n,r)=>({set _(i){U(e,t,i,n)},get _(){return S(e,t,r)}});var sB=GC((zt,Vt)=>{function QC(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $x={exports:{}},tc={},Bx={exports:{}},oe={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -22,7 +22,7 @@ var Cg=e=>{throw TypeError(e)};var GC=(e,t)=>()=>(t||e((t={exports:{}}).exports,
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(
|
|
25
|
+
*/(function(e){function t(O,$){var H=O.length;O.push($);e:for(;0<H;){var q=H-1>>>1,Q=O[q];if(0<i(Q,$))O[q]=$,O[H]=Q,H=q;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var $=O[0],H=O.pop();if(H!==$){O[0]=H;e:for(var q=0,Q=O.length,ee=Q>>>1;q<ee;){var ce=2*(q+1)-1,ve=O[ce],ne=ce+1,Ne=O[ne];if(0>i(ve,H))ne<Q&&0>i(Ne,ve)?(O[q]=Ne,O[ne]=H,q=ne):(O[q]=ve,O[ce]=H,q=ce);else if(ne<Q&&0>i(Ne,H))O[q]=Ne,O[ne]=H,q=ne;else break e}}return $}function i(O,$){var H=O.sortIndex-$.sortIndex;return H!==0?H:O.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,u=null,f=3,p=!1,h=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(O){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=O)r(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function k(O){if(m=!1,b(O),!h)if(n(l)!==null)h=!0,J(T);else{var $=n(c);$!==null&&te(k,$.startTime-O)}}function T(O,$){h=!1,m&&(m=!1,g(j),j=-1),p=!0;var H=f;try{for(b($),u=n(l);u!==null&&(!(u.expirationTime>$)||O&&!I());){var q=u.callback;if(typeof q=="function"){u.callback=null,f=u.priorityLevel;var Q=q(u.expirationTime<=$);$=e.unstable_now(),typeof Q=="function"?u.callback=Q:u===n(l)&&r(l),b($)}else r(l);u=n(l)}if(u!==null)var ee=!0;else{var ce=n(c);ce!==null&&te(k,ce.startTime-$),ee=!1}return ee}finally{u=null,f=H,p=!1}}var E=!1,_=null,j=-1,M=5,P=-1;function I(){return!(e.unstable_now()-P<M)}function F(){if(_!==null){var O=e.unstable_now();P=O;var $=!0;try{$=_(!0,O)}finally{$?B():(E=!1,_=null)}}else E=!1}var B;if(typeof w=="function")B=function(){w(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,re=V.port2;V.port1.onmessage=F,B=function(){re.postMessage(null)}}else B=function(){x(F,0)};function J(O){_=O,E||(E=!0,B())}function te(O,$){j=x(function(){O(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,J(T))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(f){case 1:case 2:case 3:var $=3;break;default:$=f}var H=f;f=$;try{return O()}finally{f=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,$){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var H=f;f=O;try{return $()}finally{f=H}},e.unstable_scheduleCallback=function(O,$,H){var q=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?q+H:q):H=q,O){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=H+Q,O={id:d++,callback:$,priorityLevel:O,startTime:H,expirationTime:Q,sortIndex:-1},H>q?(O.sortIndex=H,t(c,O),n(l)===null&&O===n(c)&&(m?(g(j),j=-1):m=!0,te(k,H-q))):(O.sortIndex=Q,t(l,O),h||p||(h=!0,J(T))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var $=f;return function(){var H=f;f=$;try{return O.apply(this,arguments)}finally{f=H}}}})(Zx);Xx.exports=Zx;var gT=Xx.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -34,10 +34,10 @@ var Cg=e=>{throw TypeError(e)};var GC=(e,t)=>()=>(t||e((t={exports:{}}).exports,
|
|
|
34
34
|
`+ed+e}var td=!1;function nd(e,t){if(!e||td)return"";td=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.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{td=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bo(e):""}function ST(e){switch(e.tag){case 5:return Bo(e.type);case 16:return Bo("Lazy");case 13:return Bo("Suspense");case 19:return Bo("SuspenseList");case 0:case 2:case 15:return e=nd(e.type,!1),e;case 11:return e=nd(e.type.render,!1),e;case 1:return e=nd(e.type,!0),e;default:return""}}function cf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xs:return"Fragment";case ys:return"Portal";case af:return"Profiler";case gh:return"StrictMode";case lf:return"Suspense";case uf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case t1:return(e.displayName||"Context")+".Consumer";case e1:return(e._context.displayName||"Context")+".Provider";case vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yh:return t=e.displayName||null,t!==null?t:cf(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return cf(e(t))}catch{}}return null}function kT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cf(t);case 8:return t===gh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ei(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function r1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CT(e){var t=r1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pl(e){e._valueTracker||(e._valueTracker=CT(e))}function i1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=r1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function df(e,t){var n=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ag(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 s1(e,t){t=t.checked,t!=null&&mh(e,"checked",t,!1)}function ff(e,t){s1(e,t);var n=ei(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pf(e,t.type,n):t.hasOwnProperty("defaultValue")&&pf(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Og(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pf(e,t,n){(t!=="number"||fu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zo=Array.isArray;function Ns(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ei(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Dg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(zo(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function o1(e,t){var n=ei(t.value),r=ei(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Mg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function a1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function mf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?a1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hl,l1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hl=hl||document.createElement("div"),hl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function da(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},TT=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){TT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function u1(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 c1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=u1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var ET=Ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gf(e,t){if(t){if(ET[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function vf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yf=null;function xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xf=null,Ls=null,Is=null;function Fg(e){if(e=Ya(e)){if(typeof xf!="function")throw Error(L(280));var t=e.stateNode;t&&(t=oc(t),xf(e.stateNode,e.type,t))}}function d1(e){Ls?Is?Is.push(e):Is=[e]:Ls=e}function f1(){if(Ls){var e=Ls,t=Is;if(Is=Ls=null,Fg(e),t)for(e=0;e<t.length;e++)Fg(t[e])}}function p1(e,t){return e(t)}function h1(){}var rd=!1;function m1(e,t,n){if(rd)return e(t,n);rd=!0;try{return p1(e,t,n)}finally{rd=!1,(Ls!==null||Is!==null)&&(h1(),f1())}}function fa(e,t){var n=e.stateNode;if(n===null)return null;var r=oc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var wf=!1;if(ur)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){wf=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{wf=!1}function _T(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Yo=!1,pu=null,hu=!1,bf=null,PT={onError:function(e){Yo=!0,pu=e}};function jT(e,t,n,r,i,s,o,a,l){Yo=!1,pu=null,_T.apply(PT,arguments)}function RT(e,t,n,r,i,s,o,a,l){if(jT.apply(this,arguments),Yo){if(Yo){var c=pu;Yo=!1,pu=null}else throw Error(L(198));hu||(hu=!0,bf=c)}}function Ji(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function g1(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 Ng(e){if(Ji(e)!==e)throw Error(L(188))}function AT(e){var t=e.alternate;if(!t){if(t=Ji(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ng(i),e;if(s===r)return Ng(i),t;s=s.sibling}throw Error(L(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function v1(e){return e=AT(e),e!==null?y1(e):null}function y1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=y1(e);if(t!==null)return t;e=e.sibling}return null}var x1=Ht.unstable_scheduleCallback,Lg=Ht.unstable_cancelCallback,OT=Ht.unstable_shouldYield,DT=Ht.unstable_requestPaint,$e=Ht.unstable_now,MT=Ht.unstable_getCurrentPriorityLevel,wh=Ht.unstable_ImmediatePriority,w1=Ht.unstable_UserBlockingPriority,mu=Ht.unstable_NormalPriority,FT=Ht.unstable_LowPriority,b1=Ht.unstable_IdlePriority,nc=null,Bn=null;function NT(e){if(Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(nc,e,void 0,(e.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:$T,LT=Math.log,IT=Math.LN2;function $T(e){return e>>>=0,e===0?32:31-(LT(e)/IT|0)|0}var ml=64,gl=4194304;function Vo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Vo(a):(s&=o,s!==0&&(r=Vo(s)))}else o=n&~i,o!==0?r=Vo(o):s!==0&&(r=Vo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-kn(t),i=1<<n,r|=e[n],t&=~i;return r}function BT(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 zT(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]=BT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Sf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function S1(){var e=ml;return ml<<=1,!(ml&4194240)&&(ml=64),e}function id(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ga(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kn(t),e[t]=n}function VT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-kn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function bh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var he=0;function k1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var C1,Sh,T1,E1,_1,kf=!1,vl=[],zr=null,Vr=null,Ur=null,pa=new Map,ha=new Map,Er=[],UT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ig(e,t){switch(e){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":pa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ha.delete(t.pointerId)}}function Ao(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ya(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function HT(e,t,n,r,i){switch(t){case"focusin":return zr=Ao(zr,e,t,n,r,i),!0;case"dragenter":return Vr=Ao(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=Ao(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return pa.set(s,Ao(pa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ha.set(s,Ao(ha.get(s)||null,e,t,n,r,i)),!0}return!1}function P1(e){var t=Ci(e.target);if(t!==null){var n=Ji(t);if(n!==null){if(t=n.tag,t===13){if(t=g1(n),t!==null){e.blockedOn=t,_1(e.priority,function(){T1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ul(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yf=r,n.target.dispatchEvent(r),yf=null}else return t=Ya(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function $g(e,t,n){Ul(e)&&n.delete(t)}function WT(){kf=!1,zr!==null&&Ul(zr)&&(zr=null),Vr!==null&&Ul(Vr)&&(Vr=null),Ur!==null&&Ul(Ur)&&(Ur=null),pa.forEach($g),ha.forEach($g)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,kf||(kf=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,WT)))}function ma(e){function t(i){return Oo(i,e)}if(0<vl.length){Oo(vl[0],e);for(var n=1;n<vl.length;n++){var r=vl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(zr!==null&&Oo(zr,e),Vr!==null&&Oo(Vr,e),Ur!==null&&Oo(Ur,e),pa.forEach(t),ha.forEach(t),n=0;n<Er.length;n++)r=Er[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Er.length&&(n=Er[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&Er.shift()}var $s=hr.ReactCurrentBatchConfig,vu=!0;function qT(e,t,n,r){var i=he,s=$s.transition;$s.transition=null;try{he=1,kh(e,t,n,r)}finally{he=i,$s.transition=s}}function GT(e,t,n,r){var i=he,s=$s.transition;$s.transition=null;try{he=4,kh(e,t,n,r)}finally{he=i,$s.transition=s}}function kh(e,t,n,r){if(vu){var i=Cf(e,t,n,r);if(i===null)hd(e,t,r,yu,n),Ig(e,r);else if(HT(i,e,t,n,r))r.stopPropagation();else if(Ig(e,r),t&4&&-1<UT.indexOf(e)){for(;i!==null;){var s=Ya(i);if(s!==null&&C1(s),s=Cf(e,t,n,r),s===null&&hd(e,t,r,yu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else hd(e,t,r,null,n)}}var yu=null;function Cf(e,t,n,r){if(yu=null,e=xh(r),e=Ci(e),e!==null)if(t=Ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=g1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yu=e,null}function j1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(MT()){case wh:return 1;case w1:return 4;case mu:case FT:return 16;case b1:return 536870912;default:return 16}default:return 16}}var Lr=null,Ch=null,Hl=null;function R1(){if(Hl)return Hl;var e,t=Ch,n=t.length,r,i="value"in Lr?Lr.value:Lr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Hl=i.slice(e,1<r?1-r:void 0)}function Wl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yl(){return!0}function Bg(){return!1}function qt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yl:Bg,this.isPropagationStopped=Bg,this}return Ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yl)},persist:function(){},isPersistent:yl}),t}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=qt(xo),Qa=Ae({},xo,{view:0,detail:0}),QT=qt(Qa),sd,od,Do,rc=Ae({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Do&&(Do&&e.type==="mousemove"?(sd=e.screenX-Do.screenX,od=e.screenY-Do.screenY):od=sd=0,Do=e),sd)},movementY:function(e){return"movementY"in e?e.movementY:od}}),zg=qt(rc),YT=Ae({},rc,{dataTransfer:0}),KT=qt(YT),XT=Ae({},Qa,{relatedTarget:0}),ad=qt(XT),ZT=Ae({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),JT=qt(ZT),eE=Ae({},xo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tE=qt(eE),nE=Ae({},xo,{data:0}),Vg=qt(nE),rE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iE={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"},sE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sE[e])?!!t[e]:!1}function Eh(){return oE}var aE=Ae({},Qa,{key:function(e){if(e.key){var t=rE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eh,charCode:function(e){return e.type==="keypress"?Wl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lE=qt(aE),uE=Ae({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ug=qt(uE),cE=Ae({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),dE=qt(cE),fE=Ae({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),pE=qt(fE),hE=Ae({},rc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),mE=qt(hE),gE=[9,13,27,32],_h=ur&&"CompositionEvent"in window,Ko=null;ur&&"documentMode"in document&&(Ko=document.documentMode);var vE=ur&&"TextEvent"in window&&!Ko,A1=ur&&(!_h||Ko&&8<Ko&&11>=Ko),Hg=" ",Wg=!1;function O1(e,t){switch(e){case"keyup":return gE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function D1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function yE(e,t){switch(e){case"compositionend":return D1(t);case"keypress":return t.which!==32?null:(Wg=!0,Hg);case"textInput":return e=t.data,e===Hg&&Wg?null:e;default:return null}}function xE(e,t){if(ws)return e==="compositionend"||!_h&&O1(e,t)?(e=R1(),Hl=Ch=Lr=null,ws=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return A1&&t.locale!=="ko"?null:t.data;default:return null}}var wE={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 qg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wE[e.type]:t==="textarea"}function M1(e,t,n,r){d1(r),t=xu(t,"onChange"),0<t.length&&(n=new Th("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xo=null,ga=null;function bE(e){W1(e,0)}function ic(e){var t=ks(e);if(i1(t))return e}function SE(e,t){if(e==="change")return t}var F1=!1;if(ur){var ld;if(ur){var ud="oninput"in document;if(!ud){var Gg=document.createElement("div");Gg.setAttribute("oninput","return;"),ud=typeof Gg.oninput=="function"}ld=ud}else ld=!1;F1=ld&&(!document.documentMode||9<document.documentMode)}function Qg(){Xo&&(Xo.detachEvent("onpropertychange",N1),ga=Xo=null)}function N1(e){if(e.propertyName==="value"&&ic(ga)){var t=[];M1(t,ga,e,xh(e)),m1(bE,t)}}function kE(e,t,n){e==="focusin"?(Qg(),Xo=t,ga=n,Xo.attachEvent("onpropertychange",N1)):e==="focusout"&&Qg()}function CE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ic(ga)}function TE(e,t){if(e==="click")return ic(t)}function EE(e,t){if(e==="input"||e==="change")return ic(t)}function _E(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:_E;function va(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!of.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function Yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kg(e,t){var n=Yg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yg(n)}}function L1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function I1(){for(var e=window,t=fu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fu(e.document)}return t}function Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function PE(e){var t=I1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&L1(n.ownerDocument.documentElement,n)){if(r!==null&&Ph(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Kg(n,s);var o=Kg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jE=ur&&"documentMode"in document&&11>=document.documentMode,bs=null,Tf=null,Zo=null,Ef=!1;function Xg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ef||bs==null||bs!==fu(r)||(r=bs,"selectionStart"in r&&Ph(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zo&&va(Zo,r)||(Zo=r,r=xu(Tf,"onSelect"),0<r.length&&(t=new Th("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bs)))}function xl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ss={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionend:xl("Transition","TransitionEnd")},cd={},$1={};ur&&($1=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function sc(e){if(cd[e])return cd[e];if(!Ss[e])return e;var t=Ss[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $1)return cd[e]=t[n];return e}var B1=sc("animationend"),z1=sc("animationiteration"),V1=sc("animationstart"),U1=sc("transitionend"),H1=new Map,Zg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function si(e,t){H1.set(e,t),Zi(t,[e])}for(var dd=0;dd<Zg.length;dd++){var fd=Zg[dd],RE=fd.toLowerCase(),AE=fd[0].toUpperCase()+fd.slice(1);si(RE,"on"+AE)}si(B1,"onAnimationEnd");si(z1,"onAnimationIteration");si(V1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(U1,"onTransitionEnd");ro("onMouseEnter",["mouseout","mouseover"]);ro("onMouseLeave",["mouseout","mouseover"]);ro("onPointerEnter",["pointerout","pointerover"]);ro("onPointerLeave",["pointerout","pointerover"]);Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),OE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function Jg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,RT(r,t,void 0,e),e.currentTarget=null}function W1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Jg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Jg(i,a,c),s=l}}}if(hu)throw e=bf,hu=!1,bf=null,e}function ke(e,t){var n=t[Af];n===void 0&&(n=t[Af]=new Set);var r=e+"__bubble";n.has(r)||(q1(t,e,2,!1),n.add(r))}function pd(e,t,n){var r=0;t&&(r|=4),q1(n,e,r,t)}var wl="_reactListening"+Math.random().toString(36).slice(2);function ya(e){if(!e[wl]){e[wl]=!0,Jx.forEach(function(n){n!=="selectionchange"&&(OE.has(n)||pd(n,!1,e),pd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wl]||(t[wl]=!0,pd("selectionchange",!1,t))}}function q1(e,t,n,r){switch(j1(t)){case 1:var i=qT;break;case 4:i=GT;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!wf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function hd(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Ci(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}m1(function(){var c=s,d=xh(n),u=[];e:{var f=H1.get(e);if(f!==void 0){var h=Th,m=e;switch(e){case"keypress":if(Wl(n)===0)break e;case"keydown":case"keyup":h=lE;break;case"focusin":m="focus",h=ad;break;case"focusout":m="blur",h=ad;break;case"beforeblur":case"afterblur":h=ad;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=zg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=KT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=dE;break;case B1:case z1:case V1:h=JT;break;case U1:h=pE;break;case"scroll":h=QT;break;case"wheel":h=mE;break;case"copy":case"cut":case"paste":h=tE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ug}var p=(t&4)!==0,b=!p&&e==="scroll",g=p?f!==null?f+"Capture":null:f;p=[];for(var w=c,x;w!==null;){x=w;var k=x.stateNode;if(x.tag===5&&k!==null&&(x=k,g!==null&&(k=fa(w,g),k!=null&&p.push(xa(w,k,x)))),b)break;w=w.return}0<p.length&&(f=new h(f,m,null,n,d),u.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==yf&&(m=n.relatedTarget||n.fromElement)&&(Ci(m)||m[cr]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?Ci(m):null,m!==null&&(b=Ji(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(p=zg,k="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(p=Ug,k="onPointerLeave",g="onPointerEnter",w="pointer"),b=h==null?f:ks(h),x=m==null?f:ks(m),f=new p(k,w+"leave",h,n,d),f.target=b,f.relatedTarget=x,k=null,Ci(d)===c&&(p=new p(g,w+"enter",m,n,d),p.target=x,p.relatedTarget=b,k=p),b=k,h&&m)t:{for(p=h,g=m,w=0,x=p;x;x=ms(x))w++;for(x=0,k=g;k;k=ms(k))x++;for(;0<w-x;)p=ms(p),w--;for(;0<x-w;)g=ms(g),x--;for(;w--;){if(p===g||g!==null&&p===g.alternate)break t;p=ms(p),g=ms(g)}p=null}else p=null;h!==null&&ev(u,f,h,p,!1),m!==null&&b!==null&&ev(u,b,m,p,!0)}}e:{if(f=c?ks(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var T=SE;else if(qg(f))if(F1)T=EE;else{T=CE;var E=kE}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=TE);if(T&&(T=T(e,c))){M1(u,T,n,d);break e}E&&E(e,f,c),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&pf(f,"number",f.value)}switch(E=c?ks(c):window,e){case"focusin":(qg(E)||E.contentEditable==="true")&&(bs=E,Tf=c,Zo=null);break;case"focusout":Zo=Tf=bs=null;break;case"mousedown":Ef=!0;break;case"contextmenu":case"mouseup":case"dragend":Ef=!1,Xg(u,n,d);break;case"selectionchange":if(jE)break;case"keydown":case"keyup":Xg(u,n,d)}var _;if(_h)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else ws?O1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(A1&&n.locale!=="ko"&&(ws||j!=="onCompositionStart"?j==="onCompositionEnd"&&ws&&(_=R1()):(Lr=d,Ch="value"in Lr?Lr.value:Lr.textContent,ws=!0)),E=xu(c,j),0<E.length&&(j=new Vg(j,e,null,n,d),u.push({event:j,listeners:E}),_?j.data=_:(_=D1(n),_!==null&&(j.data=_)))),(_=vE?yE(e,n):xE(e,n))&&(c=xu(c,"onBeforeInput"),0<c.length&&(d=new Vg("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=_))}W1(u,t)})}function xa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=fa(e,n),s!=null&&r.unshift(xa(e,s,i)),s=fa(e,t),s!=null&&r.push(xa(e,s,i))),e=e.return}return r}function ms(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ev(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=fa(n,s),l!=null&&o.unshift(xa(n,l,a))):i||(l=fa(n,s),l!=null&&o.push(xa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var DE=/\r\n?/g,ME=/\u0000|\uFFFD/g;function tv(e){return(typeof e=="string"?e:""+e).replace(DE,`
|
|
38
|
-
`).replace(ME,"")}function bl(e,t,n){if(t=tv(t),tv(e)!==t&&n)throw Error(L(425))}function wu(){}var _f=null,Pf=null;function jf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rf=typeof setTimeout=="function"?setTimeout:void 0,FE=typeof clearTimeout=="function"?clearTimeout:void 0,nv=typeof Promise=="function"?Promise:void 0,NE=typeof queueMicrotask=="function"?queueMicrotask:typeof nv<"u"?function(e){return nv.resolve(null).then(e).catch(LE)}:Rf;function LE(e){setTimeout(function(){throw e})}function md(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ma(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ma(t)}function Hr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function rv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var wo=Math.random().toString(36).slice(2),$n="__reactFiber$"+wo,wa="__reactProps$"+wo,cr="__reactContainer$"+wo,Af="__reactEvents$"+wo,IE="__reactListeners$"+wo,$E="__reactHandles$"+wo;function Ci(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cr]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=rv(e);e!==null;){if(n=e[$n])return n;e=rv(e)}return t}e=n,n=e.parentNode}return null}function Ya(e){return e=e[$n]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ks(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function oc(e){return e[wa]||null}var Of=[],Cs=-1;function oi(e){return{current:e}}function Te(e){0>Cs||(e.current=Of[Cs],Of[Cs]=null,Cs--)}function we(e,t){Cs++,Of[Cs]=e.current,e.current=t}var ti={},mt=oi(ti),Ot=oi(!1),Ui=ti;function io(e,t){var n=e.type.contextTypes;if(!n)return ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Dt(e){return e=e.childContextTypes,e!=null}function bu(){Te(Ot),Te(mt)}function iv(e,t,n){if(mt.current!==ti)throw Error(L(168));we(mt,t),we(Ot,n)}function G1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,kT(e)||"Unknown",i));return Ae({},n,r)}function Su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Ui=mt.current,we(mt,e),we(Ot,Ot.current),!0}function sv(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=G1(e,t,Ui),r.__reactInternalMemoizedMergedChildContext=e,Te(Ot),Te(mt),we(mt,e)):Te(Ot),we(Ot,n)}var tr=null,ac=!1,gd=!1;function Q1(e){tr===null?tr=[e]:tr.push(e)}function BE(e){ac=!0,Q1(e)}function ai(){if(!gd&&tr!==null){gd=!0;var e=0,t=he;try{var n=tr;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}tr=null,ac=!1}catch(i){throw tr!==null&&(tr=tr.slice(e+1)),x1(wh,ai),i}finally{he=t,gd=!1}}return null}var Ts=[],Es=0,ku=null,Cu=0,tn=[],nn=0,Hi=null,ir=1,sr="";function vi(e,t){Ts[Es++]=Cu,Ts[Es++]=ku,ku=e,Cu=t}function Y1(e,t,n){tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Hi,Hi=e;var r=ir;e=sr;var i=32-kn(r)-1;r&=~(1<<i),n+=1;var s=32-kn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ir=1<<32-kn(t)+i|n<<i|r,sr=s+e}else ir=1<<s|n<<i|r,sr=e}function jh(e){e.return!==null&&(vi(e,1),Y1(e,1,0))}function Rh(e){for(;e===ku;)ku=Ts[--Es],Ts[Es]=null,Cu=Ts[--Es],Ts[Es]=null;for(;e===Hi;)Hi=tn[--nn],tn[nn]=null,sr=tn[--nn],tn[nn]=null,ir=tn[--nn],tn[nn]=null}var Ut=null,Bt=null,Ee=!1,bn=null;function K1(e,t){var n=sn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ov(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hi!==null?{id:ir,overflow:sr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=sn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,Bt=null,!0):!1;default:return!1}}function Df(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mf(e){if(Ee){var t=Bt;if(t){var n=t;if(!ov(e,t)){if(Df(e))throw Error(L(418));t=Hr(n.nextSibling);var r=Ut;t&&ov(e,t)?K1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Ut=e)}}else{if(Df(e))throw Error(L(418));e.flags=e.flags&-4097|2,Ee=!1,Ut=e}}}function av(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function Sl(e){if(e!==Ut)return!1;if(!Ee)return av(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jf(e.type,e.memoizedProps)),t&&(t=Bt)){if(Df(e))throw X1(),Error(L(418));for(;t;)K1(e,t),t=Hr(t.nextSibling)}if(av(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Bt=Hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Bt=null}}else Bt=Ut?Hr(e.stateNode.nextSibling):null;return!0}function X1(){for(var e=Bt;e;)e=Hr(e.nextSibling)}function so(){Bt=Ut=null,Ee=!1}function Ah(e){bn===null?bn=[e]:bn.push(e)}var zE=hr.ReactCurrentBatchConfig;function Mo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function kl(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function lv(e){var t=e._init;return t(e._payload)}function Z1(e){function t(g,w){if(e){var x=g.deletions;x===null?(g.deletions=[w],g.flags|=16):x.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function r(g,w){for(g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function i(g,w){return g=Qr(g,w),g.index=0,g.sibling=null,g}function s(g,w,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<w?(g.flags|=2,w):x):(g.flags|=2,w)):(g.flags|=1048576,w)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,w,x,k){return w===null||w.tag!==6?(w=kd(x,g.mode,k),w.return=g,w):(w=i(w,x),w.return=g,w)}function l(g,w,x,k){var T=x.type;return T===xs?d(g,w,x.props.children,k,x.key):w!==null&&(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&lv(T)===w.type)?(k=i(w,x.props),k.ref=Mo(g,w,x),k.return=g,k):(k=Zl(x.type,x.key,x.props,null,g.mode,k),k.ref=Mo(g,w,x),k.return=g,k)}function c(g,w,x,k){return w===null||w.tag!==4||w.stateNode.containerInfo!==x.containerInfo||w.stateNode.implementation!==x.implementation?(w=Cd(x,g.mode,k),w.return=g,w):(w=i(w,x.children||[]),w.return=g,w)}function d(g,w,x,k,T){return w===null||w.tag!==7?(w=$i(x,g.mode,k,T),w.return=g,w):(w=i(w,x),w.return=g,w)}function u(g,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return w=kd(""+w,g.mode,x),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:return x=Zl(w.type,w.key,w.props,null,g.mode,x),x.ref=Mo(g,null,w),x.return=g,x;case ys:return w=Cd(w,g.mode,x),w.return=g,w;case kr:var k=w._init;return u(g,k(w._payload),x)}if(zo(w)||jo(w))return w=$i(w,g.mode,x,null),w.return=g,w;kl(g,w)}return null}function f(g,w,x,k){var T=w!==null?w.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return T!==null?null:a(g,w,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case fl:return x.key===T?l(g,w,x,k):null;case ys:return x.key===T?c(g,w,x,k):null;case kr:return T=x._init,f(g,w,T(x._payload),k)}if(zo(x)||jo(x))return T!==null?null:d(g,w,x,k,null);kl(g,x)}return null}function h(g,w,x,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return g=g.get(x)||null,a(w,g,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case fl:return g=g.get(k.key===null?x:k.key)||null,l(w,g,k,T);case ys:return g=g.get(k.key===null?x:k.key)||null,c(w,g,k,T);case kr:var E=k._init;return h(g,w,x,E(k._payload),T)}if(zo(k)||jo(k))return g=g.get(x)||null,d(w,g,k,T,null);kl(w,k)}return null}function m(g,w,x,k){for(var T=null,E=null,_=w,j=w=0,P=null;_!==null&&j<x.length;j++){_.index>j?(P=_,_=null):P=_.sibling;var O=f(g,_,x[j],k);if(O===null){_===null&&(_=P);break}e&&_&&O.alternate===null&&t(g,_),w=s(O,w,j),E===null?T=O:E.sibling=O,E=O,_=P}if(j===x.length)return n(g,_),Ee&&vi(g,j),T;if(_===null){for(;j<x.length;j++)_=u(g,x[j],k),_!==null&&(w=s(_,w,j),E===null?T=_:E.sibling=_,E=_);return Ee&&vi(g,j),T}for(_=r(g,_);j<x.length;j++)P=h(_,g,j,x[j],k),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?j:P.key),w=s(P,w,j),E===null?T=P:E.sibling=P,E=P);return e&&_.forEach(function($){return t(g,$)}),Ee&&vi(g,j),T}function p(g,w,x,k){var T=jo(x);if(typeof T!="function")throw Error(L(150));if(x=T.call(x),x==null)throw Error(L(151));for(var E=T=null,_=w,j=w=0,P=null,O=x.next();_!==null&&!O.done;j++,O=x.next()){_.index>j?(P=_,_=null):P=_.sibling;var $=f(g,_,O.value,k);if($===null){_===null&&(_=P);break}e&&_&&$.alternate===null&&t(g,_),w=s($,w,j),E===null?T=$:E.sibling=$,E=$,_=P}if(O.done)return n(g,_),Ee&&vi(g,j),T;if(_===null){for(;!O.done;j++,O=x.next())O=u(g,O.value,k),O!==null&&(w=s(O,w,j),E===null?T=O:E.sibling=O,E=O);return Ee&&vi(g,j),T}for(_=r(g,_);!O.done;j++,O=x.next())O=h(_,g,j,O.value,k),O!==null&&(e&&O.alternate!==null&&_.delete(O.key===null?j:O.key),w=s(O,w,j),E===null?T=O:E.sibling=O,E=O);return e&&_.forEach(function(F){return t(g,F)}),Ee&&vi(g,j),T}function b(g,w,x,k){if(typeof x=="object"&&x!==null&&x.type===xs&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case fl:e:{for(var T=x.key,E=w;E!==null;){if(E.key===T){if(T=x.type,T===xs){if(E.tag===7){n(g,E.sibling),w=i(E,x.props.children),w.return=g,g=w;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&lv(T)===E.type){n(g,E.sibling),w=i(E,x.props),w.ref=Mo(g,E,x),w.return=g,g=w;break e}n(g,E);break}else t(g,E);E=E.sibling}x.type===xs?(w=$i(x.props.children,g.mode,k,x.key),w.return=g,g=w):(k=Zl(x.type,x.key,x.props,null,g.mode,k),k.ref=Mo(g,w,x),k.return=g,g=k)}return o(g);case ys:e:{for(E=x.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===x.containerInfo&&w.stateNode.implementation===x.implementation){n(g,w.sibling),w=i(w,x.children||[]),w.return=g,g=w;break e}else{n(g,w);break}else t(g,w);w=w.sibling}w=Cd(x,g.mode,k),w.return=g,g=w}return o(g);case kr:return E=x._init,b(g,w,E(x._payload),k)}if(zo(x))return m(g,w,x,k);if(jo(x))return p(g,w,x,k);kl(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,w!==null&&w.tag===6?(n(g,w.sibling),w=i(w,x),w.return=g,g=w):(n(g,w),w=kd(x,g.mode,k),w.return=g,g=w),o(g)):n(g,w)}return b}var oo=Z1(!0),J1=Z1(!1),Tu=oi(null),Eu=null,_s=null,Oh=null;function Dh(){Oh=_s=Eu=null}function Mh(e){var t=Tu.current;Te(Tu),e._currentValue=t}function Ff(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bs(e,t){Eu=e,Oh=_s=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(Oh!==e)if(e={context:e,memoizedValue:t,next:null},_s===null){if(Eu===null)throw Error(L(308));_s=e,Eu.dependencies={lanes:0,firstContext:e}}else _s=_s.next=e;return t}var Ti=null;function Fh(e){Ti===null?Ti=[e]:Ti.push(e)}function ew(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Fh(t)):(n.next=i.next,i.next=n),t.interleaved=n,dr(e,r)}function dr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Cr=!1;function Nh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ar(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,de&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dr(e,n)}return i=r.interleaved,i===null?(t.next=t,Fh(r)):(t.next=i.next,i.next=t),r.interleaved=t,dr(e,n)}function ql(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}function uv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _u(e,t,n,r){var i=e.updateQueue;Cr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,d=c=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,p=a;switch(f=t,h=n,p.tag){case 1:if(m=p.payload,typeof m=="function"){u=m.call(h,u,f);break e}u=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=p.payload,f=typeof m=="function"?m.call(h,u,f):m,f==null)break e;u=Ae({},u,f);break e;case 2:Cr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=u):d=d.next=h,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);qi|=o,e.lanes=o,e.memoizedState=u}}function cv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(L(191,i));i.call(r)}}}var Ka={},zn=oi(Ka),ba=oi(Ka),Sa=oi(Ka);function Ei(e){if(e===Ka)throw Error(L(174));return e}function Lh(e,t){switch(we(Sa,t),we(ba,e),we(zn,Ka),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mf(t,e)}Te(zn),we(zn,t)}function ao(){Te(zn),Te(ba),Te(Sa)}function nw(e){Ei(Sa.current);var t=Ei(zn.current),n=mf(t,e.type);t!==n&&(we(ba,e),we(zn,n))}function Ih(e){ba.current===e&&(Te(zn),Te(ba))}var Pe=oi(0);function Pu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vd=[];function $h(){for(var e=0;e<vd.length;e++)vd[e]._workInProgressVersionPrimary=null;vd.length=0}var Gl=hr.ReactCurrentDispatcher,yd=hr.ReactCurrentBatchConfig,Wi=0,Re=null,Ue=null,Ke=null,ju=!1,Jo=!1,ka=0,VE=0;function ut(){throw Error(L(321))}function Bh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function zh(e,t,n,r,i,s){if(Wi=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gl.current=e===null||e.memoizedState===null?qE:GE,e=n(r,i),Jo){s=0;do{if(Jo=!1,ka=0,25<=s)throw Error(L(301));s+=1,Ke=Ue=null,t.updateQueue=null,Gl.current=QE,e=n(r,i)}while(Jo)}if(Gl.current=Ru,t=Ue!==null&&Ue.next!==null,Wi=0,Ke=Ue=Re=null,ju=!1,t)throw Error(L(300));return e}function Vh(){var e=ka!==0;return ka=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function cn(){if(Ue===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Ke===null?Re.memoizedState:Ke.next;if(t!==null)Ke=t,Ue=e;else{if(e===null)throw Error(L(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Ca(e,t){return typeof t=="function"?t(e):t}function xd(e){var t=cn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Ue,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((Wi&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Re.lanes|=d,qi|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Tn(r,t.memoizedState)||(At=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Re.lanes|=s,qi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wd(e){var t=cn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Tn(s,t.memoizedState)||(At=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function rw(){}function iw(e,t){var n=Re,r=cn(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,At=!0),r=r.queue,Uh(aw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Ta(9,ow.bind(null,n,r,i,t),void 0,null),Xe===null)throw Error(L(349));Wi&30||sw(n,t,i)}return i}function sw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ow(e,t,n,r){t.value=n,t.getSnapshot=r,lw(t)&&uw(e)}function aw(e,t,n){return n(function(){lw(t)&&uw(e)})}function lw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function uw(e){var t=dr(e,1);t!==null&&Cn(t,e,1,-1)}function dv(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t.queue=e,e=e.dispatch=WE.bind(null,Re,e),[t.memoizedState,e]}function Ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function cw(){return cn().memoizedState}function Ql(e,t,n,r){var i=Dn();Re.flags|=e,i.memoizedState=Ta(1|t,n,void 0,r===void 0?null:r)}function lc(e,t,n,r){var i=cn();r=r===void 0?null:r;var s=void 0;if(Ue!==null){var o=Ue.memoizedState;if(s=o.destroy,r!==null&&Bh(r,o.deps)){i.memoizedState=Ta(t,n,s,r);return}}Re.flags|=e,i.memoizedState=Ta(1|t,n,s,r)}function fv(e,t){return Ql(8390656,8,e,t)}function Uh(e,t){return lc(2048,8,e,t)}function dw(e,t){return lc(4,2,e,t)}function fw(e,t){return lc(4,4,e,t)}function pw(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 hw(e,t,n){return n=n!=null?n.concat([e]):null,lc(4,4,pw.bind(null,t,e),n)}function Hh(){}function mw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function vw(e,t,n){return Wi&21?(Tn(n,t)||(n=S1(),Re.lanes|=n,qi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=n)}function UE(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=yd.transition;yd.transition={};try{e(!1),t()}finally{he=n,yd.transition=r}}function yw(){return cn().memoizedState}function HE(e,t,n){var r=Gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xw(e))ww(t,n);else if(n=ew(e,t,n,r),n!==null){var i=wt();Cn(n,e,r,i),bw(n,t,r)}}function WE(e,t,n){var r=Gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xw(e))ww(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,Fh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=ew(e,t,i,r),n!==null&&(i=wt(),Cn(n,e,r,i),bw(n,t,r))}}function xw(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function ww(e,t){Jo=ju=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}var Ru={readContext:un,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},qE={readContext:un,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:fv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ql(4194308,4,pw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ql(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ql(4,2,e,t)},useMemo:function(e,t){var n=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=HE.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:dv,useDebugValue:Hh,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=dv(!1),t=e[0];return e=UE.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,i=Dn();if(Ee){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Xe===null)throw Error(L(349));Wi&30||sw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,fv(aw.bind(null,r,s,e),[e]),r.flags|=2048,Ta(9,ow.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Dn(),t=Xe.identifierPrefix;if(Ee){var n=sr,r=ir;n=(r&~(1<<32-kn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ka++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=VE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},GE={readContext:un,useCallback:mw,useContext:un,useEffect:Uh,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:xd,useRef:cw,useState:function(){return xd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return vw(t,Ue.memoizedState,e)},useTransition:function(){var e=xd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:rw,useSyncExternalStore:iw,useId:yw,unstable_isNewReconciler:!1},QE={readContext:un,useCallback:mw,useContext:un,useEffect:Uh,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:wd,useRef:cw,useState:function(){return wd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return Ue===null?t.memoizedState=e:vw(t,Ue.memoizedState,e)},useTransition:function(){var e=wd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:rw,useSyncExternalStore:iw,useId:yw,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Nf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uc={isMounted:function(e){return(e=e._reactInternals)?Ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Gr(e),s=ar(r,i);s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(Cn(t,e,i,r),ql(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Gr(e),s=ar(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(Cn(t,e,i,r),ql(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=Gr(e),i=ar(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wr(e,i,r),t!==null&&(Cn(t,e,r,n),ql(t,e,r))}};function pv(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!va(n,r)||!va(i,s):!0}function Sw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=un(s):(i=Dt(t)?Ui:mt.current,r=t.contextTypes,s=(r=r!=null)?io(e,i):ti),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function hv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function Lf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Nh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=un(s):(s=Dt(t)?Ui:mt.current,i.context=io(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Nf(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&uc.enqueueReplaceState(i,i.state,null),_u(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do n+=ST(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{td=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bo(e):""}function ST(e){switch(e.tag){case 5:return Bo(e.type);case 16:return Bo("Lazy");case 13:return Bo("Suspense");case 19:return Bo("SuspenseList");case 0:case 2:case 15:return e=nd(e.type,!1),e;case 11:return e=nd(e.type.render,!1),e;case 1:return e=nd(e.type,!0),e;default:return""}}function cf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xs:return"Fragment";case ys:return"Portal";case af:return"Profiler";case gh:return"StrictMode";case lf:return"Suspense";case uf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case t1:return(e.displayName||"Context")+".Consumer";case e1:return(e._context.displayName||"Context")+".Provider";case vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yh:return t=e.displayName||null,t!==null?t:cf(e.type)||"Memo";case kr:t=e._payload,e=e._init;try{return cf(e(t))}catch{}}return null}function kT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cf(t);case 8:return t===gh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ei(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function r1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CT(e){var t=r1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pl(e){e._valueTracker||(e._valueTracker=CT(e))}function i1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=r1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function df(e,t){var n=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ag(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 s1(e,t){t=t.checked,t!=null&&mh(e,"checked",t,!1)}function ff(e,t){s1(e,t);var n=ei(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pf(e,t.type,n):t.hasOwnProperty("defaultValue")&&pf(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Og(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pf(e,t,n){(t!=="number"||fu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zo=Array.isArray;function Ns(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ei(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Dg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(zo(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ei(n)}}function o1(e,t){var n=ei(t.value),r=ei(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Mg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function a1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function mf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?a1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hl,l1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hl=hl||document.createElement("div"),hl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function da(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},TT=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){TT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function u1(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 c1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=u1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var ET=Ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gf(e,t){if(t){if(ET[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function vf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yf=null;function xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xf=null,Ls=null,Is=null;function Fg(e){if(e=Ya(e)){if(typeof xf!="function")throw Error(L(280));var t=e.stateNode;t&&(t=oc(t),xf(e.stateNode,e.type,t))}}function d1(e){Ls?Is?Is.push(e):Is=[e]:Ls=e}function f1(){if(Ls){var e=Ls,t=Is;if(Is=Ls=null,Fg(e),t)for(e=0;e<t.length;e++)Fg(t[e])}}function p1(e,t){return e(t)}function h1(){}var rd=!1;function m1(e,t,n){if(rd)return e(t,n);rd=!0;try{return p1(e,t,n)}finally{rd=!1,(Ls!==null||Is!==null)&&(h1(),f1())}}function fa(e,t){var n=e.stateNode;if(n===null)return null;var r=oc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var wf=!1;if(ur)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){wf=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{wf=!1}function _T(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Yo=!1,pu=null,hu=!1,bf=null,PT={onError:function(e){Yo=!0,pu=e}};function jT(e,t,n,r,i,s,o,a,l){Yo=!1,pu=null,_T.apply(PT,arguments)}function RT(e,t,n,r,i,s,o,a,l){if(jT.apply(this,arguments),Yo){if(Yo){var c=pu;Yo=!1,pu=null}else throw Error(L(198));hu||(hu=!0,bf=c)}}function Ji(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function g1(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 Ng(e){if(Ji(e)!==e)throw Error(L(188))}function AT(e){var t=e.alternate;if(!t){if(t=Ji(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ng(i),e;if(s===r)return Ng(i),t;s=s.sibling}throw Error(L(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function v1(e){return e=AT(e),e!==null?y1(e):null}function y1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=y1(e);if(t!==null)return t;e=e.sibling}return null}var x1=Ht.unstable_scheduleCallback,Lg=Ht.unstable_cancelCallback,OT=Ht.unstable_shouldYield,DT=Ht.unstable_requestPaint,$e=Ht.unstable_now,MT=Ht.unstable_getCurrentPriorityLevel,wh=Ht.unstable_ImmediatePriority,w1=Ht.unstable_UserBlockingPriority,mu=Ht.unstable_NormalPriority,FT=Ht.unstable_LowPriority,b1=Ht.unstable_IdlePriority,nc=null,Bn=null;function NT(e){if(Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(nc,e,void 0,(e.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:$T,LT=Math.log,IT=Math.LN2;function $T(e){return e>>>=0,e===0?32:31-(LT(e)/IT|0)|0}var ml=64,gl=4194304;function Vo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Vo(a):(s&=o,s!==0&&(r=Vo(s)))}else o=n&~i,o!==0?r=Vo(o):s!==0&&(r=Vo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-kn(t),i=1<<n,r|=e[n],t&=~i;return r}function BT(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 zT(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]=BT(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Sf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function S1(){var e=ml;return ml<<=1,!(ml&4194240)&&(ml=64),e}function id(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ga(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kn(t),e[t]=n}function VT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-kn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function bh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var he=0;function k1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var C1,Sh,T1,E1,_1,kf=!1,vl=[],zr=null,Vr=null,Ur=null,pa=new Map,ha=new Map,Er=[],UT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ig(e,t){switch(e){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Ur=null;break;case"pointerover":case"pointerout":pa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ha.delete(t.pointerId)}}function Ao(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ya(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function HT(e,t,n,r,i){switch(t){case"focusin":return zr=Ao(zr,e,t,n,r,i),!0;case"dragenter":return Vr=Ao(Vr,e,t,n,r,i),!0;case"mouseover":return Ur=Ao(Ur,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return pa.set(s,Ao(pa.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ha.set(s,Ao(ha.get(s)||null,e,t,n,r,i)),!0}return!1}function P1(e){var t=Ci(e.target);if(t!==null){var n=Ji(t);if(n!==null){if(t=n.tag,t===13){if(t=g1(n),t!==null){e.blockedOn=t,_1(e.priority,function(){T1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ul(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yf=r,n.target.dispatchEvent(r),yf=null}else return t=Ya(n),t!==null&&Sh(t),e.blockedOn=n,!1;t.shift()}return!0}function $g(e,t,n){Ul(e)&&n.delete(t)}function WT(){kf=!1,zr!==null&&Ul(zr)&&(zr=null),Vr!==null&&Ul(Vr)&&(Vr=null),Ur!==null&&Ul(Ur)&&(Ur=null),pa.forEach($g),ha.forEach($g)}function Oo(e,t){e.blockedOn===t&&(e.blockedOn=null,kf||(kf=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,WT)))}function ma(e){function t(i){return Oo(i,e)}if(0<vl.length){Oo(vl[0],e);for(var n=1;n<vl.length;n++){var r=vl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(zr!==null&&Oo(zr,e),Vr!==null&&Oo(Vr,e),Ur!==null&&Oo(Ur,e),pa.forEach(t),ha.forEach(t),n=0;n<Er.length;n++)r=Er[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Er.length&&(n=Er[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&Er.shift()}var $s=hr.ReactCurrentBatchConfig,vu=!0;function qT(e,t,n,r){var i=he,s=$s.transition;$s.transition=null;try{he=1,kh(e,t,n,r)}finally{he=i,$s.transition=s}}function GT(e,t,n,r){var i=he,s=$s.transition;$s.transition=null;try{he=4,kh(e,t,n,r)}finally{he=i,$s.transition=s}}function kh(e,t,n,r){if(vu){var i=Cf(e,t,n,r);if(i===null)hd(e,t,r,yu,n),Ig(e,r);else if(HT(i,e,t,n,r))r.stopPropagation();else if(Ig(e,r),t&4&&-1<UT.indexOf(e)){for(;i!==null;){var s=Ya(i);if(s!==null&&C1(s),s=Cf(e,t,n,r),s===null&&hd(e,t,r,yu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else hd(e,t,r,null,n)}}var yu=null;function Cf(e,t,n,r){if(yu=null,e=xh(r),e=Ci(e),e!==null)if(t=Ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=g1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yu=e,null}function j1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(MT()){case wh:return 1;case w1:return 4;case mu:case FT:return 16;case b1:return 536870912;default:return 16}default:return 16}}var Lr=null,Ch=null,Hl=null;function R1(){if(Hl)return Hl;var e,t=Ch,n=t.length,r,i="value"in Lr?Lr.value:Lr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Hl=i.slice(e,1<r?1-r:void 0)}function Wl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yl(){return!0}function Bg(){return!1}function qt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yl:Bg,this.isPropagationStopped=Bg,this}return Ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yl)},persist:function(){},isPersistent:yl}),t}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Th=qt(xo),Qa=Ae({},xo,{view:0,detail:0}),QT=qt(Qa),sd,od,Do,rc=Ae({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Do&&(Do&&e.type==="mousemove"?(sd=e.screenX-Do.screenX,od=e.screenY-Do.screenY):od=sd=0,Do=e),sd)},movementY:function(e){return"movementY"in e?e.movementY:od}}),zg=qt(rc),YT=Ae({},rc,{dataTransfer:0}),KT=qt(YT),XT=Ae({},Qa,{relatedTarget:0}),ad=qt(XT),ZT=Ae({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),JT=qt(ZT),eE=Ae({},xo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tE=qt(eE),nE=Ae({},xo,{data:0}),Vg=qt(nE),rE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iE={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"},sE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sE[e])?!!t[e]:!1}function Eh(){return oE}var aE=Ae({},Qa,{key:function(e){if(e.key){var t=rE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eh,charCode:function(e){return e.type==="keypress"?Wl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lE=qt(aE),uE=Ae({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ug=qt(uE),cE=Ae({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),dE=qt(cE),fE=Ae({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),pE=qt(fE),hE=Ae({},rc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),mE=qt(hE),gE=[9,13,27,32],_h=ur&&"CompositionEvent"in window,Ko=null;ur&&"documentMode"in document&&(Ko=document.documentMode);var vE=ur&&"TextEvent"in window&&!Ko,A1=ur&&(!_h||Ko&&8<Ko&&11>=Ko),Hg=" ",Wg=!1;function O1(e,t){switch(e){case"keyup":return gE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function D1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function yE(e,t){switch(e){case"compositionend":return D1(t);case"keypress":return t.which!==32?null:(Wg=!0,Hg);case"textInput":return e=t.data,e===Hg&&Wg?null:e;default:return null}}function xE(e,t){if(ws)return e==="compositionend"||!_h&&O1(e,t)?(e=R1(),Hl=Ch=Lr=null,ws=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return A1&&t.locale!=="ko"?null:t.data;default:return null}}var wE={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 qg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wE[e.type]:t==="textarea"}function M1(e,t,n,r){d1(r),t=xu(t,"onChange"),0<t.length&&(n=new Th("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xo=null,ga=null;function bE(e){W1(e,0)}function ic(e){var t=ks(e);if(i1(t))return e}function SE(e,t){if(e==="change")return t}var F1=!1;if(ur){var ld;if(ur){var ud="oninput"in document;if(!ud){var Gg=document.createElement("div");Gg.setAttribute("oninput","return;"),ud=typeof Gg.oninput=="function"}ld=ud}else ld=!1;F1=ld&&(!document.documentMode||9<document.documentMode)}function Qg(){Xo&&(Xo.detachEvent("onpropertychange",N1),ga=Xo=null)}function N1(e){if(e.propertyName==="value"&&ic(ga)){var t=[];M1(t,ga,e,xh(e)),m1(bE,t)}}function kE(e,t,n){e==="focusin"?(Qg(),Xo=t,ga=n,Xo.attachEvent("onpropertychange",N1)):e==="focusout"&&Qg()}function CE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ic(ga)}function TE(e,t){if(e==="click")return ic(t)}function EE(e,t){if(e==="input"||e==="change")return ic(t)}function _E(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:_E;function va(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!of.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function Yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kg(e,t){var n=Yg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yg(n)}}function L1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function I1(){for(var e=window,t=fu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fu(e.document)}return t}function Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function PE(e){var t=I1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&L1(n.ownerDocument.documentElement,n)){if(r!==null&&Ph(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Kg(n,s);var o=Kg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jE=ur&&"documentMode"in document&&11>=document.documentMode,bs=null,Tf=null,Zo=null,Ef=!1;function Xg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ef||bs==null||bs!==fu(r)||(r=bs,"selectionStart"in r&&Ph(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zo&&va(Zo,r)||(Zo=r,r=xu(Tf,"onSelect"),0<r.length&&(t=new Th("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bs)))}function xl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ss={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionend:xl("Transition","TransitionEnd")},cd={},$1={};ur&&($1=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function sc(e){if(cd[e])return cd[e];if(!Ss[e])return e;var t=Ss[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $1)return cd[e]=t[n];return e}var B1=sc("animationend"),z1=sc("animationiteration"),V1=sc("animationstart"),U1=sc("transitionend"),H1=new Map,Zg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function si(e,t){H1.set(e,t),Zi(t,[e])}for(var dd=0;dd<Zg.length;dd++){var fd=Zg[dd],RE=fd.toLowerCase(),AE=fd[0].toUpperCase()+fd.slice(1);si(RE,"on"+AE)}si(B1,"onAnimationEnd");si(z1,"onAnimationIteration");si(V1,"onAnimationStart");si("dblclick","onDoubleClick");si("focusin","onFocus");si("focusout","onBlur");si(U1,"onTransitionEnd");ro("onMouseEnter",["mouseout","mouseover"]);ro("onMouseLeave",["mouseout","mouseover"]);ro("onPointerEnter",["pointerout","pointerover"]);ro("onPointerLeave",["pointerout","pointerover"]);Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),OE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function Jg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,RT(r,t,void 0,e),e.currentTarget=null}function W1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Jg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Jg(i,a,c),s=l}}}if(hu)throw e=bf,hu=!1,bf=null,e}function ke(e,t){var n=t[Af];n===void 0&&(n=t[Af]=new Set);var r=e+"__bubble";n.has(r)||(q1(t,e,2,!1),n.add(r))}function pd(e,t,n){var r=0;t&&(r|=4),q1(n,e,r,t)}var wl="_reactListening"+Math.random().toString(36).slice(2);function ya(e){if(!e[wl]){e[wl]=!0,Jx.forEach(function(n){n!=="selectionchange"&&(OE.has(n)||pd(n,!1,e),pd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wl]||(t[wl]=!0,pd("selectionchange",!1,t))}}function q1(e,t,n,r){switch(j1(t)){case 1:var i=qT;break;case 4:i=GT;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!wf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function hd(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Ci(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}m1(function(){var c=s,d=xh(n),u=[];e:{var f=H1.get(e);if(f!==void 0){var p=Th,h=e;switch(e){case"keypress":if(Wl(n)===0)break e;case"keydown":case"keyup":p=lE;break;case"focusin":h="focus",p=ad;break;case"focusout":h="blur",p=ad;break;case"beforeblur":case"afterblur":p=ad;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=zg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=KT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=dE;break;case B1:case z1:case V1:p=JT;break;case U1:p=pE;break;case"scroll":p=QT;break;case"wheel":p=mE;break;case"copy":case"cut":case"paste":p=tE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Ug}var m=(t&4)!==0,x=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var w=c,b;w!==null;){b=w;var k=b.stateNode;if(b.tag===5&&k!==null&&(b=k,g!==null&&(k=fa(w,g),k!=null&&m.push(xa(w,k,b)))),x)break;w=w.return}0<m.length&&(f=new p(f,h,null,n,d),u.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==yf&&(h=n.relatedTarget||n.fromElement)&&(Ci(h)||h[cr]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=c,h=h?Ci(h):null,h!==null&&(x=Ji(h),h!==x||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=c),p!==h)){if(m=zg,k="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(m=Ug,k="onPointerLeave",g="onPointerEnter",w="pointer"),x=p==null?f:ks(p),b=h==null?f:ks(h),f=new m(k,w+"leave",p,n,d),f.target=x,f.relatedTarget=b,k=null,Ci(d)===c&&(m=new m(g,w+"enter",h,n,d),m.target=b,m.relatedTarget=x,k=m),x=k,p&&h)t:{for(m=p,g=h,w=0,b=m;b;b=ms(b))w++;for(b=0,k=g;k;k=ms(k))b++;for(;0<w-b;)m=ms(m),w--;for(;0<b-w;)g=ms(g),b--;for(;w--;){if(m===g||g!==null&&m===g.alternate)break t;m=ms(m),g=ms(g)}m=null}else m=null;p!==null&&ev(u,f,p,m,!1),h!==null&&x!==null&&ev(u,x,h,m,!0)}}e:{if(f=c?ks(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=SE;else if(qg(f))if(F1)T=EE;else{T=CE;var E=kE}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=TE);if(T&&(T=T(e,c))){M1(u,T,n,d);break e}E&&E(e,f,c),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&pf(f,"number",f.value)}switch(E=c?ks(c):window,e){case"focusin":(qg(E)||E.contentEditable==="true")&&(bs=E,Tf=c,Zo=null);break;case"focusout":Zo=Tf=bs=null;break;case"mousedown":Ef=!0;break;case"contextmenu":case"mouseup":case"dragend":Ef=!1,Xg(u,n,d);break;case"selectionchange":if(jE)break;case"keydown":case"keyup":Xg(u,n,d)}var _;if(_h)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else ws?O1(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(A1&&n.locale!=="ko"&&(ws||j!=="onCompositionStart"?j==="onCompositionEnd"&&ws&&(_=R1()):(Lr=d,Ch="value"in Lr?Lr.value:Lr.textContent,ws=!0)),E=xu(c,j),0<E.length&&(j=new Vg(j,e,null,n,d),u.push({event:j,listeners:E}),_?j.data=_:(_=D1(n),_!==null&&(j.data=_)))),(_=vE?yE(e,n):xE(e,n))&&(c=xu(c,"onBeforeInput"),0<c.length&&(d=new Vg("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=_))}W1(u,t)})}function xa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=fa(e,n),s!=null&&r.unshift(xa(e,s,i)),s=fa(e,t),s!=null&&r.push(xa(e,s,i))),e=e.return}return r}function ms(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ev(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=fa(n,s),l!=null&&o.unshift(xa(n,l,a))):i||(l=fa(n,s),l!=null&&o.push(xa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var DE=/\r\n?/g,ME=/\u0000|\uFFFD/g;function tv(e){return(typeof e=="string"?e:""+e).replace(DE,`
|
|
38
|
+
`).replace(ME,"")}function bl(e,t,n){if(t=tv(t),tv(e)!==t&&n)throw Error(L(425))}function wu(){}var _f=null,Pf=null;function jf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rf=typeof setTimeout=="function"?setTimeout:void 0,FE=typeof clearTimeout=="function"?clearTimeout:void 0,nv=typeof Promise=="function"?Promise:void 0,NE=typeof queueMicrotask=="function"?queueMicrotask:typeof nv<"u"?function(e){return nv.resolve(null).then(e).catch(LE)}:Rf;function LE(e){setTimeout(function(){throw e})}function md(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ma(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ma(t)}function Hr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function rv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var wo=Math.random().toString(36).slice(2),$n="__reactFiber$"+wo,wa="__reactProps$"+wo,cr="__reactContainer$"+wo,Af="__reactEvents$"+wo,IE="__reactListeners$"+wo,$E="__reactHandles$"+wo;function Ci(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cr]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=rv(e);e!==null;){if(n=e[$n])return n;e=rv(e)}return t}e=n,n=e.parentNode}return null}function Ya(e){return e=e[$n]||e[cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ks(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function oc(e){return e[wa]||null}var Of=[],Cs=-1;function oi(e){return{current:e}}function Te(e){0>Cs||(e.current=Of[Cs],Of[Cs]=null,Cs--)}function we(e,t){Cs++,Of[Cs]=e.current,e.current=t}var ti={},mt=oi(ti),Ot=oi(!1),Ui=ti;function io(e,t){var n=e.type.contextTypes;if(!n)return ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Dt(e){return e=e.childContextTypes,e!=null}function bu(){Te(Ot),Te(mt)}function iv(e,t,n){if(mt.current!==ti)throw Error(L(168));we(mt,t),we(Ot,n)}function G1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,kT(e)||"Unknown",i));return Ae({},n,r)}function Su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Ui=mt.current,we(mt,e),we(Ot,Ot.current),!0}function sv(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=G1(e,t,Ui),r.__reactInternalMemoizedMergedChildContext=e,Te(Ot),Te(mt),we(mt,e)):Te(Ot),we(Ot,n)}var tr=null,ac=!1,gd=!1;function Q1(e){tr===null?tr=[e]:tr.push(e)}function BE(e){ac=!0,Q1(e)}function ai(){if(!gd&&tr!==null){gd=!0;var e=0,t=he;try{var n=tr;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}tr=null,ac=!1}catch(i){throw tr!==null&&(tr=tr.slice(e+1)),x1(wh,ai),i}finally{he=t,gd=!1}}return null}var Ts=[],Es=0,ku=null,Cu=0,tn=[],nn=0,Hi=null,ir=1,sr="";function vi(e,t){Ts[Es++]=Cu,Ts[Es++]=ku,ku=e,Cu=t}function Y1(e,t,n){tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Hi,Hi=e;var r=ir;e=sr;var i=32-kn(r)-1;r&=~(1<<i),n+=1;var s=32-kn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ir=1<<32-kn(t)+i|n<<i|r,sr=s+e}else ir=1<<s|n<<i|r,sr=e}function jh(e){e.return!==null&&(vi(e,1),Y1(e,1,0))}function Rh(e){for(;e===ku;)ku=Ts[--Es],Ts[Es]=null,Cu=Ts[--Es],Ts[Es]=null;for(;e===Hi;)Hi=tn[--nn],tn[nn]=null,sr=tn[--nn],tn[nn]=null,ir=tn[--nn],tn[nn]=null}var Ut=null,Bt=null,Ee=!1,bn=null;function K1(e,t){var n=sn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ov(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=Hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hi!==null?{id:ir,overflow:sr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=sn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,Bt=null,!0):!1;default:return!1}}function Df(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mf(e){if(Ee){var t=Bt;if(t){var n=t;if(!ov(e,t)){if(Df(e))throw Error(L(418));t=Hr(n.nextSibling);var r=Ut;t&&ov(e,t)?K1(r,n):(e.flags=e.flags&-4097|2,Ee=!1,Ut=e)}}else{if(Df(e))throw Error(L(418));e.flags=e.flags&-4097|2,Ee=!1,Ut=e}}}function av(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function Sl(e){if(e!==Ut)return!1;if(!Ee)return av(e),Ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jf(e.type,e.memoizedProps)),t&&(t=Bt)){if(Df(e))throw X1(),Error(L(418));for(;t;)K1(e,t),t=Hr(t.nextSibling)}if(av(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Bt=Hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Bt=null}}else Bt=Ut?Hr(e.stateNode.nextSibling):null;return!0}function X1(){for(var e=Bt;e;)e=Hr(e.nextSibling)}function so(){Bt=Ut=null,Ee=!1}function Ah(e){bn===null?bn=[e]:bn.push(e)}var zE=hr.ReactCurrentBatchConfig;function Mo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function kl(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function lv(e){var t=e._init;return t(e._payload)}function Z1(e){function t(g,w){if(e){var b=g.deletions;b===null?(g.deletions=[w],g.flags|=16):b.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function r(g,w){for(g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function i(g,w){return g=Qr(g,w),g.index=0,g.sibling=null,g}function s(g,w,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<w?(g.flags|=2,w):b):(g.flags|=2,w)):(g.flags|=1048576,w)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,w,b,k){return w===null||w.tag!==6?(w=kd(b,g.mode,k),w.return=g,w):(w=i(w,b),w.return=g,w)}function l(g,w,b,k){var T=b.type;return T===xs?d(g,w,b.props.children,k,b.key):w!==null&&(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&lv(T)===w.type)?(k=i(w,b.props),k.ref=Mo(g,w,b),k.return=g,k):(k=Zl(b.type,b.key,b.props,null,g.mode,k),k.ref=Mo(g,w,b),k.return=g,k)}function c(g,w,b,k){return w===null||w.tag!==4||w.stateNode.containerInfo!==b.containerInfo||w.stateNode.implementation!==b.implementation?(w=Cd(b,g.mode,k),w.return=g,w):(w=i(w,b.children||[]),w.return=g,w)}function d(g,w,b,k,T){return w===null||w.tag!==7?(w=$i(b,g.mode,k,T),w.return=g,w):(w=i(w,b),w.return=g,w)}function u(g,w,b){if(typeof w=="string"&&w!==""||typeof w=="number")return w=kd(""+w,g.mode,b),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fl:return b=Zl(w.type,w.key,w.props,null,g.mode,b),b.ref=Mo(g,null,w),b.return=g,b;case ys:return w=Cd(w,g.mode,b),w.return=g,w;case kr:var k=w._init;return u(g,k(w._payload),b)}if(zo(w)||jo(w))return w=$i(w,g.mode,b,null),w.return=g,w;kl(g,w)}return null}function f(g,w,b,k){var T=w!==null?w.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:a(g,w,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fl:return b.key===T?l(g,w,b,k):null;case ys:return b.key===T?c(g,w,b,k):null;case kr:return T=b._init,f(g,w,T(b._payload),k)}if(zo(b)||jo(b))return T!==null?null:d(g,w,b,k,null);kl(g,b)}return null}function p(g,w,b,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return g=g.get(b)||null,a(w,g,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case fl:return g=g.get(k.key===null?b:k.key)||null,l(w,g,k,T);case ys:return g=g.get(k.key===null?b:k.key)||null,c(w,g,k,T);case kr:var E=k._init;return p(g,w,b,E(k._payload),T)}if(zo(k)||jo(k))return g=g.get(b)||null,d(w,g,k,T,null);kl(w,k)}return null}function h(g,w,b,k){for(var T=null,E=null,_=w,j=w=0,M=null;_!==null&&j<b.length;j++){_.index>j?(M=_,_=null):M=_.sibling;var P=f(g,_,b[j],k);if(P===null){_===null&&(_=M);break}e&&_&&P.alternate===null&&t(g,_),w=s(P,w,j),E===null?T=P:E.sibling=P,E=P,_=M}if(j===b.length)return n(g,_),Ee&&vi(g,j),T;if(_===null){for(;j<b.length;j++)_=u(g,b[j],k),_!==null&&(w=s(_,w,j),E===null?T=_:E.sibling=_,E=_);return Ee&&vi(g,j),T}for(_=r(g,_);j<b.length;j++)M=p(_,g,j,b[j],k),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?j:M.key),w=s(M,w,j),E===null?T=M:E.sibling=M,E=M);return e&&_.forEach(function(I){return t(g,I)}),Ee&&vi(g,j),T}function m(g,w,b,k){var T=jo(b);if(typeof T!="function")throw Error(L(150));if(b=T.call(b),b==null)throw Error(L(151));for(var E=T=null,_=w,j=w=0,M=null,P=b.next();_!==null&&!P.done;j++,P=b.next()){_.index>j?(M=_,_=null):M=_.sibling;var I=f(g,_,P.value,k);if(I===null){_===null&&(_=M);break}e&&_&&I.alternate===null&&t(g,_),w=s(I,w,j),E===null?T=I:E.sibling=I,E=I,_=M}if(P.done)return n(g,_),Ee&&vi(g,j),T;if(_===null){for(;!P.done;j++,P=b.next())P=u(g,P.value,k),P!==null&&(w=s(P,w,j),E===null?T=P:E.sibling=P,E=P);return Ee&&vi(g,j),T}for(_=r(g,_);!P.done;j++,P=b.next())P=p(_,g,j,P.value,k),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?j:P.key),w=s(P,w,j),E===null?T=P:E.sibling=P,E=P);return e&&_.forEach(function(F){return t(g,F)}),Ee&&vi(g,j),T}function x(g,w,b,k){if(typeof b=="object"&&b!==null&&b.type===xs&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case fl:e:{for(var T=b.key,E=w;E!==null;){if(E.key===T){if(T=b.type,T===xs){if(E.tag===7){n(g,E.sibling),w=i(E,b.props.children),w.return=g,g=w;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kr&&lv(T)===E.type){n(g,E.sibling),w=i(E,b.props),w.ref=Mo(g,E,b),w.return=g,g=w;break e}n(g,E);break}else t(g,E);E=E.sibling}b.type===xs?(w=$i(b.props.children,g.mode,k,b.key),w.return=g,g=w):(k=Zl(b.type,b.key,b.props,null,g.mode,k),k.ref=Mo(g,w,b),k.return=g,g=k)}return o(g);case ys:e:{for(E=b.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){n(g,w.sibling),w=i(w,b.children||[]),w.return=g,g=w;break e}else{n(g,w);break}else t(g,w);w=w.sibling}w=Cd(b,g.mode,k),w.return=g,g=w}return o(g);case kr:return E=b._init,x(g,w,E(b._payload),k)}if(zo(b))return h(g,w,b,k);if(jo(b))return m(g,w,b,k);kl(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(n(g,w.sibling),w=i(w,b),w.return=g,g=w):(n(g,w),w=kd(b,g.mode,k),w.return=g,g=w),o(g)):n(g,w)}return x}var oo=Z1(!0),J1=Z1(!1),Tu=oi(null),Eu=null,_s=null,Oh=null;function Dh(){Oh=_s=Eu=null}function Mh(e){var t=Tu.current;Te(Tu),e._currentValue=t}function Ff(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bs(e,t){Eu=e,Oh=_s=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(Oh!==e)if(e={context:e,memoizedValue:t,next:null},_s===null){if(Eu===null)throw Error(L(308));_s=e,Eu.dependencies={lanes:0,firstContext:e}}else _s=_s.next=e;return t}var Ti=null;function Fh(e){Ti===null?Ti=[e]:Ti.push(e)}function ew(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Fh(t)):(n.next=i.next,i.next=n),t.interleaved=n,dr(e,r)}function dr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Cr=!1;function Nh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ar(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,de&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dr(e,n)}return i=r.interleaved,i===null?(t.next=t,Fh(r)):(t.next=i.next,i.next=t),r.interleaved=t,dr(e,n)}function ql(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}function uv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _u(e,t,n,r){var i=e.updateQueue;Cr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,d=c=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){u=h.call(p,u,f);break e}u=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,u,f):h,f==null)break e;u=Ae({},u,f);break e;case 2:Cr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=p,l=u):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);qi|=o,e.lanes=o,e.memoizedState=u}}function cv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(L(191,i));i.call(r)}}}var Ka={},zn=oi(Ka),ba=oi(Ka),Sa=oi(Ka);function Ei(e){if(e===Ka)throw Error(L(174));return e}function Lh(e,t){switch(we(Sa,t),we(ba,e),we(zn,Ka),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mf(t,e)}Te(zn),we(zn,t)}function ao(){Te(zn),Te(ba),Te(Sa)}function nw(e){Ei(Sa.current);var t=Ei(zn.current),n=mf(t,e.type);t!==n&&(we(ba,e),we(zn,n))}function Ih(e){ba.current===e&&(Te(zn),Te(ba))}var Pe=oi(0);function Pu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vd=[];function $h(){for(var e=0;e<vd.length;e++)vd[e]._workInProgressVersionPrimary=null;vd.length=0}var Gl=hr.ReactCurrentDispatcher,yd=hr.ReactCurrentBatchConfig,Wi=0,Re=null,Ue=null,Ke=null,ju=!1,Jo=!1,ka=0,VE=0;function ut(){throw Error(L(321))}function Bh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function zh(e,t,n,r,i,s){if(Wi=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gl.current=e===null||e.memoizedState===null?qE:GE,e=n(r,i),Jo){s=0;do{if(Jo=!1,ka=0,25<=s)throw Error(L(301));s+=1,Ke=Ue=null,t.updateQueue=null,Gl.current=QE,e=n(r,i)}while(Jo)}if(Gl.current=Ru,t=Ue!==null&&Ue.next!==null,Wi=0,Ke=Ue=Re=null,ju=!1,t)throw Error(L(300));return e}function Vh(){var e=ka!==0;return ka=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function cn(){if(Ue===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Ke===null?Re.memoizedState:Ke.next;if(t!==null)Ke=t,Ue=e;else{if(e===null)throw Error(L(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Ke===null?Re.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Ca(e,t){return typeof t=="function"?t(e):t}function xd(e){var t=cn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Ue,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var d=c.lane;if((Wi&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Re.lanes|=d,qi|=d}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Tn(r,t.memoizedState)||(At=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Re.lanes|=s,qi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wd(e){var t=cn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Tn(s,t.memoizedState)||(At=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function rw(){}function iw(e,t){var n=Re,r=cn(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,At=!0),r=r.queue,Uh(aw.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Ta(9,ow.bind(null,n,r,i,t),void 0,null),Xe===null)throw Error(L(349));Wi&30||sw(n,t,i)}return i}function sw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ow(e,t,n,r){t.value=n,t.getSnapshot=r,lw(t)&&uw(e)}function aw(e,t,n){return n(function(){lw(t)&&uw(e)})}function lw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function uw(e){var t=dr(e,1);t!==null&&Cn(t,e,1,-1)}function dv(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t.queue=e,e=e.dispatch=WE.bind(null,Re,e),[t.memoizedState,e]}function Ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function cw(){return cn().memoizedState}function Ql(e,t,n,r){var i=Dn();Re.flags|=e,i.memoizedState=Ta(1|t,n,void 0,r===void 0?null:r)}function lc(e,t,n,r){var i=cn();r=r===void 0?null:r;var s=void 0;if(Ue!==null){var o=Ue.memoizedState;if(s=o.destroy,r!==null&&Bh(r,o.deps)){i.memoizedState=Ta(t,n,s,r);return}}Re.flags|=e,i.memoizedState=Ta(1|t,n,s,r)}function fv(e,t){return Ql(8390656,8,e,t)}function Uh(e,t){return lc(2048,8,e,t)}function dw(e,t){return lc(4,2,e,t)}function fw(e,t){return lc(4,4,e,t)}function pw(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 hw(e,t,n){return n=n!=null?n.concat([e]):null,lc(4,4,pw.bind(null,t,e),n)}function Hh(){}function mw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gw(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function vw(e,t,n){return Wi&21?(Tn(n,t)||(n=S1(),Re.lanes|=n,qi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=n)}function UE(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=yd.transition;yd.transition={};try{e(!1),t()}finally{he=n,yd.transition=r}}function yw(){return cn().memoizedState}function HE(e,t,n){var r=Gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xw(e))ww(t,n);else if(n=ew(e,t,n,r),n!==null){var i=wt();Cn(n,e,r,i),bw(n,t,r)}}function WE(e,t,n){var r=Gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xw(e))ww(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,Fh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=ew(e,t,i,r),n!==null&&(i=wt(),Cn(n,e,r,i),bw(n,t,r))}}function xw(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function ww(e,t){Jo=ju=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bh(e,n)}}var Ru={readContext:un,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},qE={readContext:un,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:fv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ql(4194308,4,pw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ql(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ql(4,2,e,t)},useMemo:function(e,t){var n=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=HE.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:dv,useDebugValue:Hh,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=dv(!1),t=e[0];return e=UE.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,i=Dn();if(Ee){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Xe===null)throw Error(L(349));Wi&30||sw(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,fv(aw.bind(null,r,s,e),[e]),r.flags|=2048,Ta(9,ow.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Dn(),t=Xe.identifierPrefix;if(Ee){var n=sr,r=ir;n=(r&~(1<<32-kn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ka++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=VE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},GE={readContext:un,useCallback:mw,useContext:un,useEffect:Uh,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:xd,useRef:cw,useState:function(){return xd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return vw(t,Ue.memoizedState,e)},useTransition:function(){var e=xd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:rw,useSyncExternalStore:iw,useId:yw,unstable_isNewReconciler:!1},QE={readContext:un,useCallback:mw,useContext:un,useEffect:Uh,useImperativeHandle:hw,useInsertionEffect:dw,useLayoutEffect:fw,useMemo:gw,useReducer:wd,useRef:cw,useState:function(){return wd(Ca)},useDebugValue:Hh,useDeferredValue:function(e){var t=cn();return Ue===null?t.memoizedState=e:vw(t,Ue.memoizedState,e)},useTransition:function(){var e=wd(Ca)[0],t=cn().memoizedState;return[e,t]},useMutableSource:rw,useSyncExternalStore:iw,useId:yw,unstable_isNewReconciler:!1};function vn(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Nf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uc={isMounted:function(e){return(e=e._reactInternals)?Ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Gr(e),s=ar(r,i);s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(Cn(t,e,i,r),ql(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),i=Gr(e),s=ar(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Wr(e,s,i),t!==null&&(Cn(t,e,i,r),ql(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=Gr(e),i=ar(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wr(e,i,r),t!==null&&(Cn(t,e,r,n),ql(t,e,r))}};function pv(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!va(n,r)||!va(i,s):!0}function Sw(e,t,n){var r=!1,i=ti,s=t.contextType;return typeof s=="object"&&s!==null?s=un(s):(i=Dt(t)?Ui:mt.current,r=t.contextTypes,s=(r=r!=null)?io(e,i):ti),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function hv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function Lf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Nh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=un(s):(s=Dt(t)?Ui:mt.current,i.context=io(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Nf(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&uc.enqueueReplaceState(i,i.state,null),_u(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lo(e,t){try{var n="",r=t;do n+=ST(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
39
|
Error generating stack: `+s.message+`
|
|
40
|
-
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function bd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function If(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var YE=typeof WeakMap=="function"?WeakMap:Map;function kw(e,t,n){n=ar(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ou||(Ou=!0,Qf=r),If(e,t)},n}function Cw(e,t,n){n=ar(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){If(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){If(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function mv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new YE;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=u_.bind(null,e,t,n),t.then(e,e))}function gv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function vv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ar(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var KE=hr.ReactCurrentOwner,At=!1;function yt(e,t,n,r){t.child=e===null?J1(t,null,n,r):oo(t,e.child,n,r)}function yv(e,t,n,r,i){n=n.render;var s=t.ref;return Bs(t,i),r=zh(e,t,n,r,s,i),n=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&n&&jh(t),t.flags|=1,yt(e,t,r,i),t.child)}function xv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Tw(e,t,s,r,i)):(e=Zl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:va,n(o,r)&&e.ref===t.ref)return fr(e,t,i)}return t.flags|=1,e=Qr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Tw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(va(s,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(At=!0);else return t.lanes=e.lanes,fr(e,t,i)}return $f(e,t,n,r,i)}function Ew(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(js,$t),$t|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(js,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,we(js,$t),$t|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,we(js,$t),$t|=r;return yt(e,t,i,n),t.child}function _w(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $f(e,t,n,r,i){var s=Dt(n)?Ui:mt.current;return s=io(t,s),Bs(t,i),n=zh(e,t,n,r,s,i),r=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&r&&jh(t),t.flags|=1,yt(e,t,n,i),t.child)}function wv(e,t,n,r,i){if(Dt(n)){var s=!0;Su(t)}else s=!1;if(Bs(t,i),t.stateNode===null)Yl(e,t),Sw(t,n,r),Lf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=un(c):(c=Dt(n)?Ui:mt.current,c=io(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&hv(t,o,r,c),Cr=!1;var f=t.memoizedState;o.state=f,_u(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Ot.current||Cr?(typeof d=="function"&&(Nf(t,n,d,r),l=t.memoizedState),(a=Cr||pv(t,n,a,r,f,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,tw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:vn(t.type,a),o.props=c,u=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=un(l):(l=Dt(n)?Ui:mt.current,l=io(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&hv(t,o,r,l),Cr=!1,f=t.memoizedState,o.state=f,_u(t,r,o,i);var m=t.memoizedState;a!==u||f!==m||Ot.current||Cr?(typeof h=="function"&&(Nf(t,n,h,r),m=t.memoizedState),(c=Cr||pv(t,n,c,r,f,m,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Bf(e,t,n,r,s,i)}function Bf(e,t,n,r,i,s){_w(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&sv(t,n,!1),fr(e,t,s);r=t.stateNode,KE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=oo(t,e.child,null,s),t.child=oo(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&sv(t,n,!0),t.child}function Pw(e){var t=e.stateNode;t.pendingContext?iv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&iv(e,t.context,!1),Lh(e,t.containerInfo)}function bv(e,t,n,r,i){return so(),Ah(i),t.flags|=256,yt(e,t,n,r),t.child}var zf={dehydrated:null,treeContext:null,retryLane:0};function Vf(e){return{baseLanes:e,cachePool:null,transitions:null}}function jw(e,t,n){var r=t.pendingProps,i=Pe.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),we(Pe,i&1),e===null)return Mf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=fc(o,r,0,null),e=$i(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Vf(n),t.memoizedState=zf,e):Wh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return XE(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Qr(a,s):(s=$i(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Vf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=zf,r}return s=e.child,e=s.sibling,r=Qr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Wh(e,t){return t=fc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cl(e,t,n,r){return r!==null&&Ah(r),oo(t,e.child,null,n),e=Wh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function XE(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=bd(Error(L(422))),Cl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=fc({mode:"visible",children:r.children},i,0,null),s=$i(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&oo(t,e.child,null,o),t.child.memoizedState=Vf(o),t.memoizedState=zf,s);if(!(t.mode&1))return Cl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(L(419)),r=bd(s,r,void 0),Cl(e,t,o,r)}if(a=(o&e.childLanes)!==0,At||a){if(r=Xe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,dr(e,i),Cn(r,e,i,-1))}return Xh(),r=bd(Error(L(421))),Cl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=c_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Bt=Hr(i.nextSibling),Ut=t,Ee=!0,bn=null,e!==null&&(tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Hi,ir=e.id,sr=e.overflow,Hi=t),t=Wh(t,r.children),t.flags|=4096,t)}function Sv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ff(e.return,t,n)}function Sd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Rw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(yt(e,t,r.children,n),r=Pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sv(e,n,t);else if(e.tag===19)Sv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Pu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Pu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sd(t,!0,n,null,s);break;case"together":Sd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ZE(e,t,n){switch(t.tag){case 3:Pw(t),so();break;case 5:nw(t);break;case 1:Dt(t.type)&&Su(t);break;case 4:Lh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;we(Tu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?jw(e,t,n):(we(Pe,Pe.current&1),e=fr(e,t,n),e!==null?e.sibling:null);we(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),we(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Ew(e,t,n)}return fr(e,t,n)}var Aw,Uf,Ow,Dw;Aw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Uf=function(){};Ow=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ei(zn.current);var s=null;switch(n){case"input":i=df(e,i),r=df(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=hf(e,i),r=hf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wu)}gf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ca.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ca.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ke("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Dw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fo(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function JE(e,t,n){var r=t.pendingProps;switch(Rh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return Dt(t.type)&&bu(),ct(t),null;case 3:return r=t.stateNode,ao(),Te(Ot),Te(mt),$h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bn!==null&&(Xf(bn),bn=null))),Uf(e,t),ct(t),null;case 5:Ih(t);var i=Ei(Sa.current);if(n=t.type,e!==null&&t.stateNode!=null)Ow(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return ct(t),null}if(e=Ei(zn.current),Sl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$n]=t,r[wa]=s,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":Ag(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Dg(r,s),ke("invalid",r)}gf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",""+a]):ca.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ke("scroll",r)}switch(n){case"input":pl(r),Og(r,s,!0);break;case"textarea":pl(r),Mg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=wu)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=a1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[$n]=t,e[wa]=r,Aw(e,t,!1,!1),t.stateNode=e;e:{switch(o=vf(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],e);i=r;break;case"source":ke("error",e),i=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),i=r;break;case"details":ke("toggle",e),i=r;break;case"input":Ag(e,r),i=df(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Dg(e,r),i=hf(e,r),ke("invalid",e);break;default:i=r}gf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?c1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&l1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&da(e,l):typeof l=="number"&&da(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ca.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ke("scroll",e):l!=null&&mh(e,s,l,o))}switch(n){case"input":pl(e),Og(e,r,!1);break;case"textarea":pl(e),Mg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=wu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ct(t),null;case 6:if(e&&t.stateNode!=null)Dw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Ei(Sa.current),Ei(zn.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(s=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:bl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return ct(t),null;case 13:if(Te(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&Bt!==null&&t.mode&1&&!(t.flags&128))X1(),so(),t.flags|=98560,s=!1;else if(s=Sl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(L(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(L(317));s[$n]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ct(t),s=!1}else bn!==null&&(Xf(bn),bn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Pe.current&1?We===0&&(We=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ao(),Uf(e,t),e===null&&ya(t.stateNode.containerInfo),ct(t),null;case 10:return Mh(t.type._context),ct(t),null;case 17:return Dt(t.type)&&bu(),ct(t),null;case 19:if(Te(Pe),s=t.memoizedState,s===null)return ct(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Fo(s,!1);else{if(We!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Pu(e),o!==null){for(t.flags|=128,Fo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>uo&&(t.flags|=128,r=!0,Fo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Pu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return ct(t),null}else 2*$e()-s.renderingStartTime>uo&&n!==1073741824&&(t.flags|=128,r=!0,Fo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,n=Pe.current,we(Pe,r?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return Kh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$t&1073741824&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function e_(e,t){switch(Rh(t),t.tag){case 1:return Dt(t.type)&&bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(),Te(Ot),Te(mt),$h(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ih(t),null;case 13:if(Te(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Pe),null;case 4:return ao(),null;case 10:return Mh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var Tl=!1,pt=!1,t_=typeof WeakSet=="function"?WeakSet:Set,U=null;function Ps(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function Hf(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var kv=!1;function n_(e,t){if(_f=vu,e=I1(),Ph(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)f=u,u=h;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(h=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pf={focusedElem:e,selectionRange:n},vu=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var p=m.memoizedProps,b=m.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:vn(t.type,p),b);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(k){Fe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return m=kv,kv=!1,m}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Hf(t,n,s)}i=i.next}while(i!==r)}}function cc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Wf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mw(e){var t=e.alternate;t!==null&&(e.alternate=null,Mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[wa],delete t[Af],delete t[IE],delete t[$E])),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 Fw(e){return e.tag===5||e.tag===3||e.tag===4}function Cv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wu));else if(r!==4&&(e=e.child,e!==null))for(qf(e,t,n),e=e.sibling;e!==null;)qf(e,t,n),e=e.sibling}function Gf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}var rt=null,xn=!1;function wr(e,t,n){for(n=n.child;n!==null;)Nw(e,t,n),n=n.sibling}function Nw(e,t,n){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(nc,n)}catch{}switch(n.tag){case 5:pt||Ps(n,t);case 6:var r=rt,i=xn;rt=null,wr(e,t,n),rt=r,xn=i,rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?md(e.parentNode,n):e.nodeType===1&&md(e,n),ma(e)):md(rt,n.stateNode));break;case 4:r=rt,i=xn,rt=n.stateNode.containerInfo,xn=!0,wr(e,t,n),rt=r,xn=i;break;case 0:case 11:case 14:case 15:if(!pt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hf(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!pt&&(Ps(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Fe(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(pt=(r=pt)||n.memoizedState!==null,wr(e,t,n),pt=r):wr(e,t,n);break;default:wr(e,t,n)}}function Tv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new t_),t.forEach(function(r){var i=d_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:rt=a.stateNode,xn=!1;break e;case 3:rt=a.stateNode.containerInfo,xn=!0;break e;case 4:rt=a.stateNode.containerInfo,xn=!0;break e}a=a.return}if(rt===null)throw Error(L(160));Nw(s,o,i),rt=null,xn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Fe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lw(t,e),t=t.sibling}function Lw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),Rn(e),r&4){try{ea(3,e,e.return),cc(3,e)}catch(p){Fe(e,e.return,p)}try{ea(5,e,e.return)}catch(p){Fe(e,e.return,p)}}break;case 1:hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return);break;case 5:if(hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return),e.flags&32){var i=e.stateNode;try{da(i,"")}catch(p){Fe(e,e.return,p)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&s1(i,s),vf(a,o);var c=vf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?c1(i,u):d==="dangerouslySetInnerHTML"?l1(i,u):d==="children"?da(i,u):mh(i,d,u,c)}switch(a){case"input":ff(i,s);break;case"textarea":o1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Ns(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[wa]=s}catch(p){Fe(e,e.return,p)}}break;case 6:if(hn(t,e),Rn(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(p){Fe(e,e.return,p)}}break;case 3:if(hn(t,e),Rn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(p){Fe(e,e.return,p)}break;case 4:hn(t,e),Rn(e);break;case 13:hn(t,e),Rn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=$e())),r&4&&Tv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(pt=(c=pt)||d,hn(t,e),pt=c):hn(t,e),Rn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(U=e,d=e.child;d!==null;){for(u=U=d;U!==null;){switch(f=U,h=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:Ps(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(p){Fe(r,n,p)}}break;case 5:Ps(f,f.return);break;case 22:if(f.memoizedState!==null){_v(u);continue}}h!==null?(h.return=f,U=h):_v(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=u1("display",o))}catch(p){Fe(e,e.return,p)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(p){Fe(e,e.return,p)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:hn(t,e),Rn(e),r&4&&Tv(e);break;case 21:break;default:hn(t,e),Rn(e)}}function Rn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fw(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(da(i,""),r.flags&=-33);var s=Cv(e);Gf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Cv(e);qf(e,a,o);break;default:throw Error(L(161))}}catch(l){Fe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function r_(e,t,n){U=e,Iw(e)}function Iw(e,t,n){for(var r=(e.mode&1)!==0;U!==null;){var i=U,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Tl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||pt;a=Tl;var c=pt;if(Tl=o,(pt=l)&&!c)for(U=i;U!==null;)o=U,l=o.child,o.tag===22&&o.memoizedState!==null?Pv(i):l!==null?(l.return=o,U=l):Pv(i);for(;s!==null;)U=s,Iw(s),s=s.sibling;U=i,Tl=a,pt=c}Ev(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,U=s):Ev(e)}}function Ev(e){for(;U!==null;){var t=U;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||cc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!pt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&cv(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&ma(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}pt||t.flags&512&&Wf(t)}catch(f){Fe(t,t.return,f)}}if(t===e){U=null;break}if(n=t.sibling,n!==null){n.return=t.return,U=n;break}U=t.return}}function _v(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var n=t.sibling;if(n!==null){n.return=t.return,U=n;break}U=t.return}}function Pv(e){for(;U!==null;){var t=U;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{cc(4,t)}catch(l){Fe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Fe(t,i,l)}}var s=t.return;try{Wf(t)}catch(l){Fe(t,s,l)}break;case 5:var o=t.return;try{Wf(t)}catch(l){Fe(t,o,l)}}}catch(l){Fe(t,t.return,l)}if(t===e){U=null;break}var a=t.sibling;if(a!==null){a.return=t.return,U=a;break}U=t.return}}var i_=Math.ceil,Au=hr.ReactCurrentDispatcher,qh=hr.ReactCurrentOwner,an=hr.ReactCurrentBatchConfig,de=0,Xe=null,Be=null,ot=0,$t=0,js=oi(0),We=0,Ea=null,qi=0,dc=0,Gh=0,ta=null,jt=null,Qh=0,uo=1/0,er=null,Ou=!1,Qf=null,qr=null,El=!1,Ir=null,Du=0,na=0,Yf=null,Kl=-1,Xl=0;function wt(){return de&6?$e():Kl!==-1?Kl:Kl=$e()}function Gr(e){return e.mode&1?de&2&&ot!==0?ot&-ot:zE.transition!==null?(Xl===0&&(Xl=S1()),Xl):(e=he,e!==0||(e=window.event,e=e===void 0?16:j1(e.type)),e):1}function Cn(e,t,n,r){if(50<na)throw na=0,Yf=null,Error(L(185));Ga(e,n,r),(!(de&2)||e!==Xe)&&(e===Xe&&(!(de&2)&&(dc|=n),We===4&&_r(e,ot)),Mt(e,r),n===1&&de===0&&!(t.mode&1)&&(uo=$e()+500,ac&&ai()))}function Mt(e,t){var n=e.callbackNode;zT(e,t);var r=gu(e,e===Xe?ot:0);if(r===0)n!==null&&Lg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lg(n),t===1)e.tag===0?BE(jv.bind(null,e)):Q1(jv.bind(null,e)),NE(function(){!(de&6)&&ai()}),n=null;else{switch(k1(r)){case 1:n=wh;break;case 4:n=w1;break;case 16:n=mu;break;case 536870912:n=b1;break;default:n=mu}n=qw(n,$w.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $w(e,t){if(Kl=-1,Xl=0,de&6)throw Error(L(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=gu(e,e===Xe?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Mu(e,r);else{t=r;var i=de;de|=2;var s=zw();(Xe!==e||ot!==t)&&(er=null,uo=$e()+500,Ii(e,t));do try{a_();break}catch(a){Bw(e,a)}while(!0);Dh(),Au.current=s,de=i,Be!==null?t=0:(Xe=null,ot=0,t=We)}if(t!==0){if(t===2&&(i=Sf(e),i!==0&&(r=i,t=Kf(e,i))),t===1)throw n=Ea,Ii(e,0),_r(e,r),Mt(e,$e()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!s_(i)&&(t=Mu(e,r),t===2&&(s=Sf(e),s!==0&&(r=s,t=Kf(e,s))),t===1))throw n=Ea,Ii(e,0),_r(e,r),Mt(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:yi(e,jt,er);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Qh+500-$e(),10<t)){if(gu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Rf(yi.bind(null,e,jt,er),t);break}yi(e,jt,er);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-kn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*i_(r/1960))-r,10<r){e.timeoutHandle=Rf(yi.bind(null,e,jt,er),r);break}yi(e,jt,er);break;case 5:yi(e,jt,er);break;default:throw Error(L(329))}}}return Mt(e,$e()),e.callbackNode===n?$w.bind(null,e):null}function Kf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(Ii(e,t).flags|=256),e=Mu(e,t),e!==2&&(t=jt,jt=n,t!==null&&Xf(t)),e}function Xf(e){jt===null?jt=e:jt.push.apply(jt,e)}function s_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Tn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _r(e,t){for(t&=~Gh,t&=~dc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kn(t),r=1<<n;e[n]=-1,t&=~r}}function jv(e){if(de&6)throw Error(L(327));zs();var t=gu(e,0);if(!(t&1))return Mt(e,$e()),null;var n=Mu(e,t);if(e.tag!==0&&n===2){var r=Sf(e);r!==0&&(t=r,n=Kf(e,r))}if(n===1)throw n=Ea,Ii(e,0),_r(e,t),Mt(e,$e()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yi(e,jt,er),Mt(e,$e()),null}function Yh(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(uo=$e()+500,ac&&ai())}}function Gi(e){Ir!==null&&Ir.tag===0&&!(de&6)&&zs();var t=de;de|=1;var n=an.transition,r=he;try{if(an.transition=null,he=1,e)return e()}finally{he=r,an.transition=n,de=t,!(de&6)&&ai()}}function Kh(){$t=js.current,Te(js)}function Ii(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,FE(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(Rh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bu();break;case 3:ao(),Te(Ot),Te(mt),$h();break;case 5:Ih(r);break;case 4:ao();break;case 13:Te(Pe);break;case 19:Te(Pe);break;case 10:Mh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Xe=e,Be=e=Qr(e.current,null),ot=$t=t,We=0,Ea=null,Gh=dc=qi=0,jt=ta=null,Ti!==null){for(t=0;t<Ti.length;t++)if(n=Ti[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ti=null}return e}function Bw(e,t){do{var n=Be;try{if(Dh(),Gl.current=Ru,ju){for(var r=Re.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ju=!1}if(Wi=0,Ke=Ue=Re=null,Jo=!1,ka=0,qh.current=null,n===null||n.return===null){We=1,Ea=t,Be=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=gv(o);if(h!==null){h.flags&=-257,vv(h,o,a,s,t),h.mode&1&&mv(s,c,t),t=h,l=c;var m=t.updateQueue;if(m===null){var p=new Set;p.add(l),t.updateQueue=p}else m.add(l);break e}else{if(!(t&1)){mv(s,c,t),Xh();break e}l=Error(L(426))}}else if(Ee&&a.mode&1){var b=gv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),vv(b,o,a,s,t),Ah(lo(l,a));break e}}s=l=lo(l,a),We!==4&&(We=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=kw(s,l,t);uv(s,g);break e;case 1:a=l;var w=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(qr===null||!qr.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var k=Cw(s,a,t);uv(s,k);break e}}s=s.return}while(s!==null)}Uw(n)}catch(T){t=T,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function zw(){var e=Au.current;return Au.current=Ru,e===null?Ru:e}function Xh(){(We===0||We===3||We===2)&&(We=4),Xe===null||!(qi&268435455)&&!(dc&268435455)||_r(Xe,ot)}function Mu(e,t){var n=de;de|=2;var r=zw();(Xe!==e||ot!==t)&&(er=null,Ii(e,t));do try{o_();break}catch(i){Bw(e,i)}while(!0);if(Dh(),de=n,Au.current=r,Be!==null)throw Error(L(261));return Xe=null,ot=0,We}function o_(){for(;Be!==null;)Vw(Be)}function a_(){for(;Be!==null&&!OT();)Vw(Be)}function Vw(e){var t=Ww(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Uw(e):Be=t,qh.current=null}function Uw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=e_(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,Be=null;return}}else if(n=JE(n,t,$t),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);We===0&&(We=5)}function yi(e,t,n){var r=he,i=an.transition;try{an.transition=null,he=1,l_(e,t,n,r)}finally{an.transition=i,he=r}return null}function l_(e,t,n,r){do zs();while(Ir!==null);if(de&6)throw Error(L(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(VT(e,s),e===Xe&&(Be=Xe=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||El||(El=!0,qw(mu,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=an.transition,an.transition=null;var o=he;he=1;var a=de;de|=4,qh.current=null,n_(e,n),Lw(n,e),PE(Pf),vu=!!_f,Pf=_f=null,e.current=n,r_(n),DT(),de=a,he=o,an.transition=s}else e.current=n;if(El&&(El=!1,Ir=e,Du=i),s=e.pendingLanes,s===0&&(qr=null),NT(n.stateNode),Mt(e,$e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ou)throw Ou=!1,e=Qf,Qf=null,e;return Du&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Yf?na++:(na=0,Yf=e):na=0,ai(),null}function zs(){if(Ir!==null){var e=k1(Du),t=an.transition,n=he;try{if(an.transition=null,he=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,Du=0,de&6)throw Error(L(331));var i=de;for(de|=4,U=e.current;U!==null;){var s=U,o=s.child;if(U.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(U=c;U!==null;){var d=U;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var u=d.child;if(u!==null)u.return=d,U=u;else for(;U!==null;){d=U;var f=d.sibling,h=d.return;if(Mw(d),d===c){U=null;break}if(f!==null){f.return=h,U=f;break}U=h}}}var m=s.alternate;if(m!==null){var p=m.child;if(p!==null){m.child=null;do{var b=p.sibling;p.sibling=null,p=b}while(p!==null)}}U=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,U=o;else e:for(;U!==null;){if(s=U,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,U=g;break e}U=s.return}}var w=e.current;for(U=w;U!==null;){o=U;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,U=x;else e:for(o=w;U!==null;){if(a=U,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:cc(9,a)}}catch(T){Fe(a,a.return,T)}if(a===o){U=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,U=k;break e}U=a.return}}if(de=i,ai(),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(nc,e)}catch{}r=!0}return r}finally{he=n,an.transition=t}}return!1}function Rv(e,t,n){t=lo(n,t),t=kw(e,t,1),e=Wr(e,t,1),t=wt(),e!==null&&(Ga(e,1,t),Mt(e,t))}function Fe(e,t,n){if(e.tag===3)Rv(e,e,n);else for(;t!==null;){if(t.tag===3){Rv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=lo(n,e),e=Cw(t,e,1),t=Wr(t,e,1),e=wt(),t!==null&&(Ga(t,1,e),Mt(t,e));break}}t=t.return}}function u_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(ot&n)===n&&(We===4||We===3&&(ot&130023424)===ot&&500>$e()-Qh?Ii(e,0):Gh|=n),Mt(e,t)}function Hw(e,t){t===0&&(e.mode&1?(t=gl,gl<<=1,!(gl&130023424)&&(gl=4194304)):t=1);var n=wt();e=dr(e,t),e!==null&&(Ga(e,t,n),Mt(e,n))}function c_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hw(e,n)}function d_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Hw(e,n)}var Ww;Ww=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ot.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,ZE(e,t,n);At=!!(e.flags&131072)}else At=!1,Ee&&t.flags&1048576&&Y1(t,Cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var i=io(t,mt.current);Bs(t,n),i=zh(null,t,r,e,i,n);var s=Vh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dt(r)?(s=!0,Su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Nh(t),i.updater=uc,t.stateNode=i,i._reactInternals=t,Lf(t,r,e,n),t=Bf(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&jh(t),yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=p_(r),e=vn(r,e),i){case 0:t=$f(null,t,r,e,n);break e;case 1:t=wv(null,t,r,e,n);break e;case 11:t=yv(null,t,r,e,n);break e;case 14:t=xv(null,t,r,vn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),$f(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),wv(e,t,r,i,n);case 3:e:{if(Pw(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,tw(e,t),_u(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=lo(Error(L(423)),t),t=bv(e,t,r,n,i);break e}else if(r!==i){i=lo(Error(L(424)),t),t=bv(e,t,r,n,i);break e}else for(Bt=Hr(t.stateNode.containerInfo.firstChild),Ut=t,Ee=!0,bn=null,n=J1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===i){t=fr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return nw(t),e===null&&Mf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,jf(r,i)?o=null:s!==null&&jf(r,s)&&(t.flags|=32),_w(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Mf(t),null;case 13:return jw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),yv(e,t,r,i,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,we(Tu,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!Ot.current){t=fr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=ar(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ff(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ff(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bs(t,n),i=un(i),r=r(i),t.flags|=1,yt(e,t,r,n),t.child;case 14:return r=t.type,i=vn(r,t.pendingProps),i=vn(r.type,i),xv(e,t,r,i,n);case 15:return Tw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Yl(e,t),t.tag=1,Dt(r)?(e=!0,Su(t)):e=!1,Bs(t,n),Sw(t,r,i),Lf(t,r,i,n),Bf(null,t,r,!0,e,n);case 19:return Rw(e,t,n);case 22:return Ew(e,t,n)}throw Error(L(156,t.tag))};function qw(e,t){return x1(e,t)}function f_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,n,r){return new f_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function p_(e){if(typeof e=="function")return Zh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===yh)return 14}return 2}function Qr(e,t){var n=e.alternate;return n===null?(n=sn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Zh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xs:return $i(n.children,i,s,t);case gh:o=8,i|=8;break;case af:return e=sn(12,n,t,i|2),e.elementType=af,e.lanes=s,e;case lf:return e=sn(13,n,t,i),e.elementType=lf,e.lanes=s,e;case uf:return e=sn(19,n,t,i),e.elementType=uf,e.lanes=s,e;case n1:return fc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case e1:o=10;break e;case t1:o=9;break e;case vh:o=11;break e;case yh:o=14;break e;case kr:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=sn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function $i(e,t,n,r){return e=sn(7,e,r,t),e.lanes=n,e}function fc(e,t,n,r){return e=sn(22,e,r,t),e.elementType=n1,e.lanes=n,e.stateNode={isHidden:!1},e}function kd(e,t,n){return e=sn(6,e,null,t),e.lanes=n,e}function Cd(e,t,n){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function h_(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=id(0),this.expirationTimes=id(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jh(e,t,n,r,i,s,o,a,l){return e=new h_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=sn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(s),e}function m_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ys,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gw(e){if(!e)return ti;e=e._reactInternals;e:{if(Ji(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(Dt(n))return G1(e,n,t)}return t}function Qw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Gw(null),n=e.current,r=wt(),i=Gr(n),s=ar(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Ga(e,i,r),Mt(e,r),e}function pc(e,t,n,r){var i=t.current,s=wt(),o=Gr(i);return n=Gw(n),t.context===null?t.context=n:t.pendingContext=n,t=ar(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(Cn(e,i,o,s),ql(e,i,o)),o}function Fu(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 Av(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){Av(e,t),(e=e.alternate)&&Av(e,t)}function g_(){return null}var Yw=typeof reportError=="function"?reportError:function(e){console.error(e)};function tm(e){this._internalRoot=e}hc.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));pc(e,t,null,null)};hc.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gi(function(){pc(null,e,null,null)}),t[cr]=null}};function hc(e){this._internalRoot=e}hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=E1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Er.length&&t!==0&&t<Er[n].priority;n++);Er.splice(n,0,e),n===0&&P1(e)}};function nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function mc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ov(){}function v_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Fu(o);s.call(c)}}var o=Qw(t,r,e,0,null,!1,!1,"",Ov);return e._reactRootContainer=o,e[cr]=o.current,ya(e.nodeType===8?e.parentNode:e),Gi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Fu(l);a.call(c)}}var l=Jh(e,0,!1,null,null,!1,!1,"",Ov);return e._reactRootContainer=l,e[cr]=l.current,ya(e.nodeType===8?e.parentNode:e),Gi(function(){pc(t,l,n,r)}),l}function gc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Fu(o);a.call(l)}}pc(t,o,e,i)}else o=v_(n,t,e,i,r);return Fu(o)}C1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vo(t.pendingLanes);n!==0&&(bh(t,n|1),Mt(t,$e()),!(de&6)&&(uo=$e()+500,ai()))}break;case 13:Gi(function(){var r=dr(e,1);if(r!==null){var i=wt();Cn(r,e,1,i)}}),em(e,1)}};Sh=function(e){if(e.tag===13){var t=dr(e,134217728);if(t!==null){var n=wt();Cn(t,e,134217728,n)}em(e,134217728)}};T1=function(e){if(e.tag===13){var t=Gr(e),n=dr(e,t);if(n!==null){var r=wt();Cn(n,e,t,r)}em(e,t)}};E1=function(){return he};_1=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};xf=function(e,t,n){switch(t){case"input":if(ff(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=oc(r);if(!i)throw Error(L(90));i1(r),ff(r,i)}}}break;case"textarea":o1(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};p1=Yh;h1=Gi;var y_={usingClientEntryPoint:!1,Events:[Ya,ks,oc,d1,f1,Yh]},No={findFiberByHostInstance:Ci,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},x_={bundleType:No.bundleType,version:No.version,rendererPackageName:No.rendererPackageName,rendererConfig:No.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=v1(e),e===null?null:e.stateNode},findFiberByHostInstance:No.findFiberByHostInstance||g_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{nc=_l.inject(x_),Bn=_l}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y_;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(L(200));return m_(e,t,null,n)};Wt.createRoot=function(e,t){if(!nm(e))throw Error(L(299));var n=!1,r="",i=Yw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,!1,r,i),e[cr]=t.current,ya(e.nodeType===8?e.parentNode:e),new tm(t)};Wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=v1(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Gi(e)};Wt.hydrate=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Yw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Qw(t,null,e,1,n??null,i,!1,s,o),e[cr]=t.current,ya(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new hc(t)};Wt.render=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!mc(e))throw Error(L(40));return e._reactRootContainer?(Gi(function(){gc(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};Wt.unstable_batchedUpdates=Yh;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!mc(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return gc(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function Kw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kw)}catch(e){console.error(e)}}Kw(),Kx.exports=Wt;var Xw=Kx.exports;const w_=Xi(Xw);var Zw,Dv=Xw;Zw=Dv.createRoot,Dv.hydrateRoot;const b_="@alfatech/livechat",S_="v2025.10.21.2",k_="module",C_="https://api-live.alfatek.dev",T_="wss://api-live.alfatek.dev",E_=["dist","README.md","component/chatier.js"],__="dist/widget.js",P_={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"},j_={"@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"},R_={"@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"},Jw={name:b_,private:!1,version:S_,type:k_,apiURL:C_,wsURL:T_,files:E_,main:__,scripts:P_,dependencies:j_,devDependencies:R_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},A_=Jw.apiURL,O_=Jw.wsURL,D_=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],M_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],F_={429:D_,404:M_};async function bo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${A_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=F_[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const vc=e=>[200,201,204].includes(e),N_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var So=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qi=typeof window>"u"||"Deno"in globalThis;function en(){}function L_(e,t){return typeof e=="function"?e(t):e}function Zf(e){return typeof e=="number"&&e>=0&&e!==1/0}function eb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Mv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==rm(o,t.options))return!1}else if(!_a(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Fv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Yi(t.options.mutationKey)!==Yi(s))return!1}else if(!_a(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function rm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Yi)(e)}function Yi(e){return JSON.stringify(e,(t,n)=>Jf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function _a(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!_a(e[n],t[n])):!1}function tb(e,t){if(e===t)return e;const n=Nv(e)&&Nv(t);if(n||Jf(e)&&Jf(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=tb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Nu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Nv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jf(e){if(!Lv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Lv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lv(e){return Object.prototype.toString.call(e)==="[object Object]"}function I_(e){return new Promise(t=>{setTimeout(t,e)})}function ep(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?tb(e,t):t}function $_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function B_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function nb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===im?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Hs,jx,z_=(jx=class extends So{constructor(){super();Z(this,Ai);Z(this,Pr);Z(this,Hs);V(this,Hs,t=>{if(!Qi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),V(this,Pr,void 0))}setEventListener(t){var n;V(this,Hs,t),(n=S(this,Pr))==null||n.call(this),V(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&(V(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Hs=new WeakMap,jx),sm=new z_,Ws,jr,qs,Rx,V_=(Rx=class extends So{constructor(){super();Z(this,Ws,!0);Z(this,jr);Z(this,qs);V(this,qs,t=>{if(!Qi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,jr)||this.setEventListener(S(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),V(this,jr,void 0))}setEventListener(t){var n;V(this,qs,t),(n=S(this,jr))==null||n.call(this),V(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Ws)!==t&&(V(this,Ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Ws)}},Ws=new WeakMap,jr=new WeakMap,qs=new WeakMap,Rx),Lu=new V_;function tp(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function U_(e){return Math.min(1e3*2**e,3e4)}function rb(e){return(e??"online")==="online"?Lu.isOnline():!0}var ib=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Td(e){return e instanceof ib}function sb(e){let t=!1,n=0,r=!1,i;const s=tp(),o=p=>{var b;r||(f(new ib(p)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sm.isFocused()&&(e.networkMode==="always"||Lu.isOnline())&&e.canRun(),d=()=>rb(e.networkMode)&&e.canRun(),u=p=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,p),i==null||i(),s.resolve(p))},f=p=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,p),i==null||i(),s.reject(p))},h=()=>new Promise(p=>{var b;i=g=>{(r||c())&&p(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var p;i=void 0,r||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(r)return;let p;const b=n===0?e.initialPromise:void 0;try{p=b??e.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(u).catch(g=>{var E;if(r)return;const w=e.retry??(Qi?0:3),x=e.retryDelay??U_,k=typeof x=="function"?x(n,g):x,T=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,g);if(t||!T){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),I_(k).then(()=>c()?void 0:h()).then(()=>{t?f(g):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?m():h().then(m),s)}}function H_(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var He=H_(),Oi,Ax,ob=(Ax=class{constructor(){Z(this,Oi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&V(this,Oi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Oi)&&(clearTimeout(S(this,Oi)),V(this,Oi,void 0))}},Oi=new WeakMap,Ax),Gs,Qs,Jt,dt,Va,Di,yn,Jn,Ox,W_=(Ox=class extends ob{constructor(t){super();Z(this,yn);Z(this,Gs);Z(this,Qs);Z(this,Jt);Z(this,dt);Z(this,Va);Z(this,Di);V(this,Di,!1),V(this,Va,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,Jt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,Gs,q_(this.options)),this.state=t.state??S(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,dt))==null?void 0:t.promise}setOptions(t){this.options={...S(this,Va),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Jt).remove(this)}setData(t,n){const r=ep(this.state.data,t,this.options);return se(this,yn,Jn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,yn,Jn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,dt))==null?void 0:r.promise;return(i=S(this,dt))==null||i.cancel(t),n?n.then(en).catch(en):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Gs))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===im||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!eb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,dt)&&(S(this,Di)?S(this,dt).cancel({revert:!0}):S(this,dt).cancelRetry()),this.scheduleGc()),S(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,yn,Jn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,dt))return S(this,dt).continueRetry(),S(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(V(this,Di,!0),r.signal)})},s=()=>{const u=nb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),V(this,Di,!1),this.options.persister?this.options.persister(u,f,this):u(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),V(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&se(this,yn,Jn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,h,m,p;Td(u)&&u.silent||se(this,yn,Jn).call(this,{type:"error",error:u}),Td(u)||((h=(f=S(this,Jt).config).onError)==null||h.call(f,u,this),(p=(m=S(this,Jt).config).onSettled)==null||p.call(m,this.state.data,u,this)),this.scheduleGc()};return V(this,dt,sb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,h,m,p;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(h=(f=S(this,Jt).config).onSuccess)==null||h.call(f,u,this),(p=(m=S(this,Jt).config).onSettled)==null||p.call(m,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{se(this,yn,Jn).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{se(this,yn,Jn).call(this,{type:"pause"})},onContinue:()=>{se(this,yn,Jn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,dt).start()}},Gs=new WeakMap,Qs=new WeakMap,Jt=new WeakMap,dt=new WeakMap,Va=new WeakMap,Di=new WeakMap,yn=new WeakSet,Jn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ab(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Td(i)&&i.revert&&S(this,Qs)?{...S(this,Qs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Jt).notify({query:this,type:"updated",action:t})})},Ox);function ab(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Fn,Dx,G_=(Dx=class extends So{constructor(t={}){super();Z(this,Fn);this.config=t,V(this,Fn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??rm(i,n);let o=this.get(s);return o||(o=new W_({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(){He.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=>Mv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Mv(t,r)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fn=new WeakMap,Dx),Nn,gt,Mi,Ln,br,Mx,Q_=(Mx=class extends ob{constructor(t){super();Z(this,Ln);Z(this,Nn);Z(this,gt);Z(this,Mi);this.mutationId=t.mutationId,V(this,gt,t.mutationCache),V(this,Nn,[]),this.state=t.state||lb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Mi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,h,m,p,b,g,w,x,k,T,E,_;V(this,Mi,sb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,P)=>{se(this,Ln,br).call(this,{type:"failed",failureCount:j,error:P})},onPause:()=>{se(this,Ln,br).call(this,{type:"pause"})},onContinue:()=>{se(this,Ln,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Mi).canStart();try{if(!n){se(this,Ln,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,gt).config).onMutate)==null?void 0:s.call(i,t,this));const P=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));P!==this.state.context&&se(this,Ln,br).call(this,{type:"pending",context:P,variables:t,isPaused:r})}const j=await S(this,Mi).start();return await((c=(l=S(this,gt).config).onSuccess)==null?void 0:c.call(l,j,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,j,t,this.state.context)),await((h=(f=S(this,gt).config).onSettled)==null?void 0:h.call(f,j,null,this.state.variables,this.state.context,this)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,j,null,t,this.state.context)),se(this,Ln,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(b=S(this,gt).config).onError)==null?void 0:g.call(b,j,t,this.state.context,this)),await((x=(w=this.options).onError)==null?void 0:x.call(w,j,t,this.state.context)),await((T=(k=S(this,gt).config).onSettled)==null?void 0:T.call(k,void 0,j,this.state.variables,this.state.context,this)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,void 0,j,t,this.state.context)),j}finally{se(this,Ln,br).call(this,{type:"error",error:j})}}finally{S(this,gt).runNext(this)}}},Nn=new WeakMap,gt=new WeakMap,Mi=new WeakMap,Ln=new WeakSet,br=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Mx);function lb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var It,Ua,Fx,Y_=(Fx=class extends So{constructor(t={}){super();Z(this,It);Z(this,Ua);this.config=t,V(this,It,new Map),V(this,Ua,Date.now())}build(t,n,r){const i=new Q_({mutationCache:this,mutationId:++cl(this,Ua)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Pl(t),r=S(this,It).get(n)??[];r.push(t),S(this,It).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Pl(t);if(S(this,It).has(n)){const i=(r=S(this,It).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,It).delete(n):S(this,It).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,It).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Fv(n,r))}findAll(t={}){return this.getAll().filter(n=>Fv(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(en))))}},It=new WeakMap,Ua=new WeakMap,Fx);function Pl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Iv(e){return{onFetch:(t,n)=>{var d,u,f,h,m;const r=t.options,i=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let p=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=nb(t.options,t.fetchOptions),w=async(x,k,T)=>{if(p)return Promise.reject();if(k==null&&x.pages.length)return Promise.resolve(x);const E={queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};b(E);const _=await g(E),{maxPages:j}=t.options,P=T?B_:$_;return{pages:P(x.pages,_,j),pageParams:P(x.pageParams,k,j)}};if(i&&s.length){const x=i==="backward",k=x?K_:$v,T={pages:s,pageParams:o},E=k(r,T);a=await w(T,E,x)}else{const x=e??s.length;do{const k=l===0?o[0]??r.initialPageParam:$v(r,a);if(l>0&&k==null)break;a=await w(a,k),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var p,b;return(b=(p=t.options).persister)==null?void 0:b.call(p,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function $v(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function K_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var De,Rr,Ar,Ys,Ks,Or,Xs,Zs,Nx,X_=(Nx=class{constructor(e={}){Z(this,De);Z(this,Rr);Z(this,Ar);Z(this,Ys);Z(this,Ks);Z(this,Or);Z(this,Xs);Z(this,Zs);V(this,De,e.queryCache||new G_),V(this,Rr,e.mutationCache||new Y_),V(this,Ar,e.defaultOptions||{}),V(this,Ys,new Map),V(this,Ks,new Map),V(this,Or,0)}mount(){cl(this,Or)._++,S(this,Or)===1&&(V(this,Xs,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onFocus())})),V(this,Zs,Lu.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onOnline())})))}unmount(){var e,t;cl(this,Or)._--,S(this,Or)===0&&((e=S(this,Xs))==null||e.call(this),V(this,Xs,void 0),(t=S(this,Zs))==null||t.call(this),V(this,Zs,void 0))}isFetching(e){return S(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Rr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=S(this,De).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Vs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,De).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=S(this,De).get(r.queryHash),s=i==null?void 0:i.state.data,o=L_(t,s);if(o!==void 0)return S(this,De).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>S(this,De).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,De);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,De),r={type:"active",...e};return He.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=He.batch(()=>S(this,De).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(en).catch(en)}invalidateQueries(e,t={}){return He.batch(()=>{if(S(this,De).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=He.batch(()=>S(this,De).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(en)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(en)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,De).build(this,t);return n.isStaleByTime(Vs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(en).catch(en)}fetchInfiniteQuery(e){return e.behavior=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lu.isOnline()?S(this,Rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,De)}getMutationCache(){return S(this,Rr)}getDefaultOptions(){return S(this,Ar)}setDefaultOptions(e){V(this,Ar,e)}setQueryDefaults(e,t){S(this,Ys).set(Yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ys).values()],n={};return t.forEach(r=>{_a(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ks).set(Yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ks).values()];let n={};return t.forEach(r=>{_a(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Ar).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=rm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===im&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Ar).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,De).clear(),S(this,Rr).clear()}},De=new WeakMap,Rr=new WeakMap,Ar=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,Or=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Nx),Et,le,Ha,vt,Fi,Js,Dr,In,Wa,eo,to,Ni,Li,Mr,no,pe,Ho,np,rp,ip,sp,op,ap,lp,ub,Lx,Z_=(Lx=class extends So{constructor(t,n){super();Z(this,pe);Z(this,Et);Z(this,le);Z(this,Ha);Z(this,vt);Z(this,Fi);Z(this,Js);Z(this,Dr);Z(this,In);Z(this,Wa);Z(this,eo);Z(this,to);Z(this,Ni);Z(this,Li);Z(this,Mr);Z(this,no,new Set);this.options=n,V(this,Et,t),V(this,In,null),V(this,Dr,tp()),this.options.experimental_prefetchInRender||S(this,Dr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,le).addObserver(this),Bv(S(this,le),this.options)?se(this,pe,Ho).call(this):this.updateResult(),se(this,pe,sp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return up(S(this,le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return up(S(this,le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,pe,op).call(this),se(this,pe,ap).call(this),S(this,le).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,le);if(this.options=S(this,Et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,S(this,le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,pe,lp).call(this),S(this,le).setOptions(this.options),r._defaulted&&!Nu(this.options,r)&&S(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,le),observer:this});const s=this.hasListeners();s&&zv(S(this,le),i,this.options,r)&&se(this,pe,Ho).call(this),this.updateResult(n),s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||Vs(this.options.staleTime,S(this,le))!==Vs(r.staleTime,S(this,le)))&&se(this,pe,np).call(this);const o=se(this,pe,rp).call(this);s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||o!==S(this,Mr))&&se(this,pe,ip).call(this,o)}getOptimisticResult(t){const n=S(this,Et).getQueryCache().build(S(this,Et),t),r=this.createResult(n,t);return e2(this,r)&&(V(this,vt,r),V(this,Js,this.options),V(this,Fi,S(this,le).state)),r}getCurrentResult(){return S(this,vt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){S(this,no).add(t)}getCurrentQuery(){return S(this,le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Et).defaultQueryOptions(t),r=S(this,Et).getQueryCache().build(S(this,Et),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,pe,Ho).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,vt)))}createResult(t,n){var j;const r=S(this,le),i=this.options,s=S(this,vt),o=S(this,Fi),a=S(this,Js),c=t!==r?t.state:S(this,Ha),{state:d}=t;let u={...d},f=!1,h;if(n._optimisticResults){const P=this.hasListeners(),O=!P&&Bv(t,n),$=P&&zv(t,r,n,i);(O||$)&&(u={...u,...ab(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:b}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,Wa))h=S(this,eo);else try{V(this,Wa,n.select),h=n.select(u.data),h=ep(s==null?void 0:s.data,h,n),V(this,eo,h),V(this,In,null)}catch(P){V(this,In,P)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let P;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))P=s.data;else if(P=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,to))==null?void 0:j.state.data,S(this,to)):n.placeholderData,n.select&&P!==void 0)try{P=n.select(P),V(this,In,null)}catch(O){V(this,In,O)}P!==void 0&&(b="success",h=ep(s==null?void 0:s.data,P,n),f=!0)}S(this,In)&&(m=S(this,In),h=S(this,eo),p=Date.now(),b="error");const g=u.fetchStatus==="fetching",w=b==="pending",x=b==="error",k=w&&g,T=h!==void 0,_={status:b,fetchStatus:u.fetchStatus,isPending:w,isSuccess:b==="success",isError:x,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:x&&!T,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&T,isStale:om(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const P=F=>{_.status==="error"?F.reject(_.error):_.data!==void 0&&F.resolve(_.data)},O=()=>{const F=V(this,Dr,_.promise=tp());P(F)},$=S(this,Dr);switch($.status){case"pending":t.queryHash===r.queryHash&&P($);break;case"fulfilled":(_.status==="error"||_.data!==$.value)&&O();break;case"rejected":(_.status!=="error"||_.error!==$.reason)&&O();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,le),this.options);if(V(this,Fi,S(this,le).state),V(this,Js,this.options),S(this,Fi).data!==void 0&&V(this,to,S(this,le)),Nu(r,n))return;V(this,vt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,no).size)return!0;const l=new Set(a??S(this,no));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,vt)).some(c=>{const d=c;return S(this,vt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),se(this,pe,ub).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,sp).call(this)}},Et=new WeakMap,le=new WeakMap,Ha=new WeakMap,vt=new WeakMap,Fi=new WeakMap,Js=new WeakMap,Dr=new WeakMap,In=new WeakMap,Wa=new WeakMap,eo=new WeakMap,to=new WeakMap,Ni=new WeakMap,Li=new WeakMap,Mr=new WeakMap,no=new WeakMap,pe=new WeakSet,Ho=function(t){se(this,pe,lp).call(this);let n=S(this,le).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(en)),n},np=function(){se(this,pe,op).call(this);const t=Vs(this.options.staleTime,S(this,le));if(Qi||S(this,vt).isStale||!Zf(t))return;const r=eb(S(this,vt).dataUpdatedAt,t)+1;V(this,Ni,setTimeout(()=>{S(this,vt).isStale||this.updateResult()},r))},rp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,le)):this.options.refetchInterval)??!1},ip=function(t){se(this,pe,ap).call(this),V(this,Mr,t),!(Qi||Sn(this.options.enabled,S(this,le))===!1||!Zf(S(this,Mr))||S(this,Mr)===0)&&V(this,Li,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Mr)))},sp=function(){se(this,pe,np).call(this),se(this,pe,ip).call(this,se(this,pe,rp).call(this))},op=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),V(this,Ni,void 0))},ap=function(){S(this,Li)&&(clearInterval(S(this,Li)),V(this,Li,void 0))},lp=function(){const t=S(this,Et).getQueryCache().build(S(this,Et),this.options);if(t===S(this,le))return;const n=S(this,le);V(this,le,t),V(this,Ha,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ub=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Et).getQueryCache().notify({query:S(this,le),type:"observerResultsUpdated"})})},Lx);function J_(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bv(e,t){return J_(e,t)||e.state.data!==void 0&&up(e,t,t.refetchOnMount)}function up(e,t,n){if(Sn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&om(e,t)}return!1}function zv(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&om(e,n)}function om(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Vs(t.staleTime,e))}function e2(e,t){return!Nu(e.getCurrentResult(),t)}var Fr,Nr,_t,rr,lr,Jl,cp,Ix,t2=(Ix=class extends So{constructor(t,n){super();Z(this,lr);Z(this,Fr);Z(this,Nr);Z(this,_t);Z(this,rr);V(this,Fr,t),this.setOptions(n),this.bindMethods(),se(this,lr,Jl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=S(this,Fr).defaultMutationOptions(t),Nu(this.options,n)||S(this,Fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,_t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Yi(n.mutationKey)!==Yi(this.options.mutationKey)?this.reset():((r=S(this,_t))==null?void 0:r.state.status)==="pending"&&S(this,_t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,_t))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,lr,Jl).call(this),se(this,lr,cp).call(this,t)}getCurrentResult(){return S(this,Nr)}reset(){var t;(t=S(this,_t))==null||t.removeObserver(this),V(this,_t,void 0),se(this,lr,Jl).call(this),se(this,lr,cp).call(this)}mutate(t,n){var r;return V(this,rr,n),(r=S(this,_t))==null||r.removeObserver(this),V(this,_t,S(this,Fr).getMutationCache().build(S(this,Fr),this.options)),S(this,_t).addObserver(this),S(this,_t).execute(t)}},Fr=new WeakMap,Nr=new WeakMap,_t=new WeakMap,rr=new WeakMap,lr=new WeakSet,Jl=function(){var n;const t=((n=S(this,_t))==null?void 0:n.state)??lb();V(this,Nr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},cp=function(t){He.batch(()=>{var n,r,i,s,o,a,l,c;if(S(this,rr)&&this.hasListeners()){const d=S(this,Nr).variables,u=S(this,Nr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,rr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=S(this,rr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,rr)).onError)==null||a.call(o,t.error,d,u),(c=(l=S(this,rr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(S(this,Nr))})})},Ix),cb=v.createContext(void 0),db=e=>{const t=v.useContext(cb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},n2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(cb.Provider,{value:e,children:t})),fb=v.createContext(!1),r2=()=>v.useContext(fb);fb.Provider;function i2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var s2=v.createContext(i2()),o2=()=>v.useContext(s2);function pb(e,t){return typeof e=="function"?e(...t):!!e}function dp(){}var a2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},l2=e=>{v.useEffect(()=>{e.clearReset()},[e])},u2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&pb(n,[e.error,r]),c2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},d2=(e,t)=>e.isLoading&&e.isFetching&&!t,f2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function p2(e,t,n){var d,u,f,h,m;const r=db(),i=r2(),s=o2(),o=r.defaultQueryOptions(e);(u=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",c2(o),a2(o,s),l2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(p=>{const b=i?dp:l.subscribe(He.batchCalls(p));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),f2(o,c))throw Vv(o,l,s);if(u2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||h.call(f,o,c),o.experimental_prefetchInRender&&!Qi&&d2(c,i)){const p=a?Vv(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(dp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function h2(e,t){return p2(e,Z_)}function am(e,t){const n=db(),[r]=v.useState(()=>new t2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(He.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(dp)},[r]);if(i.error&&pb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const m2=e=>h2({queryKey:["widgets",e],queryFn:()=>g2(e)}),g2=e=>bo(`widgets/with-link/${e}`);var C=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(C||{}),Q=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(Q||{});function v2(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function bd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function If(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var YE=typeof WeakMap=="function"?WeakMap:Map;function kw(e,t,n){n=ar(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ou||(Ou=!0,Qf=r),If(e,t)},n}function Cw(e,t,n){n=ar(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){If(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){If(e,t),typeof r!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function mv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new YE;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=u_.bind(null,e,t,n),t.then(e,e))}function gv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function vv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ar(-1,1),t.tag=2,Wr(n,t,1))),n.lanes|=1),e)}var KE=hr.ReactCurrentOwner,At=!1;function yt(e,t,n,r){t.child=e===null?J1(t,null,n,r):oo(t,e.child,n,r)}function yv(e,t,n,r,i){n=n.render;var s=t.ref;return Bs(t,i),r=zh(e,t,n,r,s,i),n=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&n&&jh(t),t.flags|=1,yt(e,t,r,i),t.child)}function xv(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Zh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Tw(e,t,s,r,i)):(e=Zl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:va,n(o,r)&&e.ref===t.ref)return fr(e,t,i)}return t.flags|=1,e=Qr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Tw(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(va(s,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(At=!0);else return t.lanes=e.lanes,fr(e,t,i)}return $f(e,t,n,r,i)}function Ew(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(js,$t),$t|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(js,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,we(js,$t),$t|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,we(js,$t),$t|=r;return yt(e,t,i,n),t.child}function _w(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $f(e,t,n,r,i){var s=Dt(n)?Ui:mt.current;return s=io(t,s),Bs(t,i),n=zh(e,t,n,r,s,i),r=Vh(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fr(e,t,i)):(Ee&&r&&jh(t),t.flags|=1,yt(e,t,n,i),t.child)}function wv(e,t,n,r,i){if(Dt(n)){var s=!0;Su(t)}else s=!1;if(Bs(t,i),t.stateNode===null)Yl(e,t),Sw(t,n,r),Lf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=un(c):(c=Dt(n)?Ui:mt.current,c=io(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&hv(t,o,r,c),Cr=!1;var f=t.memoizedState;o.state=f,_u(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Ot.current||Cr?(typeof d=="function"&&(Nf(t,n,d,r),l=t.memoizedState),(a=Cr||pv(t,n,a,r,f,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,tw(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:vn(t.type,a),o.props=c,u=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=un(l):(l=Dt(n)?Ui:mt.current,l=io(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||f!==l)&&hv(t,o,r,l),Cr=!1,f=t.memoizedState,o.state=f,_u(t,r,o,i);var h=t.memoizedState;a!==u||f!==h||Ot.current||Cr?(typeof p=="function"&&(Nf(t,n,p,r),h=t.memoizedState),(c=Cr||pv(t,n,c,r,f,h,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Bf(e,t,n,r,s,i)}function Bf(e,t,n,r,i,s){_w(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&sv(t,n,!1),fr(e,t,s);r=t.stateNode,KE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=oo(t,e.child,null,s),t.child=oo(t,null,a,s)):yt(e,t,a,s),t.memoizedState=r.state,i&&sv(t,n,!0),t.child}function Pw(e){var t=e.stateNode;t.pendingContext?iv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&iv(e,t.context,!1),Lh(e,t.containerInfo)}function bv(e,t,n,r,i){return so(),Ah(i),t.flags|=256,yt(e,t,n,r),t.child}var zf={dehydrated:null,treeContext:null,retryLane:0};function Vf(e){return{baseLanes:e,cachePool:null,transitions:null}}function jw(e,t,n){var r=t.pendingProps,i=Pe.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),we(Pe,i&1),e===null)return Mf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=fc(o,r,0,null),e=$i(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Vf(n),t.memoizedState=zf,e):Wh(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return XE(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Qr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Qr(a,s):(s=$i(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Vf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=zf,r}return s=e.child,e=s.sibling,r=Qr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Wh(e,t){return t=fc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cl(e,t,n,r){return r!==null&&Ah(r),oo(t,e.child,null,n),e=Wh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function XE(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=bd(Error(L(422))),Cl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=fc({mode:"visible",children:r.children},i,0,null),s=$i(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&oo(t,e.child,null,o),t.child.memoizedState=Vf(o),t.memoizedState=zf,s);if(!(t.mode&1))return Cl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(L(419)),r=bd(s,r,void 0),Cl(e,t,o,r)}if(a=(o&e.childLanes)!==0,At||a){if(r=Xe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,dr(e,i),Cn(r,e,i,-1))}return Xh(),r=bd(Error(L(421))),Cl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=c_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Bt=Hr(i.nextSibling),Ut=t,Ee=!0,bn=null,e!==null&&(tn[nn++]=ir,tn[nn++]=sr,tn[nn++]=Hi,ir=e.id,sr=e.overflow,Hi=t),t=Wh(t,r.children),t.flags|=4096,t)}function Sv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ff(e.return,t,n)}function Sd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Rw(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(yt(e,t,r.children,n),r=Pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sv(e,n,t);else if(e.tag===19)Sv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Pu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Pu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sd(t,!0,n,null,s);break;case"together":Sd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ZE(e,t,n){switch(t.tag){case 3:Pw(t),so();break;case 5:nw(t);break;case 1:Dt(t.type)&&Su(t);break;case 4:Lh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;we(Tu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?jw(e,t,n):(we(Pe,Pe.current&1),e=fr(e,t,n),e!==null?e.sibling:null);we(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),we(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Ew(e,t,n)}return fr(e,t,n)}var Aw,Uf,Ow,Dw;Aw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Uf=function(){};Ow=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ei(zn.current);var s=null;switch(n){case"input":i=df(e,i),r=df(e,r),s=[];break;case"select":i=Ae({},i,{value:void 0}),r=Ae({},r,{value:void 0}),s=[];break;case"textarea":i=hf(e,i),r=hf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wu)}gf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ca.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ca.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ke("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Dw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fo(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function JE(e,t,n){var r=t.pendingProps;switch(Rh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return Dt(t.type)&&bu(),ct(t),null;case 3:return r=t.stateNode,ao(),Te(Ot),Te(mt),$h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bn!==null&&(Xf(bn),bn=null))),Uf(e,t),ct(t),null;case 5:Ih(t);var i=Ei(Sa.current);if(n=t.type,e!==null&&t.stateNode!=null)Ow(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return ct(t),null}if(e=Ei(zn.current),Sl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$n]=t,r[wa]=s,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":Ag(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":Dg(r,s),ke("invalid",r)}gf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&bl(r.textContent,a,e),i=["children",""+a]):ca.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ke("scroll",r)}switch(n){case"input":pl(r),Og(r,s,!0);break;case"textarea":pl(r),Mg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=wu)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=a1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[$n]=t,e[wa]=r,Aw(e,t,!1,!1),t.stateNode=e;e:{switch(o=vf(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;i<Uo.length;i++)ke(Uo[i],e);i=r;break;case"source":ke("error",e),i=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),i=r;break;case"details":ke("toggle",e),i=r;break;case"input":Ag(e,r),i=df(e,r),ke("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ae({},r,{value:void 0}),ke("invalid",e);break;case"textarea":Dg(e,r),i=hf(e,r),ke("invalid",e);break;default:i=r}gf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?c1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&l1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&da(e,l):typeof l=="number"&&da(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ca.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ke("scroll",e):l!=null&&mh(e,s,l,o))}switch(n){case"input":pl(e),Og(e,r,!1);break;case"textarea":pl(e),Mg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ei(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ns(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ns(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=wu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ct(t),null;case 6:if(e&&t.stateNode!=null)Dw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Ei(Sa.current),Ei(zn.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(s=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:bl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return ct(t),null;case 13:if(Te(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ee&&Bt!==null&&t.mode&1&&!(t.flags&128))X1(),so(),t.flags|=98560,s=!1;else if(s=Sl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(L(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(L(317));s[$n]=t}else so(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ct(t),s=!1}else bn!==null&&(Xf(bn),bn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Pe.current&1?We===0&&(We=3):Xh())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return ao(),Uf(e,t),e===null&&ya(t.stateNode.containerInfo),ct(t),null;case 10:return Mh(t.type._context),ct(t),null;case 17:return Dt(t.type)&&bu(),ct(t),null;case 19:if(Te(Pe),s=t.memoizedState,s===null)return ct(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Fo(s,!1);else{if(We!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Pu(e),o!==null){for(t.flags|=128,Fo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>uo&&(t.flags|=128,r=!0,Fo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Pu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ee)return ct(t),null}else 2*$e()-s.renderingStartTime>uo&&n!==1073741824&&(t.flags|=128,r=!0,Fo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,n=Pe.current,we(Pe,r?n&1|2:n&1),t):(ct(t),null);case 22:case 23:return Kh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$t&1073741824&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function e_(e,t){switch(Rh(t),t.tag){case 1:return Dt(t.type)&&bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(),Te(Ot),Te(mt),$h(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ih(t),null;case 13:if(Te(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Pe),null;case 4:return ao(),null;case 10:return Mh(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var Tl=!1,pt=!1,t_=typeof WeakSet=="function"?WeakSet:Set,W=null;function Ps(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Fe(e,t,r)}else n.current=null}function Hf(e,t,n){try{n()}catch(r){Fe(e,t,r)}}var kv=!1;function n_(e,t){if(_f=vu,e=I1(),Ph(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var p;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(p=u.firstChild)!==null;)f=u,u=p;for(;;){if(u===e)break t;if(f===n&&++c===i&&(a=o),f===s&&++d===r&&(l=o),(p=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pf={focusedElem:e,selectionRange:n},vu=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,x=h.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:vn(t.type,m),x);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(k){Fe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return h=kv,kv=!1,h}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Hf(t,n,s)}i=i.next}while(i!==r)}}function cc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Wf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mw(e){var t=e.alternate;t!==null&&(e.alternate=null,Mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[wa],delete t[Af],delete t[IE],delete t[$E])),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 Fw(e){return e.tag===5||e.tag===3||e.tag===4}function Cv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wu));else if(r!==4&&(e=e.child,e!==null))for(qf(e,t,n),e=e.sibling;e!==null;)qf(e,t,n),e=e.sibling}function Gf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}var rt=null,xn=!1;function wr(e,t,n){for(n=n.child;n!==null;)Nw(e,t,n),n=n.sibling}function Nw(e,t,n){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(nc,n)}catch{}switch(n.tag){case 5:pt||Ps(n,t);case 6:var r=rt,i=xn;rt=null,wr(e,t,n),rt=r,xn=i,rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(xn?(e=rt,n=n.stateNode,e.nodeType===8?md(e.parentNode,n):e.nodeType===1&&md(e,n),ma(e)):md(rt,n.stateNode));break;case 4:r=rt,i=xn,rt=n.stateNode.containerInfo,xn=!0,wr(e,t,n),rt=r,xn=i;break;case 0:case 11:case 14:case 15:if(!pt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hf(n,t,o),i=i.next}while(i!==r)}wr(e,t,n);break;case 1:if(!pt&&(Ps(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Fe(n,t,a)}wr(e,t,n);break;case 21:wr(e,t,n);break;case 22:n.mode&1?(pt=(r=pt)||n.memoizedState!==null,wr(e,t,n),pt=r):wr(e,t,n);break;default:wr(e,t,n)}}function Tv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new t_),t.forEach(function(r){var i=d_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:rt=a.stateNode,xn=!1;break e;case 3:rt=a.stateNode.containerInfo,xn=!0;break e;case 4:rt=a.stateNode.containerInfo,xn=!0;break e}a=a.return}if(rt===null)throw Error(L(160));Nw(s,o,i),rt=null,xn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Fe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lw(t,e),t=t.sibling}function Lw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hn(t,e),Rn(e),r&4){try{ea(3,e,e.return),cc(3,e)}catch(m){Fe(e,e.return,m)}try{ea(5,e,e.return)}catch(m){Fe(e,e.return,m)}}break;case 1:hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return);break;case 5:if(hn(t,e),Rn(e),r&512&&n!==null&&Ps(n,n.return),e.flags&32){var i=e.stateNode;try{da(i,"")}catch(m){Fe(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&s1(i,s),vf(a,o);var c=vf(a,s);for(o=0;o<l.length;o+=2){var d=l[o],u=l[o+1];d==="style"?c1(i,u):d==="dangerouslySetInnerHTML"?l1(i,u):d==="children"?da(i,u):mh(i,d,u,c)}switch(a){case"input":ff(i,s);break;case"textarea":o1(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ns(i,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Ns(i,!!s.multiple,s.defaultValue,!0):Ns(i,!!s.multiple,s.multiple?[]:"",!1))}i[wa]=s}catch(m){Fe(e,e.return,m)}}break;case 6:if(hn(t,e),Rn(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Fe(e,e.return,m)}}break;case 3:if(hn(t,e),Rn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ma(t.containerInfo)}catch(m){Fe(e,e.return,m)}break;case 4:hn(t,e),Rn(e);break;case 13:hn(t,e),Rn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Qh=$e())),r&4&&Tv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(pt=(c=pt)||d,hn(t,e),pt=c):hn(t,e),Rn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(W=e,d=e.child;d!==null;){for(u=W=d;W!==null;){switch(f=W,p=f.child,f.tag){case 0:case 11:case 14:case 15:ea(4,f,f.return);break;case 1:Ps(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){Fe(r,n,m)}}break;case 5:Ps(f,f.return);break;case 22:if(f.memoizedState!==null){_v(u);continue}}p!==null?(p.return=f,W=p):_v(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=u1("display",o))}catch(m){Fe(e,e.return,m)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(m){Fe(e,e.return,m)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:hn(t,e),Rn(e),r&4&&Tv(e);break;case 21:break;default:hn(t,e),Rn(e)}}function Rn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fw(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(da(i,""),r.flags&=-33);var s=Cv(e);Gf(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Cv(e);qf(e,a,o);break;default:throw Error(L(161))}}catch(l){Fe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function r_(e,t,n){W=e,Iw(e)}function Iw(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var i=W,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Tl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||pt;a=Tl;var c=pt;if(Tl=o,(pt=l)&&!c)for(W=i;W!==null;)o=W,l=o.child,o.tag===22&&o.memoizedState!==null?Pv(i):l!==null?(l.return=o,W=l):Pv(i);for(;s!==null;)W=s,Iw(s),s=s.sibling;W=i,Tl=a,pt=c}Ev(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,W=s):Ev(e)}}function Ev(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:pt||cc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!pt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&cv(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&ma(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}pt||t.flags&512&&Wf(t)}catch(f){Fe(t,t.return,f)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function _v(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Pv(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{cc(4,t)}catch(l){Fe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Fe(t,i,l)}}var s=t.return;try{Wf(t)}catch(l){Fe(t,s,l)}break;case 5:var o=t.return;try{Wf(t)}catch(l){Fe(t,o,l)}}}catch(l){Fe(t,t.return,l)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var i_=Math.ceil,Au=hr.ReactCurrentDispatcher,qh=hr.ReactCurrentOwner,an=hr.ReactCurrentBatchConfig,de=0,Xe=null,Be=null,ot=0,$t=0,js=oi(0),We=0,Ea=null,qi=0,dc=0,Gh=0,ta=null,jt=null,Qh=0,uo=1/0,er=null,Ou=!1,Qf=null,qr=null,El=!1,Ir=null,Du=0,na=0,Yf=null,Kl=-1,Xl=0;function wt(){return de&6?$e():Kl!==-1?Kl:Kl=$e()}function Gr(e){return e.mode&1?de&2&&ot!==0?ot&-ot:zE.transition!==null?(Xl===0&&(Xl=S1()),Xl):(e=he,e!==0||(e=window.event,e=e===void 0?16:j1(e.type)),e):1}function Cn(e,t,n,r){if(50<na)throw na=0,Yf=null,Error(L(185));Ga(e,n,r),(!(de&2)||e!==Xe)&&(e===Xe&&(!(de&2)&&(dc|=n),We===4&&_r(e,ot)),Mt(e,r),n===1&&de===0&&!(t.mode&1)&&(uo=$e()+500,ac&&ai()))}function Mt(e,t){var n=e.callbackNode;zT(e,t);var r=gu(e,e===Xe?ot:0);if(r===0)n!==null&&Lg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lg(n),t===1)e.tag===0?BE(jv.bind(null,e)):Q1(jv.bind(null,e)),NE(function(){!(de&6)&&ai()}),n=null;else{switch(k1(r)){case 1:n=wh;break;case 4:n=w1;break;case 16:n=mu;break;case 536870912:n=b1;break;default:n=mu}n=qw(n,$w.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $w(e,t){if(Kl=-1,Xl=0,de&6)throw Error(L(327));var n=e.callbackNode;if(zs()&&e.callbackNode!==n)return null;var r=gu(e,e===Xe?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Mu(e,r);else{t=r;var i=de;de|=2;var s=zw();(Xe!==e||ot!==t)&&(er=null,uo=$e()+500,Ii(e,t));do try{a_();break}catch(a){Bw(e,a)}while(!0);Dh(),Au.current=s,de=i,Be!==null?t=0:(Xe=null,ot=0,t=We)}if(t!==0){if(t===2&&(i=Sf(e),i!==0&&(r=i,t=Kf(e,i))),t===1)throw n=Ea,Ii(e,0),_r(e,r),Mt(e,$e()),n;if(t===6)_r(e,r);else{if(i=e.current.alternate,!(r&30)&&!s_(i)&&(t=Mu(e,r),t===2&&(s=Sf(e),s!==0&&(r=s,t=Kf(e,s))),t===1))throw n=Ea,Ii(e,0),_r(e,r),Mt(e,$e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:yi(e,jt,er);break;case 3:if(_r(e,r),(r&130023424)===r&&(t=Qh+500-$e(),10<t)){if(gu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Rf(yi.bind(null,e,jt,er),t);break}yi(e,jt,er);break;case 4:if(_r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-kn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*i_(r/1960))-r,10<r){e.timeoutHandle=Rf(yi.bind(null,e,jt,er),r);break}yi(e,jt,er);break;case 5:yi(e,jt,er);break;default:throw Error(L(329))}}}return Mt(e,$e()),e.callbackNode===n?$w.bind(null,e):null}function Kf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(Ii(e,t).flags|=256),e=Mu(e,t),e!==2&&(t=jt,jt=n,t!==null&&Xf(t)),e}function Xf(e){jt===null?jt=e:jt.push.apply(jt,e)}function s_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Tn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _r(e,t){for(t&=~Gh,t&=~dc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kn(t),r=1<<n;e[n]=-1,t&=~r}}function jv(e){if(de&6)throw Error(L(327));zs();var t=gu(e,0);if(!(t&1))return Mt(e,$e()),null;var n=Mu(e,t);if(e.tag!==0&&n===2){var r=Sf(e);r!==0&&(t=r,n=Kf(e,r))}if(n===1)throw n=Ea,Ii(e,0),_r(e,t),Mt(e,$e()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yi(e,jt,er),Mt(e,$e()),null}function Yh(e,t){var n=de;de|=1;try{return e(t)}finally{de=n,de===0&&(uo=$e()+500,ac&&ai())}}function Gi(e){Ir!==null&&Ir.tag===0&&!(de&6)&&zs();var t=de;de|=1;var n=an.transition,r=he;try{if(an.transition=null,he=1,e)return e()}finally{he=r,an.transition=n,de=t,!(de&6)&&ai()}}function Kh(){$t=js.current,Te(js)}function Ii(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,FE(n)),Be!==null)for(n=Be.return;n!==null;){var r=n;switch(Rh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bu();break;case 3:ao(),Te(Ot),Te(mt),$h();break;case 5:Ih(r);break;case 4:ao();break;case 13:Te(Pe);break;case 19:Te(Pe);break;case 10:Mh(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(Xe=e,Be=e=Qr(e.current,null),ot=$t=t,We=0,Ea=null,Gh=dc=qi=0,jt=ta=null,Ti!==null){for(t=0;t<Ti.length;t++)if(n=Ti[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ti=null}return e}function Bw(e,t){do{var n=Be;try{if(Dh(),Gl.current=Ru,ju){for(var r=Re.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ju=!1}if(Wi=0,Ke=Ue=Re=null,Jo=!1,ka=0,qh.current=null,n===null||n.return===null){We=1,Ea=t,Be=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=gv(o);if(p!==null){p.flags&=-257,vv(p,o,a,s,t),p.mode&1&&mv(s,c,t),t=p,l=c;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){mv(s,c,t),Xh();break e}l=Error(L(426))}}else if(Ee&&a.mode&1){var x=gv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),vv(x,o,a,s,t),Ah(lo(l,a));break e}}s=l=lo(l,a),We!==4&&(We=2),ta===null?ta=[s]:ta.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=kw(s,l,t);uv(s,g);break e;case 1:a=l;var w=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(qr===null||!qr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var k=Cw(s,a,t);uv(s,k);break e}}s=s.return}while(s!==null)}Uw(n)}catch(T){t=T,Be===n&&n!==null&&(Be=n=n.return);continue}break}while(!0)}function zw(){var e=Au.current;return Au.current=Ru,e===null?Ru:e}function Xh(){(We===0||We===3||We===2)&&(We=4),Xe===null||!(qi&268435455)&&!(dc&268435455)||_r(Xe,ot)}function Mu(e,t){var n=de;de|=2;var r=zw();(Xe!==e||ot!==t)&&(er=null,Ii(e,t));do try{o_();break}catch(i){Bw(e,i)}while(!0);if(Dh(),de=n,Au.current=r,Be!==null)throw Error(L(261));return Xe=null,ot=0,We}function o_(){for(;Be!==null;)Vw(Be)}function a_(){for(;Be!==null&&!OT();)Vw(Be)}function Vw(e){var t=Ww(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Uw(e):Be=t,qh.current=null}function Uw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=e_(n,t),n!==null){n.flags&=32767,Be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,Be=null;return}}else if(n=JE(n,t,$t),n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);We===0&&(We=5)}function yi(e,t,n){var r=he,i=an.transition;try{an.transition=null,he=1,l_(e,t,n,r)}finally{an.transition=i,he=r}return null}function l_(e,t,n,r){do zs();while(Ir!==null);if(de&6)throw Error(L(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(VT(e,s),e===Xe&&(Be=Xe=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||El||(El=!0,qw(mu,function(){return zs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=an.transition,an.transition=null;var o=he;he=1;var a=de;de|=4,qh.current=null,n_(e,n),Lw(n,e),PE(Pf),vu=!!_f,Pf=_f=null,e.current=n,r_(n),DT(),de=a,he=o,an.transition=s}else e.current=n;if(El&&(El=!1,Ir=e,Du=i),s=e.pendingLanes,s===0&&(qr=null),NT(n.stateNode),Mt(e,$e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ou)throw Ou=!1,e=Qf,Qf=null,e;return Du&1&&e.tag!==0&&zs(),s=e.pendingLanes,s&1?e===Yf?na++:(na=0,Yf=e):na=0,ai(),null}function zs(){if(Ir!==null){var e=k1(Du),t=an.transition,n=he;try{if(an.transition=null,he=16>e?16:e,Ir===null)var r=!1;else{if(e=Ir,Ir=null,Du=0,de&6)throw Error(L(331));var i=de;for(de|=4,W=e.current;W!==null;){var s=W,o=s.child;if(W.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(W=c;W!==null;){var d=W;switch(d.tag){case 0:case 11:case 15:ea(8,d,s)}var u=d.child;if(u!==null)u.return=d,W=u;else for(;W!==null;){d=W;var f=d.sibling,p=d.return;if(Mw(d),d===c){W=null;break}if(f!==null){f.return=p,W=f;break}W=p}}}var h=s.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}W=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,W=o;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ea(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,W=g;break e}W=s.return}}var w=e.current;for(W=w;W!==null;){o=W;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,W=b;else e:for(o=w;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:cc(9,a)}}catch(T){Fe(a,a.return,T)}if(a===o){W=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,W=k;break e}W=a.return}}if(de=i,ai(),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(nc,e)}catch{}r=!0}return r}finally{he=n,an.transition=t}}return!1}function Rv(e,t,n){t=lo(n,t),t=kw(e,t,1),e=Wr(e,t,1),t=wt(),e!==null&&(Ga(e,1,t),Mt(e,t))}function Fe(e,t,n){if(e.tag===3)Rv(e,e,n);else for(;t!==null;){if(t.tag===3){Rv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qr===null||!qr.has(r))){e=lo(n,e),e=Cw(t,e,1),t=Wr(t,e,1),e=wt(),t!==null&&(Ga(t,1,e),Mt(t,e));break}}t=t.return}}function u_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(ot&n)===n&&(We===4||We===3&&(ot&130023424)===ot&&500>$e()-Qh?Ii(e,0):Gh|=n),Mt(e,t)}function Hw(e,t){t===0&&(e.mode&1?(t=gl,gl<<=1,!(gl&130023424)&&(gl=4194304)):t=1);var n=wt();e=dr(e,t),e!==null&&(Ga(e,t,n),Mt(e,n))}function c_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hw(e,n)}function d_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Hw(e,n)}var Ww;Ww=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ot.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,ZE(e,t,n);At=!!(e.flags&131072)}else At=!1,Ee&&t.flags&1048576&&Y1(t,Cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var i=io(t,mt.current);Bs(t,n),i=zh(null,t,r,e,i,n);var s=Vh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dt(r)?(s=!0,Su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Nh(t),i.updater=uc,t.stateNode=i,i._reactInternals=t,Lf(t,r,e,n),t=Bf(null,t,r,!0,s,n)):(t.tag=0,Ee&&s&&jh(t),yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=p_(r),e=vn(r,e),i){case 0:t=$f(null,t,r,e,n);break e;case 1:t=wv(null,t,r,e,n);break e;case 11:t=yv(null,t,r,e,n);break e;case 14:t=xv(null,t,r,vn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),$f(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),wv(e,t,r,i,n);case 3:e:{if(Pw(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,tw(e,t),_u(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=lo(Error(L(423)),t),t=bv(e,t,r,n,i);break e}else if(r!==i){i=lo(Error(L(424)),t),t=bv(e,t,r,n,i);break e}else for(Bt=Hr(t.stateNode.containerInfo.firstChild),Ut=t,Ee=!0,bn=null,n=J1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===i){t=fr(e,t,n);break e}yt(e,t,r,n)}t=t.child}return t;case 5:return nw(t),e===null&&Mf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,jf(r,i)?o=null:s!==null&&jf(r,s)&&(t.flags|=32),_w(e,t),yt(e,t,o,n),t.child;case 6:return e===null&&Mf(t),null;case 13:return jw(e,t,n);case 4:return Lh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),yv(e,t,r,i,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,we(Tu,r._currentValue),r._currentValue=o,s!==null)if(Tn(s.value,o)){if(s.children===i.children&&!Ot.current){t=fr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=ar(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ff(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ff(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bs(t,n),i=un(i),r=r(i),t.flags|=1,yt(e,t,r,n),t.child;case 14:return r=t.type,i=vn(r,t.pendingProps),i=vn(r.type,i),xv(e,t,r,i,n);case 15:return Tw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vn(r,i),Yl(e,t),t.tag=1,Dt(r)?(e=!0,Su(t)):e=!1,Bs(t,n),Sw(t,r,i),Lf(t,r,i,n),Bf(null,t,r,!0,e,n);case 19:return Rw(e,t,n);case 22:return Ew(e,t,n)}throw Error(L(156,t.tag))};function qw(e,t){return x1(e,t)}function f_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,n,r){return new f_(e,t,n,r)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function p_(e){if(typeof e=="function")return Zh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===yh)return 14}return 2}function Qr(e,t){var n=e.alternate;return n===null?(n=sn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Zh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xs:return $i(n.children,i,s,t);case gh:o=8,i|=8;break;case af:return e=sn(12,n,t,i|2),e.elementType=af,e.lanes=s,e;case lf:return e=sn(13,n,t,i),e.elementType=lf,e.lanes=s,e;case uf:return e=sn(19,n,t,i),e.elementType=uf,e.lanes=s,e;case n1:return fc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case e1:o=10;break e;case t1:o=9;break e;case vh:o=11;break e;case yh:o=14;break e;case kr:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=sn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function $i(e,t,n,r){return e=sn(7,e,r,t),e.lanes=n,e}function fc(e,t,n,r){return e=sn(22,e,r,t),e.elementType=n1,e.lanes=n,e.stateNode={isHidden:!1},e}function kd(e,t,n){return e=sn(6,e,null,t),e.lanes=n,e}function Cd(e,t,n){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function h_(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=id(0),this.expirationTimes=id(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jh(e,t,n,r,i,s,o,a,l){return e=new h_(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=sn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nh(s),e}function m_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ys,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gw(e){if(!e)return ti;e=e._reactInternals;e:{if(Ji(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(Dt(n))return G1(e,n,t)}return t}function Qw(e,t,n,r,i,s,o,a,l){return e=Jh(n,r,!0,e,i,s,o,a,l),e.context=Gw(null),n=e.current,r=wt(),i=Gr(n),s=ar(r,i),s.callback=t??null,Wr(n,s,i),e.current.lanes=i,Ga(e,i,r),Mt(e,r),e}function pc(e,t,n,r){var i=t.current,s=wt(),o=Gr(i);return n=Gw(n),t.context===null?t.context=n:t.pendingContext=n,t=ar(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wr(i,t,o),e!==null&&(Cn(e,i,o,s),ql(e,i,o)),o}function Fu(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 Av(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){Av(e,t),(e=e.alternate)&&Av(e,t)}function g_(){return null}var Yw=typeof reportError=="function"?reportError:function(e){console.error(e)};function tm(e){this._internalRoot=e}hc.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));pc(e,t,null,null)};hc.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gi(function(){pc(null,e,null,null)}),t[cr]=null}};function hc(e){this._internalRoot=e}hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=E1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Er.length&&t!==0&&t<Er[n].priority;n++);Er.splice(n,0,e),n===0&&P1(e)}};function nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function mc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ov(){}function v_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Fu(o);s.call(c)}}var o=Qw(t,r,e,0,null,!1,!1,"",Ov);return e._reactRootContainer=o,e[cr]=o.current,ya(e.nodeType===8?e.parentNode:e),Gi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Fu(l);a.call(c)}}var l=Jh(e,0,!1,null,null,!1,!1,"",Ov);return e._reactRootContainer=l,e[cr]=l.current,ya(e.nodeType===8?e.parentNode:e),Gi(function(){pc(t,l,n,r)}),l}function gc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Fu(o);a.call(l)}}pc(t,o,e,i)}else o=v_(n,t,e,i,r);return Fu(o)}C1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vo(t.pendingLanes);n!==0&&(bh(t,n|1),Mt(t,$e()),!(de&6)&&(uo=$e()+500,ai()))}break;case 13:Gi(function(){var r=dr(e,1);if(r!==null){var i=wt();Cn(r,e,1,i)}}),em(e,1)}};Sh=function(e){if(e.tag===13){var t=dr(e,134217728);if(t!==null){var n=wt();Cn(t,e,134217728,n)}em(e,134217728)}};T1=function(e){if(e.tag===13){var t=Gr(e),n=dr(e,t);if(n!==null){var r=wt();Cn(n,e,t,r)}em(e,t)}};E1=function(){return he};_1=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};xf=function(e,t,n){switch(t){case"input":if(ff(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=oc(r);if(!i)throw Error(L(90));i1(r),ff(r,i)}}}break;case"textarea":o1(e,n);break;case"select":t=n.value,t!=null&&Ns(e,!!n.multiple,t,!1)}};p1=Yh;h1=Gi;var y_={usingClientEntryPoint:!1,Events:[Ya,ks,oc,d1,f1,Yh]},No={findFiberByHostInstance:Ci,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},x_={bundleType:No.bundleType,version:No.version,rendererPackageName:No.rendererPackageName,rendererConfig:No.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=v1(e),e===null?null:e.stateNode},findFiberByHostInstance:No.findFiberByHostInstance||g_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{nc=_l.inject(x_),Bn=_l}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y_;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(L(200));return m_(e,t,null,n)};Wt.createRoot=function(e,t){if(!nm(e))throw Error(L(299));var n=!1,r="",i=Yw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,!1,r,i),e[cr]=t.current,ya(e.nodeType===8?e.parentNode:e),new tm(t)};Wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=v1(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Gi(e)};Wt.hydrate=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Yw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Qw(t,null,e,1,n??null,i,!1,s,o),e[cr]=t.current,ya(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new hc(t)};Wt.render=function(e,t,n){if(!mc(t))throw Error(L(200));return gc(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!mc(e))throw Error(L(40));return e._reactRootContainer?(Gi(function(){gc(null,null,e,!1,function(){e._reactRootContainer=null,e[cr]=null})}),!0):!1};Wt.unstable_batchedUpdates=Yh;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!mc(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return gc(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function Kw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kw)}catch(e){console.error(e)}}Kw(),Kx.exports=Wt;var Xw=Kx.exports;const w_=Xi(Xw);var Zw,Dv=Xw;Zw=Dv.createRoot,Dv.hydrateRoot;const b_="@alfatech/livechat",S_="v2025.10.22.2",k_="module",C_="https://api-live.alfatek.dev",T_="wss://api-live.alfatek.dev",E_=["dist","README.md","component/chatier.js"],__="dist/widget.js",P_={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"},j_={"@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"},R_={"@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"},Jw={name:b_,private:!1,version:S_,type:k_,apiURL:C_,wsURL:T_,files:E_,main:__,scripts:P_,dependencies:j_,devDependencies:R_,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},A_=Jw.apiURL,O_=Jw.wsURL,D_=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],M_=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],F_={429:D_,404:M_};async function bo(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${A_}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>new Response(null,{status:500}));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{}const o=F_[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const vc=e=>[200,201,204].includes(e),N_=(e,{arrayWithBrackets:t=!1,arrayWithBracketAndIndex:n=!0}={})=>{const r=new FormData;for(const[i,s]of Object.entries(e)){if(Array.isArray(s)){for(const o in s)t?r.append(`${i}[]`,s[o]):n?r.append(`${i}[${o}]`,s[o]):r.append(i,s[o]);continue}typeof s<"u"&&s!==null&&r.append(i,s)}return r};var So=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qi=typeof window>"u"||"Deno"in globalThis;function en(){}function L_(e,t){return typeof e=="function"?e(t):e}function Zf(e){return typeof e=="number"&&e>=0&&e!==1/0}function eb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vs(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Mv(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==rm(o,t.options))return!1}else if(!_a(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Fv(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Yi(t.options.mutationKey)!==Yi(s))return!1}else if(!_a(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function rm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Yi)(e)}function Yi(e){return JSON.stringify(e,(t,n)=>Jf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function _a(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!_a(e[n],t[n])):!1}function tb(e,t){if(e===t)return e;const n=Nv(e)&&Nv(t);if(n||Jf(e)&&Jf(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=tb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function Nu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Nv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jf(e){if(!Lv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Lv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Lv(e){return Object.prototype.toString.call(e)==="[object Object]"}function I_(e){return new Promise(t=>{setTimeout(t,e)})}function ep(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?tb(e,t):t}function $_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function B_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var im=Symbol();function nb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===im?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ai,Pr,Hs,jx,z_=(jx=class extends So{constructor(){super();K(this,Ai);K(this,Pr);K(this,Hs);U(this,Hs,t=>{if(!Qi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Pr)||this.setEventListener(S(this,Hs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Pr))==null||t.call(this),U(this,Pr,void 0))}setEventListener(t){var n;U(this,Hs,t),(n=S(this,Pr))==null||n.call(this),U(this,Pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,Ai)!==t&&(U(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Ai)=="boolean"?S(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Pr=new WeakMap,Hs=new WeakMap,jx),sm=new z_,Ws,jr,qs,Rx,V_=(Rx=class extends So{constructor(){super();K(this,Ws,!0);K(this,jr);K(this,qs);U(this,qs,t=>{if(!Qi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,jr)||this.setEventListener(S(this,qs))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,jr))==null||t.call(this),U(this,jr,void 0))}setEventListener(t){var n;U(this,qs,t),(n=S(this,jr))==null||n.call(this),U(this,jr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Ws)!==t&&(U(this,Ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Ws)}},Ws=new WeakMap,jr=new WeakMap,qs=new WeakMap,Rx),Lu=new V_;function tp(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function U_(e){return Math.min(1e3*2**e,3e4)}function rb(e){return(e??"online")==="online"?Lu.isOnline():!0}var ib=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Td(e){return e instanceof ib}function sb(e){let t=!1,n=0,r=!1,i;const s=tp(),o=m=>{var x;r||(f(new ib(m)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>sm.isFocused()&&(e.networkMode==="always"||Lu.isOnline())&&e.canRun(),d=()=>rb(e.networkMode)&&e.canRun(),u=m=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,m),i==null||i(),s.reject(m))},p=()=>new Promise(m=>{var x;i=g=>{(r||c())&&m(g)},(x=e.onPause)==null||x.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),h=()=>{if(r)return;let m;const x=n===0?e.initialPromise:void 0;try{m=x??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(u).catch(g=>{var E;if(r)return;const w=e.retry??(Qi?0:3),b=e.retryDelay??U_,k=typeof b=="function"?b(n,g):b,T=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,g);if(t||!T){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),I_(k).then(()=>c()?void 0:p()).then(()=>{t?f(g):h()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?h():p().then(h),s)}}function H_(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var He=H_(),Oi,Ax,ob=(Ax=class{constructor(){K(this,Oi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&U(this,Oi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qi?1/0:5*60*1e3))}clearGcTimeout(){S(this,Oi)&&(clearTimeout(S(this,Oi)),U(this,Oi,void 0))}},Oi=new WeakMap,Ax),Gs,Qs,Jt,dt,Va,Di,yn,Jn,Ox,W_=(Ox=class extends ob{constructor(t){super();K(this,yn);K(this,Gs);K(this,Qs);K(this,Jt);K(this,dt);K(this,Va);K(this,Di);U(this,Di,!1),U(this,Va,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Jt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,Gs,q_(this.options)),this.state=t.state??S(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,dt))==null?void 0:t.promise}setOptions(t){this.options={...S(this,Va),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Jt).remove(this)}setData(t,n){const r=ep(this.state.data,t,this.options);return se(this,yn,Jn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,yn,Jn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=S(this,dt))==null?void 0:r.promise;return(i=S(this,dt))==null||i.cancel(t),n?n.then(en).catch(en):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Gs))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===im||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!eb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,dt)&&(S(this,Di)?S(this,dt).cancel({revert:!0}):S(this,dt).cancelRetry()),this.scheduleGc()),S(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,yn,Jn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,dt))return S(this,dt).continueRetry(),S(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(U(this,Di,!0),r.signal)})},s=()=>{const u=nb(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),U(this,Di,!1),this.options.persister?this.options.persister(u,f,this):u(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),U(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&se(this,yn,Jn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=u=>{var f,p,h,m;Td(u)&&u.silent||se(this,yn,Jn).call(this,{type:"error",error:u}),Td(u)||((p=(f=S(this,Jt).config).onError)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,this.state.data,u,this)),this.scheduleGc()};return U(this,dt,sb({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var f,p,h,m;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(x){a(x);return}(p=(f=S(this,Jt).config).onSuccess)==null||p.call(f,u,this),(m=(h=S(this,Jt).config).onSettled)==null||m.call(h,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,f)=>{se(this,yn,Jn).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{se(this,yn,Jn).call(this,{type:"pause"})},onContinue:()=>{se(this,yn,Jn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,dt).start()}},Gs=new WeakMap,Qs=new WeakMap,Jt=new WeakMap,dt=new WeakMap,Va=new WeakMap,Di=new WeakMap,yn=new WeakSet,Jn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ab(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Td(i)&&i.revert&&S(this,Qs)?{...S(this,Qs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Jt).notify({query:this,type:"updated",action:t})})},Ox);function ab(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Fn,Dx,G_=(Dx=class extends So{constructor(t={}){super();K(this,Fn);this.config=t,U(this,Fn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??rm(i,n);let o=this.get(s);return o||(o=new W_({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(){He.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=>Mv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Mv(t,r)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fn=new WeakMap,Dx),Nn,gt,Mi,Ln,br,Mx,Q_=(Mx=class extends ob{constructor(t){super();K(this,Ln);K(this,Nn);K(this,gt);K(this,Mi);this.mutationId=t.mutationId,U(this,gt,t.mutationCache),U(this,Nn,[]),this.state=t.state||lb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Nn).includes(t)||(S(this,Nn).push(t),this.clearGcTimeout(),S(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,Nn,S(this,Nn).filter(n=>n!==t)),this.scheduleGc(),S(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():S(this,gt).remove(this))}continue(){var t;return((t=S(this,Mi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,d,u,f,p,h,m,x,g,w,b,k,T,E,_;U(this,Mi,sb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,M)=>{se(this,Ln,br).call(this,{type:"failed",failureCount:j,error:M})},onPause:()=>{se(this,Ln,br).call(this,{type:"pause"})},onContinue:()=>{se(this,Ln,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,gt).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Mi).canStart();try{if(!n){se(this,Ln,br).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=S(this,gt).config).onMutate)==null?void 0:s.call(i,t,this));const M=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));M!==this.state.context&&se(this,Ln,br).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const j=await S(this,Mi).start();return await((c=(l=S(this,gt).config).onSuccess)==null?void 0:c.call(l,j,t,this.state.context,this)),await((u=(d=this.options).onSuccess)==null?void 0:u.call(d,j,t,this.state.context)),await((p=(f=S(this,gt).config).onSettled)==null?void 0:p.call(f,j,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,j,null,t,this.state.context)),se(this,Ln,br).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(x=S(this,gt).config).onError)==null?void 0:g.call(x,j,t,this.state.context,this)),await((b=(w=this.options).onError)==null?void 0:b.call(w,j,t,this.state.context)),await((T=(k=S(this,gt).config).onSettled)==null?void 0:T.call(k,void 0,j,this.state.variables,this.state.context,this)),await((_=(E=this.options).onSettled)==null?void 0:_.call(E,void 0,j,t,this.state.context)),j}finally{se(this,Ln,br).call(this,{type:"error",error:j})}}finally{S(this,gt).runNext(this)}}},Nn=new WeakMap,gt=new WeakMap,Mi=new WeakMap,Ln=new WeakSet,br=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{S(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),S(this,gt).notify({mutation:this,type:"updated",action:t})})},Mx);function lb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var It,Ua,Fx,Y_=(Fx=class extends So{constructor(t={}){super();K(this,It);K(this,Ua);this.config=t,U(this,It,new Map),U(this,Ua,Date.now())}build(t,n,r){const i=new Q_({mutationCache:this,mutationId:++cl(this,Ua)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Pl(t),r=S(this,It).get(n)??[];r.push(t),S(this,It).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Pl(t);if(S(this,It).has(n)){const i=(r=S(this,It).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?S(this,It).delete(n):S(this,It).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=S(this,It).get(Pl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...S(this,It).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Fv(n,r))}findAll(t={}){return this.getAll().filter(n=>Fv(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(en))))}},It=new WeakMap,Ua=new WeakMap,Fx);function Pl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Iv(e){return{onFetch:(t,n)=>{var d,u,f,p,h;const r=t.options,i=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],o=((h=t.state.data)==null?void 0:h.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=nb(t.options,t.fetchOptions),w=async(b,k,T)=>{if(m)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const E={queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};x(E);const _=await g(E),{maxPages:j}=t.options,M=T?B_:$_;return{pages:M(b.pages,_,j),pageParams:M(b.pageParams,k,j)}};if(i&&s.length){const b=i==="backward",k=b?K_:$v,T={pages:s,pageParams:o},E=k(r,T);a=await w(T,E,b)}else{const b=e??s.length;do{const k=l===0?o[0]??r.initialPageParam:$v(r,a);if(l>0&&k==null)break;a=await w(a,k),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var m,x;return(x=(m=t.options).persister)==null?void 0:x.call(m,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function $v(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function K_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var De,Rr,Ar,Ys,Ks,Or,Xs,Zs,Nx,X_=(Nx=class{constructor(e={}){K(this,De);K(this,Rr);K(this,Ar);K(this,Ys);K(this,Ks);K(this,Or);K(this,Xs);K(this,Zs);U(this,De,e.queryCache||new G_),U(this,Rr,e.mutationCache||new Y_),U(this,Ar,e.defaultOptions||{}),U(this,Ys,new Map),U(this,Ks,new Map),U(this,Or,0)}mount(){cl(this,Or)._++,S(this,Or)===1&&(U(this,Xs,sm.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onFocus())})),U(this,Zs,Lu.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,De).onOnline())})))}unmount(){var e,t;cl(this,Or)._--,S(this,Or)===0&&((e=S(this,Xs))==null||e.call(this),U(this,Xs,void 0),(t=S(this,Zs))==null||t.call(this),U(this,Zs,void 0))}isFetching(e){return S(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Rr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=S(this,De).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Vs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return S(this,De).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=S(this,De).get(r.queryHash),s=i==null?void 0:i.state.data,o=L_(t,s);if(o!==void 0)return S(this,De).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>S(this,De).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,De).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,De);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,De),r={type:"active",...e};return He.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=He.batch(()=>S(this,De).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(en).catch(en)}invalidateQueries(e,t={}){return He.batch(()=>{if(S(this,De).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=He.batch(()=>S(this,De).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(en)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(en)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,De).build(this,t);return n.isStaleByTime(Vs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(en).catch(en)}fetchInfiniteQuery(e){return e.behavior=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(en).catch(en)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lu.isOnline()?S(this,Rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,De)}getMutationCache(){return S(this,Rr)}getDefaultOptions(){return S(this,Ar)}setDefaultOptions(e){U(this,Ar,e)}setQueryDefaults(e,t){S(this,Ys).set(Yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ys).values()],n={};return t.forEach(r=>{_a(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ks).set(Yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ks).values()];let n={};return t.forEach(r=>{_a(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Ar).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=rm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===im&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Ar).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,De).clear(),S(this,Rr).clear()}},De=new WeakMap,Rr=new WeakMap,Ar=new WeakMap,Ys=new WeakMap,Ks=new WeakMap,Or=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Nx),Et,le,Ha,vt,Fi,Js,Dr,In,Wa,eo,to,Ni,Li,Mr,no,pe,Ho,np,rp,ip,sp,op,ap,lp,ub,Lx,Z_=(Lx=class extends So{constructor(t,n){super();K(this,pe);K(this,Et);K(this,le);K(this,Ha);K(this,vt);K(this,Fi);K(this,Js);K(this,Dr);K(this,In);K(this,Wa);K(this,eo);K(this,to);K(this,Ni);K(this,Li);K(this,Mr);K(this,no,new Set);this.options=n,U(this,Et,t),U(this,In,null),U(this,Dr,tp()),this.options.experimental_prefetchInRender||S(this,Dr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,le).addObserver(this),Bv(S(this,le),this.options)?se(this,pe,Ho).call(this):this.updateResult(),se(this,pe,sp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return up(S(this,le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return up(S(this,le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,pe,op).call(this),se(this,pe,ap).call(this),S(this,le).removeObserver(this)}setOptions(t,n){const r=this.options,i=S(this,le);if(this.options=S(this,Et).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,S(this,le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,pe,lp).call(this),S(this,le).setOptions(this.options),r._defaulted&&!Nu(this.options,r)&&S(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,le),observer:this});const s=this.hasListeners();s&&zv(S(this,le),i,this.options,r)&&se(this,pe,Ho).call(this),this.updateResult(n),s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||Vs(this.options.staleTime,S(this,le))!==Vs(r.staleTime,S(this,le)))&&se(this,pe,np).call(this);const o=se(this,pe,rp).call(this);s&&(S(this,le)!==i||Sn(this.options.enabled,S(this,le))!==Sn(r.enabled,S(this,le))||o!==S(this,Mr))&&se(this,pe,ip).call(this,o)}getOptimisticResult(t){const n=S(this,Et).getQueryCache().build(S(this,Et),t),r=this.createResult(n,t);return e2(this,r)&&(U(this,vt,r),U(this,Js,this.options),U(this,Fi,S(this,le).state)),r}getCurrentResult(){return S(this,vt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){S(this,no).add(t)}getCurrentQuery(){return S(this,le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Et).defaultQueryOptions(t),r=S(this,Et).getQueryCache().build(S(this,Et),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,pe,Ho).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,vt)))}createResult(t,n){var j;const r=S(this,le),i=this.options,s=S(this,vt),o=S(this,Fi),a=S(this,Js),c=t!==r?t.state:S(this,Ha),{state:d}=t;let u={...d},f=!1,p;if(n._optimisticResults){const M=this.hasListeners(),P=!M&&Bv(t,n),I=M&&zv(t,r,n,i);(P||I)&&(u={...u,...ab(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:x}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===S(this,Wa))p=S(this,eo);else try{U(this,Wa,n.select),p=n.select(u.data),p=ep(s==null?void 0:s.data,p,n),U(this,eo,p),U(this,In,null)}catch(M){U(this,In,M)}else p=u.data;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let M;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))M=s.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((j=S(this,to))==null?void 0:j.state.data,S(this,to)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),U(this,In,null)}catch(P){U(this,In,P)}M!==void 0&&(x="success",p=ep(s==null?void 0:s.data,M,n),f=!0)}S(this,In)&&(h=S(this,In),p=S(this,eo),m=Date.now(),x="error");const g=u.fetchStatus==="fetching",w=x==="pending",b=x==="error",k=w&&g,T=p!==void 0,_={status:x,fetchStatus:u.fetchStatus,isPending:w,isSuccess:x==="success",isError:b,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:b&&!T,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&T,isStale:om(t,n),refetch:this.refetch,promise:S(this,Dr)};if(this.options.experimental_prefetchInRender){const M=F=>{_.status==="error"?F.reject(_.error):_.data!==void 0&&F.resolve(_.data)},P=()=>{const F=U(this,Dr,_.promise=tp());M(F)},I=S(this,Dr);switch(I.status){case"pending":t.queryHash===r.queryHash&&M(I);break;case"fulfilled":(_.status==="error"||_.data!==I.value)&&P();break;case"rejected":(_.status!=="error"||_.error!==I.reason)&&P();break}}return _}updateResult(t){const n=S(this,vt),r=this.createResult(S(this,le),this.options);if(U(this,Fi,S(this,le).state),U(this,Js,this.options),S(this,Fi).data!==void 0&&U(this,to,S(this,le)),Nu(r,n))return;U(this,vt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!S(this,no).size)return!0;const l=new Set(a??S(this,no));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,vt)).some(c=>{const d=c;return S(this,vt)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),se(this,pe,ub).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,pe,sp).call(this)}},Et=new WeakMap,le=new WeakMap,Ha=new WeakMap,vt=new WeakMap,Fi=new WeakMap,Js=new WeakMap,Dr=new WeakMap,In=new WeakMap,Wa=new WeakMap,eo=new WeakMap,to=new WeakMap,Ni=new WeakMap,Li=new WeakMap,Mr=new WeakMap,no=new WeakMap,pe=new WeakSet,Ho=function(t){se(this,pe,lp).call(this);let n=S(this,le).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(en)),n},np=function(){se(this,pe,op).call(this);const t=Vs(this.options.staleTime,S(this,le));if(Qi||S(this,vt).isStale||!Zf(t))return;const r=eb(S(this,vt).dataUpdatedAt,t)+1;U(this,Ni,setTimeout(()=>{S(this,vt).isStale||this.updateResult()},r))},rp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,le)):this.options.refetchInterval)??!1},ip=function(t){se(this,pe,ap).call(this),U(this,Mr,t),!(Qi||Sn(this.options.enabled,S(this,le))===!1||!Zf(S(this,Mr))||S(this,Mr)===0)&&U(this,Li,setInterval(()=>{(this.options.refetchIntervalInBackground||sm.isFocused())&&se(this,pe,Ho).call(this)},S(this,Mr)))},sp=function(){se(this,pe,np).call(this),se(this,pe,ip).call(this,se(this,pe,rp).call(this))},op=function(){S(this,Ni)&&(clearTimeout(S(this,Ni)),U(this,Ni,void 0))},ap=function(){S(this,Li)&&(clearInterval(S(this,Li)),U(this,Li,void 0))},lp=function(){const t=S(this,Et).getQueryCache().build(S(this,Et),this.options);if(t===S(this,le))return;const n=S(this,le);U(this,le,t),U(this,Ha,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ub=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,vt))}),S(this,Et).getQueryCache().notify({query:S(this,le),type:"observerResultsUpdated"})})},Lx);function J_(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bv(e,t){return J_(e,t)||e.state.data!==void 0&&up(e,t,t.refetchOnMount)}function up(e,t,n){if(Sn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&om(e,t)}return!1}function zv(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&om(e,n)}function om(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Vs(t.staleTime,e))}function e2(e,t){return!Nu(e.getCurrentResult(),t)}var Fr,Nr,_t,rr,lr,Jl,cp,Ix,t2=(Ix=class extends So{constructor(t,n){super();K(this,lr);K(this,Fr);K(this,Nr);K(this,_t);K(this,rr);U(this,Fr,t),this.setOptions(n),this.bindMethods(),se(this,lr,Jl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=S(this,Fr).defaultMutationOptions(t),Nu(this.options,n)||S(this,Fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,_t),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Yi(n.mutationKey)!==Yi(this.options.mutationKey)?this.reset():((r=S(this,_t))==null?void 0:r.state.status)==="pending"&&S(this,_t).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,_t))==null||t.removeObserver(this)}onMutationUpdate(t){se(this,lr,Jl).call(this),se(this,lr,cp).call(this,t)}getCurrentResult(){return S(this,Nr)}reset(){var t;(t=S(this,_t))==null||t.removeObserver(this),U(this,_t,void 0),se(this,lr,Jl).call(this),se(this,lr,cp).call(this)}mutate(t,n){var r;return U(this,rr,n),(r=S(this,_t))==null||r.removeObserver(this),U(this,_t,S(this,Fr).getMutationCache().build(S(this,Fr),this.options)),S(this,_t).addObserver(this),S(this,_t).execute(t)}},Fr=new WeakMap,Nr=new WeakMap,_t=new WeakMap,rr=new WeakMap,lr=new WeakSet,Jl=function(){var n;const t=((n=S(this,_t))==null?void 0:n.state)??lb();U(this,Nr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},cp=function(t){He.batch(()=>{var n,r,i,s,o,a,l,c;if(S(this,rr)&&this.hasListeners()){const d=S(this,Nr).variables,u=S(this,Nr).context;(t==null?void 0:t.type)==="success"?((r=(n=S(this,rr)).onSuccess)==null||r.call(n,t.data,d,u),(s=(i=S(this,rr)).onSettled)==null||s.call(i,t.data,null,d,u)):(t==null?void 0:t.type)==="error"&&((a=(o=S(this,rr)).onError)==null||a.call(o,t.error,d,u),(c=(l=S(this,rr)).onSettled)==null||c.call(l,void 0,t.error,d,u))}this.listeners.forEach(d=>{d(S(this,Nr))})})},Ix),cb=v.createContext(void 0),db=e=>{const t=v.useContext(cb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},n2=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(cb.Provider,{value:e,children:t})),fb=v.createContext(!1),r2=()=>v.useContext(fb);fb.Provider;function i2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var s2=v.createContext(i2()),o2=()=>v.useContext(s2);function pb(e,t){return typeof e=="function"?e(...t):!!e}function dp(){}var a2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},l2=e=>{v.useEffect(()=>{e.clearReset()},[e])},u2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&pb(n,[e.error,r]),c2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},d2=(e,t)=>e.isLoading&&e.isFetching&&!t,f2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function p2(e,t,n){var d,u,f,p,h;const r=db(),i=r2(),s=o2(),o=r.defaultQueryOptions(e);(u=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||u.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",c2(o),a2(o,s),l2(s);const a=!r.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(m=>{const x=i?dp:l.subscribe(He.batchCalls(m));return l.updateResult(),x},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),f2(o,c))throw Vv(o,l,s);if(u2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,c),o.experimental_prefetchInRender&&!Qi&&d2(c,i)){const m=a?Vv(o,l,s):(h=r.getQueryCache().get(o.queryHash))==null?void 0:h.promise;m==null||m.catch(dp).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function h2(e,t){return p2(e,Z_)}function am(e,t){const n=db(),[r]=v.useState(()=>new t2(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(He.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=v.useCallback((o,a)=>{r.mutate(o,a).catch(dp)},[r]);if(i.error&&pb(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const m2=e=>h2({queryKey:["widgets",e],queryFn:()=>g2(e)}),g2=e=>bo(`widgets/with-link/${e}`);var C=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e.CloseButtonBackground="widget_close_button_background",e.CloseButtonText="widget_close_button_text",e.CloseButtonHover="widget_close_button_hover",e.IconColor="widget_icon_color",e.IconBackground="widget_icon_background",e.ErrorBackground="widget_error_background",e.ErrorText="widget_error_text",e.ErrorBorder="widget_error_border",e.SuccessBackground="widget_success_background",e.SuccessText="widget_success_text",e.SuccessBorder="widget_success_border",e.WarningBackground="widget_warning_background",e.WarningText="widget_warning_text",e.WarningBorder="widget_warning_border",e.LinkColor="widget_link_color",e.LinkHoverColor="widget_link_hover_color",e.DividerColor="widget_divider_color",e.ShadowColor="widget_shadow_color",e.StarActiveColor="widget_star_active_color",e.StarInactiveColor="widget_star_inactive_color",e.ModalOverlayColor="widget_modal_overlay_color",e.ChatCloseConfirmText="widget_chat_close_confirm_text",e.RatingHeaderBackground="widget_rating_header_background",e.RatingHeaderText="widget_rating_header_text",e.RatingSuccessBackground="widget_rating_success_background",e.RatingSuccessText="widget_rating_success_text",e.RatingRateConversationText="widget_rating_rate_conversation_text",e))(C||{}),Y=(e=>(e.TooltipDefault="tooltip_default",e.TooltipActive="tooltip_active",e.CloseButtonAria="close_button_aria",e.MessagePlaceholder="message_placeholder",e.FileUploadDisabled="file_upload_disabled",e.NewMessagesNotification="new_messages_notification",e.ChatCloseConfirm="chat_close_confirm",e.ChatCloseWarning="chat_close_warning",e.ChatSettings="chat_settings",e.ChatEndConversation="chat_end_conversation",e.CancelAction="cancel_action",e.CloseAction="close_action",e.QuickActions="quick_actions",e.GreetingStartChat="greeting_start_chat",e.RateLimitMessage="rate_limit_message",e.RatingHeaderEvaluate="rating_header_evaluate",e.RatingHeaderThanks="rating_header_thanks",e.RatingDescription="rating_description",e.RatingRateConversation="rating_rate_conversation",e.RatingComment="rating_comment",e.RatingCommentPlaceholder="rating_comment_placeholder",e.RatingSubmit="rating_submit",e.RatingNewConversation="rating_new_conversation",e.RatingThankYouTitle="rating_thank_you_title",e.RatingThankYouDescription="rating_thank_you_description",e.RatingCountdown="rating_countdown",e.RatingMinimumError="rating_minimum_error",e.RatingYourScore="rating_your_score",e.PoweredBy="powered_by",e))(Y||{});function v2(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 Iu(){return Iu=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},Iu.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));function y2(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h
|
|
49
|
+
*/function Iu(){return Iu=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},Iu.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));function y2(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 c(){return i[s]}function d(p,h,m){h===void 0&&(h=null);let x=w2(i?c().pathname:"/",p,h,m);return lm(x.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),x}function u(p){return typeof p=="string"?p:fp(p)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:u,createURL(p){return new URL(u(p),"http://localhost")},encodeLocation(p){let h=typeof p=="string"?es(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){o=$r.Push;let m=d(p,h);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(p,h){o=$r.Replace;let m=d(p,h);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(p){o=$r.Pop;let h=l(s+p),m=i[h];s=h,a&&a({action:o,location:m,delta:p})},listen(p){return a=p,()=>{a=null}}}}function qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function x2(){return Math.random().toString(36).substr(2,8)}function w2(e,t,n,r){return n===void 0&&(n=null),Iu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?es(t):t,{state:n,key:t&&t.key||r||x2()})}function fp(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 es(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 Uv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Uv||(Uv={}));function b2(e,t,n){return n===void 0&&(n="/"),S2(e,t,n,!1)}function S2(e,t,n,r){let i=typeof t=="string"?es(t):t,s=um(i.pathname||"/",n);if(s==null)return null;let o=hb(e);k2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=M2(s);a=O2(o[l],c,r)}return a}function hb(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("/")&&(qe(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 c=Yr([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(qe(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),hb(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:R2(c,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 mb(s.path))i(s,o,l)}),t}function mb(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=mb(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 k2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:A2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const C2=/^:[\w-]+$/,T2=3,E2=2,_2=1,P2=10,j2=-2,Hv=e=>e==="*";function R2(e,t){let n=e.split("/"),r=n.length;return n.some(Hv)&&(r+=j2),t&&(r+=E2),n.filter(i=>!Hv(i)).reduce((i,s)=>i+(C2.test(s)?T2:s===""?_2:P2),r)}function A2(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 O2(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",u=Wv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Wv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Yr([s,u.pathname]),pathnameBase:I2(Yr([s,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(s=Yr([s,u.pathnameBase]))}return o}function Wv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=D2(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((c,d,u)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let m=a[u]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[u];return p&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function D2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),lm(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 M2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lm(!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 um(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 F2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?es(e):e;return{pathname:n?n.startsWith("/")?n:N2(n,t):t,search:$2(r),hash:B2(i)}}function N2(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 Ed(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 L2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function gb(e,t){let n=L2(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function vb(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=es(e):(i=Iu({},e),qe(!i.pathname||!i.pathname.includes("?"),Ed("?","pathname","search",i)),qe(!i.pathname||!i.pathname.includes("#"),Ed("#","pathname","hash",i)),qe(!i.search||!i.search.includes("#"),Ed("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let u=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),u-=1;i.pathname=f.join("/")}a=u>=0?t[u]:"/"}let l=F2(i,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Yr=e=>e.join("/").replace(/\/\/+/g,"/"),I2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,B2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function z2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yb=["post","put","patch","delete"];new Set(yb);const V2=["get",...yb];new Set(V2);/**
|
|
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 Pa(){return Pa=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},Pa.apply(this,arguments)}const cm=v.createContext(null),U2=v.createContext(null),ts=v.createContext(null),yc=v.createContext(null),ns=v.createContext({outlet:null,matches:[],isDataRoute:!1}),xb=v.createContext(null);function H2(e,t){let{relative:n}=t===void 0?{}:t;Xa()||qe(!1);let{basename:r,navigator:i}=v.useContext(ts),{hash:s,pathname:o,search:a}=Sb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Yr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Xa(){return v.useContext(yc)!=null}function Za(){return Xa()||qe(!1),v.useContext(yc).location}function wb(e){v.useContext(ts).static||v.useLayoutEffect(e)}function bb(){let{isDataRoute:e}=v.useContext(ns);return e?rP():W2()}function W2(){Xa()||qe(!1);let e=v.useContext(cm),{basename:t,future:n,navigator:r}=v.useContext(ts),{matches:i}=v.useContext(ns),{pathname:s}=Za(),o=JSON.stringify(gb(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return wb(()=>{a.current=!0}),v.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=vb(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Yr([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,o,s,e])}function Sb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ts),{matches:i}=v.useContext(ns),{pathname:s}=Za(),o=JSON.stringify(gb(i,r.v7_relativeSplatPath));return v.useMemo(()=>vb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function q2(e,t){return G2(e,t)}function G2(e,t,n,r){Xa()||qe(!1);let{navigator:i}=v.useContext(ts),{matches:s}=v.useContext(ns),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Za(),d;if(t){var u;let
|
|
58
|
+
*/function Pa(){return Pa=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},Pa.apply(this,arguments)}const cm=v.createContext(null),U2=v.createContext(null),ts=v.createContext(null),yc=v.createContext(null),ns=v.createContext({outlet:null,matches:[],isDataRoute:!1}),xb=v.createContext(null);function H2(e,t){let{relative:n}=t===void 0?{}:t;Xa()||qe(!1);let{basename:r,navigator:i}=v.useContext(ts),{hash:s,pathname:o,search:a}=Sb(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Yr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Xa(){return v.useContext(yc)!=null}function Za(){return Xa()||qe(!1),v.useContext(yc).location}function wb(e){v.useContext(ts).static||v.useLayoutEffect(e)}function bb(){let{isDataRoute:e}=v.useContext(ns);return e?rP():W2()}function W2(){Xa()||qe(!1);let e=v.useContext(cm),{basename:t,future:n,navigator:r}=v.useContext(ts),{matches:i}=v.useContext(ns),{pathname:s}=Za(),o=JSON.stringify(gb(i,n.v7_relativeSplatPath)),a=v.useRef(!1);return wb(()=>{a.current=!0}),v.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=vb(c,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Yr([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,o,s,e])}function Sb(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ts),{matches:i}=v.useContext(ns),{pathname:s}=Za(),o=JSON.stringify(gb(i,r.v7_relativeSplatPath));return v.useMemo(()=>vb(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function q2(e,t){return G2(e,t)}function G2(e,t,n,r){Xa()||qe(!1);let{navigator:i}=v.useContext(ts),{matches:s}=v.useContext(ns),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Za(),d;if(t){var u;let x=typeof t=="string"?es(t):t;l==="/"||(u=x.pathname)!=null&&u.startsWith(l)||qe(!1),d=x}else d=c;let f=d.pathname||"/",p=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let h=b2(e,{pathname:p}),m=Z2(h&&h.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Yr([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Yr([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r);return t&&m?v.createElement(yc.Provider,{value:{location:Pa({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:$r.Pop}},m):m}function Q2(){let e=nP(),t=z2(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 v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const Y2=v.createElement(Q2,null);class K2 extends v.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?v.createElement(ns.Provider,{value:this.props.routeContext},v.createElement(xb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function X2(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(cm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ns.Provider,{value:t},r)}function Z2(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(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);d>=0||qe(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let u=o[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=d),u.route.id){let{loaderData:f,errors:p}=n,h=u.route.loader&&f[u.route.id]===void 0&&(!p||p[u.route.id]===void 0);if(u.route.lazy||h){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,u,f)=>{let p,h=!1,m=null,x=null;n&&(p=a&&u.route.id?a[u.route.id]:void 0,m=u.route.errorElement||Y2,l&&(c<0&&f===0?(h=!0,x=null):c===f&&(h=!0,x=u.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,f+1)),w=()=>{let b;return p?b=m:h?b=x:u.route.Component?b=v.createElement(u.route.Component,null):u.route.element?b=u.route.element:b=d,v.createElement(X2,{match:u,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?v.createElement(K2,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:w(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):w()},null)}var kb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(kb||{}),$u=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}($u||{});function J2(e){let t=v.useContext(cm);return t||qe(!1),t}function eP(e){let t=v.useContext(U2);return t||qe(!1),t}function tP(e){let t=v.useContext(ns);return t||qe(!1),t}function Cb(e){let t=tP(),n=t.matches[t.matches.length-1];return n.route.id||qe(!1),n.route.id}function nP(){var e;let t=v.useContext(xb),n=eP($u.UseRouteError),r=Cb($u.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function rP(){let{router:e}=J2(kb.UseNavigateStable),t=Cb($u.UseNavigateStable),n=v.useRef(!1);return wb(()=>{n.current=!0}),v.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Pa({fromRouteId:t},s)))},[e,t])}const qv={};function iP(e,t){qv[t]||(qv[t]=!0,console.warn(t))}const Gv=(e,t,n)=>iP(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function sP(e,t){e!=null&&e.v7_startTransition||Gv("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&&Gv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const oP="startTransition",Qv=sf[oP];function aP(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=v.useRef();o.current==null&&(o.current=y2({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,c]=v.useState({action:a.action,location:a.location}),{v7_startTransition:d}=s||{},u=v.useCallback(f=>{d&&Qv?Qv(()=>c(f)):c(f)},[c,d]);return v.useLayoutEffect(()=>a.listen(u),[a,u]),v.useEffect(()=>sP(s),[s]),v.createElement(lP,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function pp(e){qe(!1)}function lP(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:s,static:o=!1,future:a}=e;Xa()&&qe(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:s,static:o,future:Pa({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=es(r));let{pathname:d="/",search:u="",hash:f="",state:p=null,key:h="default"}=r,m=v.useMemo(()=>{let x=um(d,l);return x==null?null:{location:{pathname:x,search:u,hash:f,state:p,key:h},navigationType:i}},[l,d,u,f,p,h,i]);return m==null?null:v.createElement(ts.Provider,{value:c},v.createElement(yc.Provider,{children:n,value:m}))}function uP(e){let{children:t,location:n}=e;return q2(hp(t),n)}new Promise(()=>{});function hp(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let s=[...t,i];if(r.type===v.Fragment){n.push.apply(n,hp(r.props.children,s));return}r.type!==pp&&qe(!1),!r.props.index||!r.props.children||qe(!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=hp(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 mp(){return mp=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},mp.apply(this,arguments)}function cP(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 dP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fP(e,t){return e.button===0&&(!t||t==="_self")&&!dP(e)}const pP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hP="6";try{window.__reactRouterVersion=hP}catch{}const mP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vP=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u}=t,f=cP(t,pP),{basename:
|
|
67
|
+
*/function mp(){return mp=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},mp.apply(this,arguments)}function cP(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 dP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fP(e,t){return e.button===0&&(!t||t==="_self")&&!dP(e)}const pP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hP="6";try{window.__reactRouterVersion=hP}catch{}const mP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vP=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u}=t,f=cP(t,pP),{basename:p}=v.useContext(ts),h,m=!1;if(typeof c=="string"&&gP.test(c)&&(h=c,mP))try{let b=new URL(window.location.href),k=c.startsWith("//")?new URL(b.protocol+c):new URL(c),T=um(k.pathname,p);k.origin===b.origin&&T!=null?c=T+k.search+k.hash:m=!0}catch{}let x=H2(c,{relative:i}),g=yP(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:u});function w(b){r&&r(b),b.defaultPrevented||g(b)}return v.createElement("a",mp({},f,{href:h||x,onClick:m||s?r:w,ref:n,target:l}))});var Yv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yv||(Yv={}));var Kv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Kv||(Kv={}));function yP(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=bb(),c=Za(),d=Sb(e,{relative:o});return v.useCallback(u=>{if(fP(u,n)){u.preventDefault();let f=r!==void 0?r:fp(c)===fp(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,d,r,i,n,e,s,o,a])}const xP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Xv=e=>{let t;const n=new Set,r=(d,u)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const p=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(xP?"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()}},c=t=e(r,i,l);return l},wP=e=>e?Xv(e):Xv;var Tb={exports:{}},Eb={},_b={exports:{}},Pb={};/**
|
|
68
68
|
* @license React
|
|
69
69
|
* use-sync-external-store-shim.production.min.js
|
|
70
70
|
*
|
|
@@ -80,11 +80,11 @@ 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 xc=v,AP=RP;function OP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var DP=typeof Object.is=="function"?Object.is:OP,MP=AP.useSyncExternalStore,FP=xc.useRef,NP=xc.useEffect,LP=xc.useMemo,IP=xc.useDebugValue;Eb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=FP(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=LP(function(){function l(
|
|
83
|
+
*/var xc=v,AP=RP;function OP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var DP=typeof Object.is=="function"?Object.is:OP,MP=AP.useSyncExternalStore,FP=xc.useRef,NP=xc.useEffect,LP=xc.useMemo,IP=xc.useDebugValue;Eb.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=FP(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=LP(function(){function l(p){if(!c){if(c=!0,d=p,p=r(p),i!==void 0&&o.hasValue){var h=o.value;if(i(h,p))return u=h}return u=p}if(h=u,DP(d,p))return h;var m=r(p);return i!==void 0&&i(h,m)?h:(d=p,u=m)}var c=!1,d,u,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=MP(e,s[0],s[1]);return NP(function(){o.hasValue=!0,o.value=a},[a]),IP(a),a};Tb.exports=Eb;var $P=Tb.exports;const BP=Xi($P),jb={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:zP}=N,{useSyncExternalStoreWithSelector:VP}=BP;let Zv=!1;const UP=e=>e;function HP(e,t=UP,n){(jb?"production":void 0)!=="production"&&n&&!Zv&&(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"),Zv=!0);const r=VP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return zP(r),r}const Jv=e=>{(jb?"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"?wP(e):e,n=(r,i)=>HP(t,r,i);return Object.assign(n,t),n},WP=e=>e?Jv(e):Jv,kt=WP(e=>({widget:null,open:localStorage.getItem("lc:widget:isHaveChat")==="true",isInputFocused:!1,isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},soundPath:void 0,isTooltipVisible:!0,onTooltipClose:void 0,setIsTooltipVisible:t=>e({isTooltipVisible:t}),setOnTooltipClose:t=>e({onTooltipClose:t}),setOpen:t=>{e({open:t})},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})},onOpen:void 0,onClose:void 0,setOnOpen:t=>e({onOpen:t}),setOnClose:t=>e({onClose:t}),setIsInputFocused:t=>e({isInputFocused:t})})),qP={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"}},ey={primary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},secondary:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},danger:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},success:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"},warning:{solid:"border border-transparent transition-colors",outline:"bg-transparent border transition-colors",subtle:"border border-transparent transition-colors",link:"hover:underline px-1.5 py-0 bg-transparent !border-none transition-colors"}};var Rb={exports:{}};/*!
|
|
84
84
|
Copyright (c) 2018 Jed Watson.
|
|
85
85
|
Licensed under the MIT License (MIT), see
|
|
86
86
|
http://jedwatson.github.io/classnames
|
|
87
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Rb);var GP=Rb.exports;const ge=Xi(GP),dm=v.createContext({});function wc(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const fm=typeof window<"u",Ab=fm?v.useLayoutEffect:v.useEffect,bc=v.createContext(null),pm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class QP extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function YP({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(pm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d,right:u}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${u}`;i.current.dataset.motionPopId=r;const
|
|
87
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Rb);var GP=Rb.exports;const ge=Xi(GP),dm=v.createContext({});function wc(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const fm=typeof window<"u",Ab=fm?v.useLayoutEffect:v.useEffect,bc=v.createContext(null),pm=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class QP extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function YP({children:e,isPresent:t,anchorX:n}){const r=v.useId(),i=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=v.useContext(pm);return v.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d,right:u}=s.current;if(t||!i.current||!a||!l)return;const f=n==="left"?`left: ${d}`:`right: ${u}`;i.current.dataset.motionPopId=r;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(`
|
|
88
88
|
[data-motion-pop-id="${r}"] {
|
|
89
89
|
position: absolute !important;
|
|
90
90
|
width: ${a}px !important;
|
|
@@ -92,48 +92,48 @@ Error generating stack: `+s.message+`
|
|
|
92
92
|
${f}px !important;
|
|
93
93
|
top: ${c}px !important;
|
|
94
94
|
}
|
|
95
|
-
`),()=>{document.head.removeChild(h)}},[t]),y.jsx(QP,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const KP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=wc(XP),c=v.useId();let d=!0,u=v.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,r]);return s&&d&&(u={...u}),v.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=y.jsx(YP,{isPresent:n,anchorX:a,children:e})),y.jsx(bc.Provider,{value:u,children:e})};function XP(){return new Map}function Ob(e=!0){const t=v.useContext(bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const jl=e=>e.key||"";function ty(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Kr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Ob(o),d=v.useMemo(()=>ty(e),[e]),u=o&&!l?[]:d.map(jl),f=v.useRef(!0),h=v.useRef(d),m=wc(()=>new Map),[p,b]=v.useState(d),[g,w]=v.useState(d);Ab(()=>{f.current=!1,h.current=d;for(let T=0;T<g.length;T++){const E=jl(g[T]);u.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[g,u.length,u.join("-")]);const x=[];if(d!==p){let T=[...d];for(let E=0;E<g.length;E++){const _=g[E],j=jl(_);u.includes(j)||(T.splice(E,0,_),x.push(_))}return s==="wait"&&x.length&&(T=x),w(ty(T)),b(d),null}const{forceRender:k}=v.useContext(dm);return y.jsx(y.Fragment,{children:g.map(T=>{const E=jl(T),_=o&&!l?!1:d===g||u.includes(E),j=()=>{if(m.has(E))m.set(E,!0);else return;let P=!0;m.forEach(O=>{O||(P=!1)}),P&&(k==null||k(),w(h.current),o&&(c==null||c()),r&&r())};return y.jsx(KP,{isPresent:_,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:_?void 0:j,anchorX:a,children:T},E)})})};function hm(e,t){e.indexOf(t)===-1&&e.push(t)}function mm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let gp=()=>{};const vp={skipAnimations:!1,useManualTiming:!1};function gm(e){let t;return()=>(t===void 0&&(t=e()),t)}const ln=e=>e,ja=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class vm{constructor(){this.subscriptions=[]}add(t){return hm(this.subscriptions,t),()=>mm(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 Vn=e=>e*1e3,Un=e=>e/1e3;function Db(e,t){return t?e*(1e3/t):0}const ZP=gm(()=>window.ScrollTimeline!==void 0);class JP{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(ZP()&&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 ej extends JP{then(t,n){return this.finished.finally(t).then(()=>{})}}const ny={value:null,addProjectionMetrics:null},ym=e=>Array.isArray(e)&&typeof e[0]=="number",tj={};function nj(e,t){const n=gm(e);return()=>tj[t]??n()}const Ra=nj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mb=(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)})`},Wo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,yp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wo([0,.65,.55,1]),circOut:Wo([.55,0,1,.45]),backIn:Wo([.31,.01,.66,-.59]),backOut:Wo([.33,1.53,.69,.99])};function Fb(e,t){if(e)return typeof e=="function"&&Ra()?Mb(e,t):ym(e)?Wo(e):Array.isArray(e)?e.map(n=>Fb(n,t)||yp.easeOut):yp[e]}function rj(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=Fb(a,i);return Array.isArray(u)&&(d.easing=u),e.animate(d,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function xm(e){return typeof e=="function"&&"applyToOptions"in e}function wm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Bu=2e4;function bm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Bu;)t+=n,r=e.next(t);return t>=Bu?1/0:t}function ij(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(bm(r),Bu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Un(i)}}function Nb(e){return!!(typeof e=="function"&&Ra()||!e||typeof e=="string"&&(e in yp||Ra())||ym(e)||Array.isArray(e)&&e.every(Nb))}function ry(e,t){e.timeline=t,e.onfinish=null}const Rl=["read","resolveKeyframes","update","preRender","render","postRender"];function sj(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 c(u){o.has(u)&&(d.schedule(u),e()),l++,u(a)}const d={schedule:(u,f=!1,h=!1)=>{const p=h&&i?n:r;return f&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&ny.value&&ny.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(u))}};return d}const oj=40;function Lb(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Rl.reduce((g,w)=>(g[w]=sj(s,t?w:void 0),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:f}=o,h=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,oj),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),u.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Rl.reduce((g,w)=>{const x=o[w];return g[w]=(k,T=!1,E=!1)=>(n||m(),x.schedule(k,T,E)),g},{}),cancel:g=>{for(let w=0;w<Rl.length;w++)o[Rl[w]].cancel(g)},state:i,steps:o}}const{schedule:Sm,cancel:aB}=Lb(queueMicrotask,!1),{schedule:Se,cancel:ni,state:it,steps:Pd}=Lb(typeof requestAnimationFrame<"u"?requestAnimationFrame:ln,!0);let eu;function aj(){eu=void 0}const Hn={now:()=>(eu===void 0&&Hn.set(it.isProcessing||vp.useManualTiming?it.timestamp:performance.now()),eu),set:e=>{eu=e,queueMicrotask(aj)}},gn={x:!1,y:!1};function Ib(){return gn.x||gn.y}function lj(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 uj(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 $b(e,t){const n=uj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function iy(e){return!(e.pointerType==="touch"||Ib())}function cj(e,t,n={}){const[r,i,s]=$b(e,n),o=a=>{if(!iy(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{iy(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Bb=(e,t)=>t?e===t?!0:Bb(e,t.parentElement):!1,km=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fj(e){return dj.has(e.tagName)||e.tabIndex!==-1}const qo=new WeakSet;function sy(e){return t=>{t.key==="Enter"&&e(t)}}function jd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const pj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=sy(()=>{if(qo.has(n))return;jd(n,"down");const i=sy(()=>{jd(n,"up")}),s=()=>jd(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 oy(e){return km(e)&&!Ib()}function hj(e,t,n={}){const[r,i,s]=$b(e,n),o=a=>{const l=a.currentTarget;if(!oy(a)||qo.has(l))return;qo.add(l);const c=t(l,a),d=(h,m)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),!(!oy(h)||!qo.has(l))&&(qo.delete(l),typeof c=="function"&&c(h,{success:m}))},u=h=>{d(h,l===window||l===document||n.useGlobalTarget||Bb(l,h.target))},f=h=>{d(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>pj(c,i)),!fj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const ay=30,mj=e=>!isNaN(parseFloat(e));class gj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Hn.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=Hn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mj(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 vm);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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=Hn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ay)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ay);return Db(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 Aa(e,t){return new gj(e,t)}const zb=v.createContext({strict:!1}),ly={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"]},fo={};for(const e in ly)fo[e]={isEnabled:t=>ly[e].some(n=>!!t[n])};function vj(e){for(const t in e)fo[t]={...fo[t],...e[t]}}const yj=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 zu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||yj.has(e)}let Vb=e=>!zu(e);function xj(e){e&&(Vb=t=>t.startsWith("on")?!zu(t):e(t))}try{xj(require("@emotion/is-prop-valid").default)}catch{}function wj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Vb(i)||n===!0&&zu(i)||!t&&!zu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function bj(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 Sc=v.createContext({});function kc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Oa(e){return typeof e=="string"||Array.isArray(e)}const Cm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tm=["initial",...Cm];function Cc(e){return kc(e.animate)||Tm.some(t=>Oa(e[t]))}function Ub(e){return!!(Cc(e)||e.variants)}function Sj(e,t){if(Cc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Oa(n)?n:void 0,animate:Oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function kj(e){const{initial:t,animate:n}=Sj(e,v.useContext(Sc));return v.useMemo(()=>({initial:t,animate:n}),[uy(t),uy(n)])}function uy(e){return Array.isArray(e)?e.join(" "):e}const Cj=Symbol.for("motionComponentSymbol");function Rs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Tj(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Rs(n)&&(n.current=r))},[t])}const Em=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ej="framerAppearId",Hb="data-"+Em(Ej),Wb=v.createContext({});function _j(e,t,n,r,i){var p,b;const{visualElement:s}=v.useContext(Sc),o=v.useContext(zb),a=v.useContext(bc),l=v.useContext(pm).reducedMotion,c=v.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,u=v.useContext(Wb);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Pj(c.current,n,i,u);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const h=n[Hb],m=v.useRef(!!h&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Ab(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Sm.render(d.render),m.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,h)}),m.current=!1))}),d}function Pj(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:qb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Rs(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function qb(e){if(e)return e.options.allowProjection!==!1?e.projection:qb(e.parent)}function jj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&vj(e);function s(a,l){let c;const d={...v.useContext(pm),...a,layoutId:Rj(a)},{isStatic:u}=d,f=kj(a),h=r(a,u);if(!u&&fm){Aj();const m=Oj(d);c=m.MeasureLayout,f.visualElement=_j(i,h,d,t,m.ProjectionNode)}return y.jsxs(Sc.Provider,{value:f,children:[c&&f.visualElement?y.jsx(c,{visualElement:f.visualElement,...d}):null,n(i,a,Tj(h,f.visualElement,l),h,u,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[Cj]=i,o}function Rj({layoutId:e}){const t=v.useContext(dm).id;return t&&e!==void 0?t+"-"+e:e}function Aj(e,t){v.useContext(zb).strict}function Oj(e){const{drag:t,layout:n}=fo;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 Gb=e=>t=>typeof t=="string"&&t.startsWith(e),_m=Gb("--"),Dj=Gb("var(--"),Pm=e=>Dj(e)?Mj.test(e.split("/*")[0].trim()):!1,Mj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Da={};function Fj(e){for(const t in e)Da[t]=e[t],_m(t)&&(Da[t].isCSSVariable=!0)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rs=new Set(ko);function Qb(e,{layout:t,layoutId:n}){return rs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Da[e]||e==="opacity")}const ht=e=>!!(e&&e.getVelocity),Yb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ma={...Co,transform:e=>pr(0,1,e)},Al={...Co,default:1},Ja=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sr=Ja("deg"),Wn=Ja("%"),ee=Ja("px"),Nj=Ja("vh"),Lj=Ja("vw"),cy={...Wn,parse:e=>Wn.parse(e)/100,transform:e=>Wn.transform(e*100)},Ij={borderWidth:ee,borderTopWidth:ee,borderRightWidth:ee,borderBottomWidth:ee,borderLeftWidth:ee,borderRadius:ee,radius:ee,borderTopLeftRadius:ee,borderTopRightRadius:ee,borderBottomRightRadius:ee,borderBottomLeftRadius:ee,width:ee,maxWidth:ee,height:ee,maxHeight:ee,top:ee,right:ee,bottom:ee,left:ee,padding:ee,paddingTop:ee,paddingRight:ee,paddingBottom:ee,paddingLeft:ee,margin:ee,marginTop:ee,marginRight:ee,marginBottom:ee,marginLeft:ee,backgroundPositionX:ee,backgroundPositionY:ee},$j={rotate:Sr,rotateX:Sr,rotateY:Sr,rotateZ:Sr,scale:Al,scaleX:Al,scaleY:Al,scaleZ:Al,skew:Sr,skewX:Sr,skewY:Sr,distance:ee,translateX:ee,translateY:ee,translateZ:ee,x:ee,y:ee,z:ee,perspective:ee,transformPerspective:ee,opacity:Ma,originX:cy,originY:cy,originZ:ee},dy={...Co,transform:Math.round},jm={...Ij,...$j,zIndex:dy,size:ee,fillOpacity:Ma,strokeOpacity:Ma,numOctaves:dy},Bj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zj=ko.length;function Vj(e,t,n){let r="",i=!0;for(let s=0;s<zj;s++){const o=ko[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 c=Yb(a,jm[o]);if(!l){i=!1;const d=Bj[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Rm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(rs.has(l)){o=!0;continue}else if(_m(l)){i[l]=c;continue}else{const d=Yb(c,jm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Vj(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${c} ${d}`}}const Am=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Kb(e,t,n){for(const r in t)!ht(t[r])&&!Qb(r,n)&&(e[r]=t[r])}function Uj({transformTemplate:e},t){return v.useMemo(()=>{const n=Am();return Rm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Hj(e,t){const n=e.style||{},r={};return Kb(r,n,e),Object.assign(r,Uj(e,t)),r}function Wj(e,t){const n={},r=Hj(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 qj=["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 Om(e){return typeof e!="string"||e.includes("-")?!1:!!(qj.indexOf(e)>-1||/[A-Z]/u.test(e))}const Gj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qj={offset:"strokeDashoffset",array:"strokeDasharray"};function Yj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Gj:Qj;e[s.offset]=ee.transform(-r);const o=ee.transform(t),a=ee.transform(n);e[s.array]=`${o} ${a}`}function fy(e,t,n){return typeof e=="string"?e:ee.transform(t+n*e)}function Kj(e,t,n){const r=fy(t,e.x,e.width),i=fy(n,e.y,e.height);return`${r} ${i}`}function Dm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Rm(e,c,u),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=Kj(m,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&&Yj(f,o,a,l,!1)}const Xb=()=>({...Am(),attrs:{}}),Mm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Xj(e,t,n,r){const i=v.useMemo(()=>{const s=Xb();return Dm(s,t,Mm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Kb(s,e.style,e),i.style={...s,...i.style}}return i}function Zj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Om(n)?Xj:Wj)(r,s,o,n),c=wj(r,typeof n=="string",e),d=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,f=v.useMemo(()=>ht(u)?u.get():u,[u]);return v.createElement(n,{...d,children:f})}}function py(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fm(e,t,n,r){if(typeof t=="function"){const[i,s]=py(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]=py(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const xp=e=>Array.isArray(e),Jj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),eR=e=>xp(e)?e[e.length-1]||0:e;function tu(e){const t=ht(e)?e.get():e;return Jj(t)?t.toValue():t}function tR({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:nR(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Zb=e=>(t,n)=>{const r=v.useContext(Sc),i=v.useContext(bc),s=()=>tR(e,t,r,i);return n?s():wc(s)};function nR(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=tu(s[f]);let{initial:o,animate:a}=e;const l=Cc(e),c=Ub(e);t&&c&&!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 u=d?a:o;if(u&&typeof u!="boolean"&&!kc(u)){const f=Array.isArray(u)?u:[u];for(let h=0;h<f.length;h++){const m=Fm(e,f[h]);if(m){const{transitionEnd:p,transition:b,...g}=m;for(const w in g){let x=g[w];if(Array.isArray(x)){const k=d?x.length-1:0;x=x[k]}x!==null&&(i[w]=x)}for(const w in p)i[w]=p[w]}}}return i}function Nm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ht(r[o])||t.style&&ht(t.style[o])||Qb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const rR={useVisualState:Zb({scrapeMotionValuesFromProps:Nm,createRenderState:Am})};function Jb(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 eS(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 tS=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 nS(e,t,n,r){eS(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(tS.has(i)?i:Em(i),t.attrs[i])}function rS(e,t,n){const r=Nm(e,t,n);for(const i in e)if(ht(e[i])||ht(t[i])){const s=ko.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const hy=["x","y","width","height","cx","cy","r"],iR={useVisualState:Zb({scrapeMotionValuesFromProps:rS,createRenderState:Xb,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(rs.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<hy.length;a++){const l=hy[a];e[l]!==t[l]&&(o=!0)}o&&Se.read(()=>{Jb(n,r),Se.render(()=>{Dm(r,i,Mm(n.tagName),e.transformTemplate),nS(n,r)})})}})};function sR(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Om(r)?iR:rR,preloadedFeatures:e,useRender:Zj(i),createVisualElement:t,Component:r};return jj(o)}}function Fa(e,t,n){const r=e.getProps();return Fm(r,t,n!==void 0?n:r.custom,e)}const iS=new Set(["width","height","top","left","right","bottom",...ko]);function oR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Aa(n))}function aR(e,t){const n=Fa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=eR(s[o]);oR(e,o,a)}}function lR(e){return!!(ht(e)&&e.add)}function wp(e,t){const n=e.getValue("willChange");if(lR(n))return n.add(t);if(!n&&vp.WillChange){const r=new vp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function sS(e){return e.props[Hb]}const oS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uR=1e-7,cR=12;function dR(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=oS(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>uR&&++a<cR);return o}function el(e,t,n,r){if(e===t&&n===r)return ln;const i=s=>dR(s,0,1,e,n);return s=>s===0||s===1?s:oS(i(s),t,r)}const aS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lS=e=>t=>1-e(1-t),uS=el(.33,1.53,.69,.99),Lm=lS(uS),cS=aS(Lm),dS=e=>(e*=2)<1?.5*Lm(e):.5*(2-Math.pow(2,-10*(e-1))),Im=e=>1-Math.sin(Math.acos(e)),fS=lS(Im),pS=aS(Im),hS=e=>/^0[^.\s]+$/u.test(e);function fR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hS(e):!0}const ra=e=>Math.round(e*1e5)/1e5,$m=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pR(e){return e==null}const hR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bm=(e,t)=>n=>!!(typeof n=="string"&&hR.test(n)&&n.startsWith(e)||t&&!pR(n)&&Object.prototype.hasOwnProperty.call(n,t)),mS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match($m);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},mR=e=>pr(0,255,e),Rd={...Co,transform:e=>Math.round(mR(e))},_i={test:Bm("rgb","red"),parse:mS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rd.transform(e)+", "+Rd.transform(t)+", "+Rd.transform(n)+", "+ra(Ma.transform(r))+")"};function gR(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 bp={test:Bm("#"),parse:gR,transform:_i.transform},As={test:Bm("hsl","hue"),parse:mS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wn.transform(ra(t))+", "+Wn.transform(ra(n))+", "+ra(Ma.transform(r))+")"},ft={test:e=>_i.test(e)||bp.test(e)||As.test(e),parse:e=>_i.test(e)?_i.parse(e):As.test(e)?As.parse(e):bp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_i.transform(e):As.transform(e)},vR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match($m))==null?void 0:t.length)||0)+(((n=e.match(vR))==null?void 0:n.length)||0)>0}const gS="number",vS="color",xR="var",wR="var(",my="${}",bR=/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 Na(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(bR,l=>(ft.test(l)?(r.color.push(s),i.push(vS),n.push(ft.parse(l))):l.startsWith(wR)?(r.var.push(s),i.push(xR),n.push(l)):(r.number.push(s),i.push(gS),n.push(parseFloat(l))),++s,my)).split(my);return{values:n,split:a,indexes:r,types:i}}function yS(e){return Na(e).values}function xS(e){const{split:t,types:n}=Na(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===gS?s+=ra(i[o]):a===vS?s+=ft.transform(i[o]):s+=i[o]}return s}}const SR=e=>typeof e=="number"?0:e;function kR(e){const t=yS(e);return xS(e)(t.map(SR))}const ri={test:yR,parse:yS,createTransformer:xS,getAnimatableNone:kR},CR=new Set(["brightness","contrast","saturate","opacity"]);function TR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($m)||[];if(!r)return e;const i=n.replace(r,"");let s=CR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const ER=/\b([a-z-]*)\(.*?\)/gu,Sp={...ri,getAnimatableNone:e=>{const t=e.match(ER);return t?t.map(TR).join(" "):e}},_R={...jm,color:ft,backgroundColor:ft,outlineColor:ft,fill:ft,stroke:ft,borderColor:ft,borderTopColor:ft,borderRightColor:ft,borderBottomColor:ft,borderLeftColor:ft,filter:Sp,WebkitFilter:Sp},wS=e=>_R[e];function bS(e,t){let n=wS(e);return n!==Sp&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const PR=new Set(["auto","none","0"]);function jR(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!PR.has(s)&&Na(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=bS(n,i)}const Pi=e=>e*180/Math.PI,kp=e=>{const t=Pi(Math.atan2(e[1],e[0]));return Cp(t)},RR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:kp,rotateZ:kp,skewX:e=>Pi(Math.atan(e[1])),skewY:e=>Pi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cp=e=>(e=e%360,e<0&&(e+=360),e),gy=kp,vy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),AR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vy,scaleY:yy,scale:e=>(vy(e)+yy(e))/2,rotateX:e=>Cp(Pi(Math.atan2(e[6],e[5]))),rotateY:e=>Cp(Pi(Math.atan2(-e[2],e[0]))),rotateZ:gy,rotate:gy,skewX:e=>Pi(Math.atan(e[4])),skewY:e=>Pi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xy(e){return e.includes("scale")?1:0}function Tp(e,t){if(!e||e==="none")return xy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=AR,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=RR,i=a}if(!i)return xy(t);const s=r[t],o=i[1].split(",").map(DR);return typeof s=="function"?s(o):o[s]}const OR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Tp(n,t)};function DR(e){return parseFloat(e.trim())}const wy=e=>e===Co||e===ee,MR=new Set(["x","y","z"]),FR=ko.filter(e=>!MR.has(e));function NR(e){const t=[];return FR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const po={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})=>Tp(t,"x"),y:(e,{transform:t})=>Tp(t,"y")};po.translateX=po.x;po.translateY=po.y;const Bi=new Set;let Ep=!1,_p=!1;function SS(){if(_p){const e=Array.from(Bi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=NR(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)})}_p=!1,Ep=!1,Bi.forEach(e=>e.complete()),Bi.clear()}function kS(){Bi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_p=!0)})}function LR(){kS(),SS()}class zm{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?(Bi.add(this),Ep||(Ep=!0,Se.read(kS),Se.resolveKeyframes(SS))):(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),Bi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Bi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const CS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),IR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $R(e){const t=IR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function TS(e,t,n=1){const[r,i]=$R(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return CS(o)?parseFloat(o):o}return Pm(i)?TS(i,t,n+1):i}const ES=e=>t=>t.test(e),BR={test:e=>e==="auto",parse:e=>e},_S=[Co,ee,Wn,Sr,Lj,Nj,BR],by=e=>_S.find(ES(e));class PS extends zm{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 c=t[l];if(typeof c=="string"&&(c=c.trim(),Pm(c))){const d=TS(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!iS.has(r)||t.length!==2)return;const[i,s]=t,o=by(i),a=by(s);if(o!==a)if(wy(o)&&wy(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)fR(t[i])&&r.push(i);r.length&&jR(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=po[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]=po[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,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Sy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ri.test(e)||e==="0")&&!e.startsWith("url("));function zR(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 VR(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=Sy(i,t),a=Sy(s,t);return!o||!a?!1:zR(e)||(n==="spring"||xm(n))&&r}const UR=e=>e!==null;function Tc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(UR),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const HR=40;class jS{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=Hn.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>HR?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&LR(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Hn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!VR(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Tc(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 je=(e,t,n)=>e+(t-e)*n;function Ad(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 WR({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=Ad(l,a,e+1/3),s=Ad(l,a,e),o=Ad(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Vu(e,t){return n=>n>0?t:e}const Od=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},qR=[bp,_i,As],GR=e=>qR.find(t=>t.test(e));function ky(e){const t=GR(e);if(!t)return!1;let n=t.parse(e);return t===As&&(n=WR(n)),n}const Cy=(e,t)=>{const n=ky(e),r=ky(t);if(!n||!r)return Vu(e,t);const i={...n};return s=>(i.red=Od(n.red,r.red,s),i.green=Od(n.green,r.green,s),i.blue=Od(n.blue,r.blue,s),i.alpha=je(n.alpha,r.alpha,s),_i.transform(i))},QR=(e,t)=>n=>t(e(n)),tl=(...e)=>e.reduce(QR),Pp=new Set(["none","hidden"]);function YR(e,t){return Pp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function KR(e,t){return n=>je(e,t,n)}function Vm(e){return typeof e=="number"?KR:typeof e=="string"?Pm(e)?Vu:ft.test(e)?Cy:JR:Array.isArray(e)?RS:typeof e=="object"?ft.test(e)?Cy:XR:Vu}function RS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Vm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function XR(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function ZR(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 JR=(e,t)=>{const n=ri.createTransformer(t),r=Na(e),i=Na(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?Pp.has(e)&&!i.values.length||Pp.has(t)&&!r.values.length?YR(e,t):tl(RS(ZR(r,i),i.values),n):Vu(e,t)};function AS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?je(e,t,n):Vm(e)(e,t)}const eA=5;function OS(e,t,n){const r=Math.max(t-eA,0);return Db(n-e(r),t-r)}const Me={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},Dd=.001;function tA({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:r=Me.mass}){let i,s,o=1-t;o=pr(Me.minDamping,Me.maxDamping,o),e=pr(Me.minDuration,Me.maxDuration,Un(e)),o<1?(i=c=>{const d=c*o,u=d*e,f=d-n,h=jp(c,o),m=Math.exp(-u);return Dd-f/h*m},s=c=>{const u=c*o*e,f=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-u),p=jp(Math.pow(c,2),o);return(-i(c)+Dd>0?-1:1)*((f-h)*m)/p}):(i=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Dd+d*u},s=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=rA(i,s,a);if(e=Vn(e),isNaN(l))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const nA=12;function rA(e,t,n){let r=n;for(let i=1;i<nA;i++)r=r-e(r)/t(r);return r}function jp(e,t){return e*Math.sqrt(1-t*t)}const iA=["duration","bounce"],sA=["stiffness","damping","mass"];function Ty(e,t){return t.some(n=>e[n]!==void 0)}function oA(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!Ty(e,sA)&&Ty(e,iA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*pr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Me.mass,stiffness:i,damping:s}}else{const n=tA(e);t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function Uu(e=Me.visualDuration,t=Me.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:c,mass:d,duration:u,velocity:f,isResolvedFromDuration:h}=oA({...n,velocity:-Un(n.velocity||0)}),m=f||0,p=c/(2*Math.sqrt(l*d)),b=o-s,g=Un(Math.sqrt(l/d)),w=Math.abs(b)<5;r||(r=w?Me.restSpeed.granular:Me.restSpeed.default),i||(i=w?Me.restDelta.granular:Me.restDelta.default);let x;if(p<1){const T=jp(g,p);x=E=>{const _=Math.exp(-p*g*E);return o-_*((m+p*g*b)/T*Math.sin(T*E)+b*Math.cos(T*E))}}else if(p===1)x=T=>o-Math.exp(-g*T)*(b+(m+g*b)*T);else{const T=g*Math.sqrt(p*p-1);x=E=>{const _=Math.exp(-p*g*E),j=Math.min(T*E,300);return o-_*((m+p*g*b)*Math.sinh(j)+T*b*Math.cosh(j))/T}}const k={calculatedDuration:h&&u||null,next:T=>{const E=x(T);if(h)a.done=T>=u;else{let _=0;p<1&&(_=T===0?Vn(m):OS(x,T,E));const j=Math.abs(_)<=r,P=Math.abs(o-E)<=i;a.done=j&&P}return a.value=a.done?o:E,a},toString:()=>{const T=Math.min(bm(k),Bu),E=Mb(_=>k.next(T*_).value,T,30);return T+"ms "+E},toTransition:()=>{}};return k}Uu.applyToOptions=e=>{const t=ij(e,100,Uu);return e.ease=Ra()?t.ease:"easeOut",e.duration=Vn(t.duration),e.type="keyframes",e};function Ey({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},h=j=>a!==void 0&&j<a||l!==void 0&&j>l,m=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let p=n*t;const b=u+p,g=o===void 0?b:o(b);g!==b&&(p=g-u);const w=j=>-p*Math.exp(-j/r),x=j=>g+w(j),k=j=>{const P=w(j),O=x(j);f.done=Math.abs(P)<=c,f.value=f.done?g:O};let T,E;const _=j=>{h(f.value)&&(T=j,E=Uu({keyframes:[f.value,m(f.value)],velocity:OS(x,j,f.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:j=>{let P=!1;return!E&&T===void 0&&(P=!0,k(j),_(j)),T!==void 0&&j>=T?E.next(j-T):(!P&&k(j),f)}}}const aA=el(.42,0,1,1),lA=el(0,0,.58,1),DS=el(.42,0,.58,1),uA=e=>Array.isArray(e)&&typeof e[0]!="number",_y={linear:ln,easeIn:aA,easeInOut:DS,easeOut:lA,circIn:Im,circInOut:pS,circOut:fS,backIn:Lm,backInOut:cS,backOut:uS,anticipate:dS},Py=e=>{if(ym(e)){gp(e.length===4);const[t,n,r,i]=e;return el(t,n,r,i)}else if(typeof e=="string")return gp(_y[e]!==void 0),_y[e];return e};function cA(e,t,n){const r=[],i=n||AS,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]||ln:t;a=tl(l,a)}r.push(a)}return r}function dA(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(gp(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=cA(t,r,i),l=a.length,c=d=>{if(o&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=ja(e[u],e[u+1],d);return a[u](f)};return n?d=>c(pr(e[0],e[s-1],d)):c}function fA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ja(0,t,r);e.push(je(n,1,i))}}function pA(e){const t=[0];return fA(t,e.length-1),t}function hA(e,t){return e.map(n=>n*t)}function mA(e,t){return e.map(()=>t||DS).splice(0,e.length-1)}function Hu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=uA(r)?r.map(Py):Py(r),s={done:!1,value:t[0]},o=hA(n&&n.length===t.length?n:pA(t),e),a=dA(o,t,{ease:Array.isArray(i)?i:mA(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const gA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Se.update(t,!0),stop:()=>ni(t),now:()=>it.isProcessing?it.timestamp:Hn.now()}},vA={decay:Ey,inertia:Ey,tween:Hu,keyframes:Hu,spring:Uu},yA=e=>e/100;class Um extends jS{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)||zm,a=(l,c)=>this.onKeyframesResolved(l,c);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=xm(n)?n:vA[n]||Hu;let l,c;a!==Hu&&typeof t[0]!="number"&&(l=tl(yA,AS(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=bm(d));const{calculatedDuration:u}=d,f=u+i,h=f*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:f,totalDuration:h}}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:j}=this.options;return{done:!0,value:j[j.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:m,repeatDelay:p,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 g=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let x=this.currentTime,k=s;if(h){const j=Math.min(this.currentTime,d)/u;let P=Math.floor(j),O=j%1;!O&&j>=1&&(O=1),O===1&&P--,P=Math.min(P,h+1),!!(P%2)&&(m==="reverse"?(O=1-O,p&&(O-=p/u)):m==="mirror"&&(k=o)),x=pr(0,1,O)*u}const T=w?{done:!1,value:l[0]}:k.next(x);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return _&&i!==void 0&&(T.value=Tc(l,this.options,i)),b&&b(T.value),_&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Un(t.calculatedDuration):0}get time(){return Un(this.currentTime)}set time(t){t=Vn(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=Un(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=gA,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 xA=new Set(["opacity","clipPath","filter","transform"]),wA=gm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Wu=10,bA=2e4;function SA(e){return xm(e.type)||e.type==="spring"||!Nb(e.ease)}function kA(e,t){const n=new Um({...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<bA;)r=n.sample(s),i.push(r.value),s+=Wu;return{times:void 0,keyframes:i,duration:s-Wu,ease:"linear"}}const MS={anticipate:dS,backInOut:cS,circInOut:pS};function CA(e){return e in MS}class jy extends jS{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new PS(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:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Ra()&&CA(s)&&(s=MS[s]),SA(this.options)){const{onComplete:u,onUpdate:f,motionValue:h,element:m,...p}=this.options,b=kA(t,p);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const d=rj(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(ry(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:u}=this.options;a.set(Tc(t,this.options,n)),u&&u(),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 Un(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Un(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Vn(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 ln;const{animation:r}=n;ry(r,t)}return ln}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:c,onUpdate:d,onComplete:u,element:f,...h}=this.options,m=new Um({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),p=Vn(this.time);c.setWithVelocity(m.sample(p-Wu).value,m.sample(p).value,Wu)}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:c}=n.owner.getProps();return wA()&&r&&xA.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const TA={type:"spring",stiffness:500,damping:25,restSpeed:10},EA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_A={type:"keyframes",duration:.8},PA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jA=(e,{keyframes:t})=>t.length>2?_A:rs.has(e)?e.startsWith("scale")?EA(t[1]):TA:PA;function RA({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const Hm=(e,t,n,r={},i,s)=>o=>{const a=wm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Vn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,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};RA(a)||(d={...d,...jA(e,d)}),d.duration&&(d.duration=Vn(d.duration)),d.repeatDelay&&(d.repeatDelay=Vn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),d.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const f=Tc(d.keyframes,a);if(f!==void 0)return Se.update(()=>{d.onUpdate(f),d.onComplete()}),new ej([])}return!s&&jy.supports(d)?new jy(d):new Um(d)};function AA({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function FS(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const u=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||c&&AA(c,d))continue;const h={delay:n,...wm(s||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=sS(e);if(b){const g=window.MotionHandoffAnimation(b,d,Se);g!==null&&(h.startTime=g,m=!0)}}wp(e,d),u.start(Hm(d,u,f,e.shouldReduceMotion&&iS.has(d)?{type:!1}:h,e,m));const p=u.animation;p&&l.push(p)}return o&&Promise.all(l).then(()=>{Se.update(()=>{o&&aR(e,o)})}),l}function Rp(e,t,n={}){var l;const r=Fa(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(FS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:f}=i;return OA(e,t,d+c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,d]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function OA(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(DA).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Rp(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function DA(e,t){return e.sortNodePosition(t)}function MA(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Rp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Rp(e,t,n);else{const i=typeof t=="function"?Fa(e,t,n.custom):t;r=Promise.all(FS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function NS(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 FA=Tm.length;function LS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?LS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<FA;n++){const r=Tm[n],i=e.props[r];(Oa(i)||i===!1)&&(t[r]=i)}return t}const NA=[...Cm].reverse(),LA=Cm.length;function IA(e){return t=>Promise.all(t.map(({animation:n,options:r})=>MA(e,n,r)))}function $A(e){let t=IA(e),n=Ry(),r=!0;const i=l=>(c,d)=>{var f;const u=Fa(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(u){const{transition:h,transitionEnd:m,...p}=u;c={...c,...p,...m}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=LS(e.parent)||{},u=[],f=new Set;let h={},m=1/0;for(let b=0;b<LA;b++){const g=NA[b],w=n[g],x=c[g]!==void 0?c[g]:d[g],k=Oa(x),T=g===l?w.isActive:null;T===!1&&(m=b);let E=x===d[g]&&x!==c[g]&&k;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&T===null||!x&&!w.prevProp||kc(x)||typeof x=="boolean")continue;const _=BA(w.prevProp,x);let j=_||g===l&&w.isActive&&!E&&k||b>m&&k,P=!1;const O=Array.isArray(x)?x:[x];let $=O.reduce(i(g),{});T===!1&&($={});const{prevResolvedValues:F={}}=w,z={...F,...$},G=X=>{j=!0,f.has(X)&&(P=!0,f.delete(X)),w.needsAnimating[X]=!0;const D=e.getValue(X);D&&(D.liveStyle=!1)};for(const X in z){const D=$[X],I=F[X];if(h.hasOwnProperty(X))continue;let q=!1;xp(D)&&xp(I)?q=!NS(D,I):q=D!==I,q?D!=null?G(X):f.add(X):D!==void 0&&f.has(X)?G(X):w.protectedKeys[X]=!0}w.prevProp=x,w.prevResolvedValues=$,w.isActive&&(h={...h,...$}),r&&e.blockInitialAnimation&&(j=!1),j&&(!(E&&_)||P)&&u.push(...O.map(X=>({animation:X,options:{type:g}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const g=Fa(e,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(b.transition=g.transition)}f.forEach(g=>{const w=e.getBaseTarget(g),x=e.getValue(g);x&&(x.liveStyle=!0),b[g]=w??null}),u.push({animation:b})}let p=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;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=Ry(),r=!0}}}function BA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!NS(t,e):!1}function mi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ry(){return{animate:mi(!0),whileInView:mi(),whileHover:mi(),whileTap:mi(),whileDrag:mi(),whileFocus:mi(),exit:mi()}}class li{constructor(t){this.isMounted=!1,this.node=t}update(){}}class zA extends li{constructor(t){super(t),t.animationState||(t.animationState=$A(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();kc(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 VA=0;class UA extends li{constructor(){super(...arguments),this.id=VA++}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 HA={animation:{Feature:zA},exit:{Feature:UA}};function La(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function nl(e){return{point:{x:e.pageX,y:e.pageY}}}const WA=e=>t=>km(t)&&e(t,nl(t));function ia(e,t,n,r){return La(e,t,WA(n),r)}function IS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function qA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function GA(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 $S=1e-4,QA=1-$S,YA=1+$S,BS=.01,KA=0-BS,XA=0+BS;function xt(e){return e.max-e.min}function ZA(e,t,n){return Math.abs(e-t)<=n}function Ay(e,t,n,r=.5){e.origin=r,e.originPoint=je(t.min,t.max,e.origin),e.scale=xt(n)/xt(t),e.translate=je(n.min,n.max,e.origin)-e.originPoint,(e.scale>=QA&&e.scale<=YA||isNaN(e.scale))&&(e.scale=1),(e.translate>=KA&&e.translate<=XA||isNaN(e.translate))&&(e.translate=0)}function sa(e,t,n,r){Ay(e.x,t.x,n.x,r?r.originX:void 0),Ay(e.y,t.y,n.y,r?r.originY:void 0)}function Oy(e,t,n){e.min=n.min+t.min,e.max=e.min+xt(t)}function JA(e,t,n){Oy(e.x,t.x,n.x),Oy(e.y,t.y,n.y)}function Dy(e,t,n){e.min=t.min-n.min,e.max=e.min+xt(t)}function oa(e,t,n){Dy(e.x,t.x,n.x),Dy(e.y,t.y,n.y)}const My=()=>({translate:0,scale:1,origin:0,originPoint:0}),Os=()=>({x:My(),y:My()}),Fy=()=>({min:0,max:0}),Ie=()=>({x:Fy(),y:Fy()});function Zt(e){return[e("x"),e("y")]}function Md(e){return e===void 0||e===1}function Ap({scale:e,scaleX:t,scaleY:n}){return!Md(e)||!Md(t)||!Md(n)}function xi(e){return Ap(e)||zS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zS(e){return Ny(e.x)||Ny(e.y)}function Ny(e){return e&&e!=="0%"}function qu(e,t,n){const r=e-n,i=t*r;return n+i}function Ly(e,t,n,r,i){return i!==void 0&&(e=qu(e,i,r)),qu(e,n,r)+t}function Op(e,t=0,n=1,r,i){e.min=Ly(e.min,t,n,r,i),e.max=Ly(e.max,t,n,r,i)}function VS(e,{x:t,y:n}){Op(e.x,t.translate,t.scale,t.originPoint),Op(e.y,n.translate,n.scale,n.originPoint)}const Iy=.999999999999,$y=1.0000000000001;function eO(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&&Ms(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,VS(e,o)),r&&xi(s.latestValues)&&Ms(e,s.latestValues))}t.x<$y&&t.x>Iy&&(t.x=1),t.y<$y&&t.y>Iy&&(t.y=1)}function Ds(e,t){e.min=e.min+t,e.max=e.max+t}function By(e,t,n,r,i=.5){const s=je(e.min,e.max,i);Op(e,t,n,s,r)}function Ms(e,t){By(e.x,t.x,t.scaleX,t.scale,t.originX),By(e.y,t.y,t.scaleY,t.scale,t.originY)}function US(e,t){return IS(GA(e.getBoundingClientRect(),t))}function tO(e,t,n){const r=US(e,n),{scroll:i}=t;return i&&(Ds(r.x,i.offset.x),Ds(r.y,i.offset.y)),r}const HS=({current:e})=>e?e.ownerDocument.defaultView:null,zy=(e,t)=>Math.abs(e-t);function nO(e,t){const n=zy(e.x,t.x),r=zy(e.y,t.y);return Math.sqrt(n**2+r**2)}class WS{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 u=Nd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=nO(u.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:m}=u,{timestamp:p}=it;this.history.push({...m,timestamp:p});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Fd(f,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Nd(u.type==="pointercancel"?this.lastMoveEventInfo:Fd(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,b),m&&m(u,b)},!km(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=nl(t),a=Fd(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=it;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Nd(a,this.history)),this.removeListeners=tl(ia(this.contextWindow,"pointermove",this.handlePointerMove),ia(this.contextWindow,"pointerup",this.handlePointerUp),ia(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ni(this.updatePoint)}}function Fd(e,t){return t?{point:t(e.point)}:e}function Vy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nd({point:e},t){return{point:e,delta:Vy(e,qS(t)),offset:Vy(e,rO(t)),velocity:iO(t,.1)}}function rO(e){return e[0]}function qS(e){return e[e.length-1]}function iO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Vn(t)));)n--;if(!r)return{x:0,y:0};const s=Un(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 sO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?je(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?je(n,e,r.max):Math.min(e,n)),e}function Uy(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 oO(e,{top:t,left:n,bottom:r,right:i}){return{x:Uy(e.x,n,i),y:Uy(e.y,t,r)}}function Hy(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 aO(e,t){return{x:Hy(e.x,t.x),y:Hy(e.y,t.y)}}function lO(e,t){let n=.5;const r=xt(e),i=xt(t);return i>r?n=ja(t.min,t.max-r,e.min):r>i&&(n=ja(e.min,e.max-i,t.min)),pr(0,1,n)}function uO(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 Dp=.35;function cO(e=Dp){return e===!1?e=0:e===!0&&(e=Dp),{x:Wy(e,"left","right"),y:Wy(e,"top","bottom")}}function Wy(e,t,n){return{min:qy(e,t),max:qy(e,n)}}function qy(e,t){return typeof e=="number"?e:e[t]||0}const dO=new WeakMap;class fO{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=Ie(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(nl(d).point)},s=(d,u)=>{const{drag:f,dragPropagation:h,onDragStart:m}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lj(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),Zt(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Wn.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[b];x&&(g=xt(x)*(parseFloat(g)/100))}}this.originPoint[b]=g}),m&&Se.postRender(()=>m(d,u)),wp(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(d,u)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=u;if(h&&this.currentDirection===null){this.currentDirection=pO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",u.point,b),this.updateAxis("y",u.point,b),this.visualElement.render(),p&&p(d,u)},a=(d,u)=>this.stop(d,u),l=()=>Zt(d=>{var u;return this.getAnimationState(d)==="paused"&&((u=this.getAxisMotionValue(d).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new WS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:HS(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&&Se.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||!Ol(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=sO(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&&Rs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oO(r.layoutBox,t):this.constraints=!1,this.elastic=cO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=uO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Rs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=tO(r,i.root,this.visualElement.getTransformPagePoint());let o=aO(i.layout.layoutBox,s);if(n){const a=n(qA(o));this.hasMutatedConstraints=!!a,a&&(o=IS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(d=>{if(!Ol(d,n,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(d,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wp(this.visualElement,t),r.start(Hm(t,r,0,n,this.visualElement,!1))}stopAnimation(){Zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zt(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){Zt(n=>{const{drag:r}=this.getProps();if(!Ol(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]-je(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=lO({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(),Zt(o=>{if(!Ol(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(je(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;dO.set(this.visualElement,this);const t=this.visualElement.current,n=ia(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Rs(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()),Se.read(r);const o=La(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.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=Dp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ol(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class hO extends li{constructor(t){super(t),this.removeGroupControls=ln,this.removeListeners=ln,this.controls=new fO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ln}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gy=e=>(t,n)=>{e&&Se.postRender(()=>e(t,n))};class mO extends li{constructor(){super(...arguments),this.removePointerDownListener=ln}onPointerDown(t){this.session=new WS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gy(t),onStart:Gy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Se.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ia(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 nu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ee.test(e))e=parseFloat(e);else return e;const n=Qy(e,t.target.x),r=Qy(e,t.target.y);return`${n}% ${r}%`}},gO={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 c=je(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class vO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Fj(yO),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()})),nu.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()||Se.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sm.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 GS(e){const[t,n]=Ob(),r=v.useContext(dm);return y.jsx(vO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(Wb),isPresent:t,safeToRemove:n})}const yO={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:gO};function xO(e,t,n){const r=ht(e)?e:Aa(e);return r.start(Hm("",r,t,n)),r.animation}function wO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const bO=(e,t)=>e.depth-t.depth;class SO{constructor(){this.children=[],this.isDirty=!1}add(t){hm(this.children,t),this.isDirty=!0}remove(t){mm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(bO),this.isDirty=!1,this.children.forEach(t)}}function kO(e,t){const n=Hn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ni(r),e(s-t))};return Se.read(r,!0),()=>ni(r)}const QS=["TopLeft","TopRight","BottomLeft","BottomRight"],CO=QS.length,Yy=e=>typeof e=="string"?parseFloat(e):e,Ky=e=>typeof e=="number"||ee.test(e);function TO(e,t,n,r,i,s){i?(e.opacity=je(0,n.opacity??1,EO(r)),e.opacityExit=je(t.opacity??1,0,_O(r))):s&&(e.opacity=je(t.opacity??1,n.opacity??1,r));for(let o=0;o<CO;o++){const a=`border${QS[o]}Radius`;let l=Xy(t,a),c=Xy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ky(l)===Ky(c)?(e[a]=Math.max(je(Yy(l),Yy(c),r),0),(Wn.test(c)||Wn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=je(t.rotate||0,n.rotate||0,r))}function Xy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const EO=YS(0,.5,fS),_O=YS(.5,.95,ln);function YS(e,t,n){return r=>r<e?0:r>t?1:n(ja(e,t,r))}function Zy(e,t){e.min=t.min,e.max=t.max}function Kt(e,t){Zy(e.x,t.x),Zy(e.y,t.y)}function Jy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function e0(e,t,n,r,i){return e-=t,e=qu(e,1/n,r),i!==void 0&&(e=qu(e,1/i,r)),e}function PO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Wn.test(t)&&(t=parseFloat(t),t=je(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=je(s.min,s.max,r);e===s&&(a-=t),e.min=e0(e.min,t,n,a,i),e.max=e0(e.max,t,n,a,i)}function t0(e,t,[n,r,i],s,o){PO(e,t[n],t[r],t[i],t.scale,s,o)}const jO=["x","scaleX","originX"],RO=["y","scaleY","originY"];function n0(e,t,n,r){t0(e.x,t,jO,n?n.x:void 0,r?r.x:void 0),t0(e.y,t,RO,n?n.y:void 0,r?r.y:void 0)}function r0(e){return e.translate===0&&e.scale===1}function KS(e){return r0(e.x)&&r0(e.y)}function i0(e,t){return e.min===t.min&&e.max===t.max}function AO(e,t){return i0(e.x,t.x)&&i0(e.y,t.y)}function s0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function XS(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function o0(e){return xt(e.x)/xt(e.y)}function a0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class OO{constructor(){this.members=[]}add(t){hm(this.members,t),t.scheduleRender()}remove(t){if(mm(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 DO(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:c,rotate:d,rotateX:u,rotateY:f,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}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 Ld=["","X","Y","Z"],MO={visibility:"hidden"},l0=1e3;let FO=0;function Id(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ZS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=sS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Se,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ZS(r)}function JS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=FO++,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(IO),this.nodes.forEach(UO),this.nodes.forEach(HO),this.nodes.forEach($O)},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 SO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new vm),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=wO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=kO(f,250),nu.hasAnimatedSinceResize&&(nu.hasAnimatedSinceResize=!1,this.nodes.forEach(c0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||d.getDefaultTransition()||YO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=d.getProps(),w=!this.targetLayout||!XS(this.targetLayout,m),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,x);const k={...wm(p,"layout"),onPlay:b,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else f||c0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(WO),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&&ZS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(u0);return}this.isUpdating||this.nodes.forEach(zO),this.isUpdating=!1,this.nodes.forEach(VO),this.nodes.forEach(NO),this.nodes.forEach(LO),this.clearAllSnapshots();const a=Hn.now();it.delta=pr(0,1e3/60,a-it.timestamp),it.timestamp=a,it.isProcessing=!0,Pd.update.process(it),Pd.preRender.process(it),Pd.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BO),this.sharedNodes.forEach(qO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(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=Ie(),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&&!KS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||xi(this.latestValues)||d)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),KO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ie();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(XO))){const{scroll:d}=this.root;d&&(Ds(a.x,d.offset.x),Ds(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ie();if(Kt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:f}=d;d!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&Kt(a,o),Ds(a.x,u.offset.x),Ds(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Ie();Kt(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ms(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),xi(d.latestValues)&&Ms(l,d.latestValues)}return xi(this.latestValues)&&Ms(l,this.latestValues),l}removeTransform(o){const a=Ie();Kt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!xi(c.latestValues))continue;Ap(c.latestValues)&&c.updateSnapshot();const d=Ie(),u=c.measurePageBox();Kt(d,u),n0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return xi(this.latestValues)&&n0(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!==it.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:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=it.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),oa(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Kt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ie(),this.targetWithTransforms=Ie()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Kt(this.target,this.layout.layoutBox),VS(this.target,this.targetDelta)):Kt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),oa(this.relativeTargetOrigin,this.target,h.target),Kt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ap(this.parent.latestValues)||zS(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 m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===it.timestamp&&(l=!1),l)return;const{layout:c,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||!(c||d))return;Kt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;eO(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=Ie());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jy(this.prevProjectionDelta.x,this.projectionDelta.x),Jy(this.prevProjectionDelta.y,this.projectionDelta.y)),sa(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!a0(this.projectionDelta.x,this.prevProjectionDelta.x)||!a0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}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=Os(),this.projectionDelta=Os(),this.projectionDeltaWithTransform=Os()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=Os();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ie(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,b=this.getStack(),g=!b||b.members.length<=1,w=!!(p&&!g&&this.options.crossfade===!0&&!this.path.some(QO));this.animationProgress=0;let x;this.mixTargetDelta=k=>{const T=k/1e3;d0(u.x,o.x,T),d0(u.y,o.y,T),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GO(this.relativeTarget,this.relativeTargetOrigin,f,T),x&&AO(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Ie()),Kt(x,this.relativeTarget)),p&&(this.animationValues=d,TO(d,c,this.latestValues,T,w,g)),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=Se.update(()=>{nu.hasAnimatedSinceResize=!0,this.currentAnimation=xO(0,l0,{...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(l0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&ek(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ie();const u=xt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const f=xt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Kt(a,l),Ms(a,d),sa(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new OO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&Id("z",o,c,this.animationValues);for(let d=0;d<Ld.length;d++)Id(`rotate${Ld[d]}`,o,c,this.animationValues),Id(`skew${Ld[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return MO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=tu(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=tu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!xi(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=DO(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:u,y:f}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in Da){if(d[h]===void 0)continue;const{correct:m,applyTo:p,isCSSVariable:b}=Da[h],g=a.transform==="none"?d[h]:m(d[h],c);if(p){const w=p.length;for(let x=0;x<w;x++)a[p[x]]=g}else b?this.options.visualElement.renderState.vars[h]=g:a[h]=g}return this.options.layoutId&&(a.pointerEvents=c===this?tu(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(u0),this.root.sharedNodes.clear()}}}function NO(e){e.updateLayout()}function LO(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"?Zt(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],h=xt(f);f.min=r[u].min,f.max=f.min+h}):ek(s,t.layoutBox,r)&&Zt(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],h=xt(r[u]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=Os();sa(a,r,t.layoutBox);const l=Os();o?sa(l,e.applyTransform(i,!0),t.measuredBox):sa(l,r,t.layoutBox);const c=!KS(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:h}=u;if(f&&h){const m=Ie();oa(m,t.layoutBox,f.layoutBox);const p=Ie();oa(p,r,h.layoutBox),XS(m,p)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function IO(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 $O(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function BO(e){e.clearSnapshot()}function u0(e){e.clearMeasurements()}function zO(e){e.isLayoutDirty=!1}function VO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function c0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UO(e){e.resolveTargetDelta()}function HO(e){e.calcProjection()}function WO(e){e.resetSkewAndRotation()}function qO(e){e.removeLeadSnapshot()}function d0(e,t,n){e.translate=je(t.translate,0,n),e.scale=je(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function f0(e,t,n,r){e.min=je(t.min,n.min,r),e.max=je(t.max,n.max,r)}function GO(e,t,n,r){f0(e.x,t.x,n.x,r),f0(e.y,t.y,n.y,r)}function QO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const YO={duration:.45,ease:[.4,0,.1,1]},p0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),h0=p0("applewebkit/")&&!p0("chrome/")?Math.round:ln;function m0(e){e.min=h0(e.min),e.max=h0(e.max)}function KO(e){m0(e.x),m0(e.y)}function ek(e,t,n){return e==="position"||e==="preserve-aspect"&&!ZA(o0(t),o0(n),.2)}function XO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ZO=JS({attachResizeListener:(e,t)=>La(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$d={current:void 0},tk=JS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$d.current){const e=new ZO({});e.mount(window),e.setOptions({layoutScroll:!0}),$d.current=e}return $d.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),JO={pan:{Feature:mO},drag:{Feature:hO,ProjectionNode:tk,MeasureLayout:GS}};function g0(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&&Se.postRender(()=>s(t,nl(t)))}class e3 extends li{mount(){const{current:t}=this.node;t&&(this.unmount=cj(t,(n,r)=>(g0(this.node,r,"Start"),i=>g0(this.node,i,"End"))))}unmount(){}}class t3 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=tl(La(this.node.current,"focus",()=>this.onFocus()),La(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v0(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&&Se.postRender(()=>s(t,nl(t)))}class n3 extends li{mount(){const{current:t}=this.node;t&&(this.unmount=hj(t,(n,r)=>(v0(this.node,r,"Start"),(i,{success:s})=>v0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mp=new WeakMap,Bd=new WeakMap,r3=e=>{const t=Mp.get(e.target);t&&t(e)},i3=e=>{e.forEach(r3)};function s3({root:e,...t}){const n=e||document;Bd.has(n)||Bd.set(n,{});const r=Bd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(i3,{root:e,...t})),r[i]}function o3(e,t,n){const r=s3(t);return Mp.set(e,n),r.observe(e),()=>{Mp.delete(e),r.unobserve(e)}}const a3={some:0,all:1};class l3 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:a3[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:u}=this.node.getProps(),f=c?d:u;f&&f(l)};return o3(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(u3(t,n))&&this.startObserver()}unmount(){}}function u3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const c3={inView:{Feature:l3},tap:{Feature:n3},focus:{Feature:t3},hover:{Feature:e3}},d3={layout:{ProjectionNode:tk,MeasureLayout:GS}},Fp={current:null},nk={current:!1};function f3(){if(nk.current=!0,!!fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fp.current=e.matches;e.addListener(t),t()}else Fp.current=!1}const p3=[..._S,ft,ri],h3=e=>p3.find(ES(e)),m3=new WeakMap;function g3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ht(i))e.addValue(r,i);else if(ht(s))e.addValue(r,Aa(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,Aa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const y0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class v3{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=zm,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 h=Hn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Se.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,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=Cc(n),this.isVariantNode=Ub(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const m=f[h];l[h]!==void 0&&ht(m)&&m.set(l[h],!1)}}mount(t){this.current=t,m3.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)),nk.current||f3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){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=rs.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Se.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 fo){const n=fo[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):Ie()}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<y0.length;r++){const i=y0[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=g3(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=Aa(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"&&(CS(r)||hS(r))?r=parseFloat(r):!h3(r)&&ri.test(n)&&(r=bS(t,n)),this.setBaseTarget(t,ht(r)?r.get():r)),ht(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=Fm(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&&!ht(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 vm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class rk extends v3{constructor(){super(...arguments),this.KeyframeResolver=PS}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;ht(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function y3(e){return window.getComputedStyle(e)}class x3 extends rk{constructor(){super(...arguments),this.type="html",this.renderInstance=eS}readValueFromInstance(t,n){if(rs.has(n))return OR(t,n);{const r=y3(t),i=(_m(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return US(t,n)}build(t,n,r){Rm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Nm(t,n,r)}}class w3 extends rk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ie,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Jb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rs.has(n)){const r=wS(n);return r&&r.default||0}return n=tS.has(n)?n:Em(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return rS(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Se.postRender(this.updateDimensions)}build(t,n,r){Dm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){nS(t,n,r,i)}mount(t){this.isSVGTag=Mm(t.tagName),super.mount(t)}}const b3=(e,t)=>Om(e)?new w3(t):new x3(t,{allowProjection:e!==v.Fragment}),S3=sR({...HA,...c3,...JO,...d3},b3),be=bj(S3);class k3{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 C3=()=>new k3;function T3(){return wc(C3)}var Tr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Tr||{});const ik=v.createContext({}),E3={[Q.TooltipDefault]:"Bizimle sohbet edin!",[Q.TooltipActive]:"Yeni mesajlar var!",[Q.CloseButtonAria]:"Kapat",[Q.MessagePlaceholder]:"Mesajınızı yazın",[Q.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[Q.NewMessagesNotification]:"Yeni mesajlar var!",[Q.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[Q.ChatCloseWarning]:"Bu işlem geri alınamaz.",[Q.ChatSettings]:"Sohbet Ayarları",[Q.ChatEndConversation]:"Sohbeti Sonlandır",[Q.CancelAction]:"Vazgeç",[Q.CloseAction]:"Kapat",[Q.QuickActions]:"Hızlı işlemler",[Q.GreetingStartChat]:"Sohbete başla",[Q.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[Q.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[Q.RatingHeaderThanks]:"Teşekkürler!",[Q.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[Q.RatingRateConversation]:"Görüşmeyi puanlayın",[Q.RatingComment]:"Yorumunuz (İsteğe bağlı)",[Q.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[Q.RatingSubmit]:"Değerlendirmeyi Gönder",[Q.RatingNewConversation]:"Yeni Görüşme Başlat",[Q.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[Q.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[Q.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[Q.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[Q.RatingYourScore]:"Puanınız: {score}",[Q.PoweredBy]:"Powered by"},_3={[C.Background]:"#ffffff",[C.Border]:"#e2e8f0",[C.TooltipText]:"#1e40af",[C.TooltipBackground]:"#dbeafe",[C.TooltipBorder]:"#3b82f6",[C.HeaderBackground]:"#2563eb",[C.HeaderBorder]:"#e2e8f0",[C.HeaderText]:"#ffffff",[C.FooterBackground]:"#f8fafc",[C.FooterBorder]:"#e2e8f0",[C.FooterText]:"#475569",[C.MessageAdminBackground]:"#f1f5f9",[C.MessageAdminText]:"#334155",[C.MessageVisitorBackground]:"#3b82f6",[C.MessageVisitorText]:"#ffffff",[C.GreeterBackground]:"#ffffff",[C.GreeterText]:"#334155",[C.GreeterBorder]:"#e2e8f0",[C.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[C.GreeterTopText]:"#ffffff",[C.GreeterButtonBackground]:"#4f46e5",[C.GreeterButtonText]:"#ffffff",[C.ButtonBackground]:"#4f46e5",[C.ButtonText]:"#ffffff",[C.InputBackground]:"#ffffff",[C.InputText]:"#1e293b",[C.InputBorder]:"#e2e8f0",[C.CloseButtonBackground]:"#f1f5f9",[C.CloseButtonText]:"#475569",[C.CloseButtonHover]:"#e2e8f0",[C.IconColor]:"#64748b",[C.IconBackground]:"transparent",[C.ErrorBackground]:"#fef2f2",[C.ErrorText]:"#dc2626",[C.ErrorBorder]:"#fca5a5",[C.SuccessBackground]:"#f0fdf4",[C.SuccessText]:"#16a34a",[C.SuccessBorder]:"#86efac",[C.WarningBackground]:"#fffbeb",[C.WarningText]:"#d97706",[C.WarningBorder]:"#fcd34d",[C.LinkColor]:"#2563eb",[C.LinkHoverColor]:"#1d4ed8",[C.DividerColor]:"#e2e8f0",[C.ShadowColor]:"rgba(0, 0, 0, 0.1)",[C.StarActiveColor]:"#3b82f6",[C.StarInactiveColor]:"#e2e8f0",[C.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[C.ChatCloseConfirmText]:"#dc2626",[C.RatingHeaderBackground]:"#4F46E5",[C.RatingHeaderText]:"#ffffff",[C.RatingSuccessBackground]:"#ffffff",[C.RatingSuccessText]:"#334155",[C.RatingRateConversationText]:"#1e293b"},P3={[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)"},j3=e=>{const t={...E3};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},R3=e=>{const t={..._3};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 A3({children:e,widget:t}){const n=R3(t),r=j3(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Tr.Md,s=l=>n[l],o=l=>r[l],a=()=>P3[i];return y.jsx(ik.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const Oe=()=>v.useContext(ik),rl=()=>Oe().getText;function on({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:c=C.ButtonText,bgKey:d=C.ButtonBackground,animations:u={},withoutTheming:f,...h}){const m=Oe();return y.jsx(be.button,{type:t,className:ge("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,ey[n]&&ey[n][r],qP[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:m.getColor(c),backgroundColor:m.getColor(d),...o?{}:{borderRadius:m.getRadius()}},...l},...u,...h,children:e})}function fe(){}fe.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"})})};fe.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"})});fe.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"})});fe.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"})});fe.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"})})};fe.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"})]})};fe.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"})});fe.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"})});fe.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"})});fe.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"})});fe.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"})})};fe.ExternalLink=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:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});fe.Phone=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:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});fe.Mail=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:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});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 ru=Object.create(null);Object.keys(Qn).forEach(e=>{ru[Qn[e]]=e});const Np={type:"error",data:"parser error"},sk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ok=typeof ArrayBuffer=="function",ak=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wm=({type:e,data:t},n,r)=>sk&&t instanceof Blob?n?r(t):x0(t,r):ok&&(t instanceof ArrayBuffer||ak(t))?n?r(t):x0(new Blob([t]),r):r(Qn[e]+(t||"")),x0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function w0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let zd;function O3(e,t){if(sk&&e.data instanceof Blob)return e.data.arrayBuffer().then(w0).then(t);if(ok&&(e.data instanceof ArrayBuffer||ak(e.data)))return t(w0(e.data));Wm(e,!1,n=>{zd||(zd=new TextEncoder),t(zd.encode(n))})}const b0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Go=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<b0.length;e++)Go[b0.charCodeAt(e)]=e;const D3=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 c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)s=Go[e.charCodeAt(r)],o=Go[e.charCodeAt(r+1)],a=Go[e.charCodeAt(r+2)],l=Go[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 c},M3=typeof ArrayBuffer=="function",qm=(e,t)=>{if(typeof e!="string")return{type:"message",data:lk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:F3(e.substring(1),t)}:ru[n]?e.length>1?{type:ru[n],data:e.substring(1)}:{type:ru[n]}:Np},F3=(e,t)=>{if(M3){const n=D3(e);return lk(n,t)}else return{base64:!0,data:e}},lk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},uk="",N3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Wm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(uk))})})},L3=(e,t)=>{const n=e.split(uk),r=[];for(let i=0;i<n.length;i++){const s=qm(n[i],t);if(r.push(s),s.type==="error")break}return r};function I3(){return new TransformStream({transform(e,t){O3(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 Vd;function Dl(e){return e.reduce((t,n)=>t+n.length,0)}function Ml(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 $3(e,t){Vd||(Vd=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(Dl(n)<1)break;const l=Ml(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(Dl(n)<2)break;const l=Ml(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Dl(n)<8)break;const l=Ml(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Np);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Dl(n)<i)break;const l=Ml(n,i);a.enqueue(qm(s?l:Vd.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Np);break}}}})}const ck=4;function ze(e){if(e)return B3(e)}function B3(e){for(var t in ze.prototype)e[t]=ze.prototype[t];return e}ze.prototype.on=ze.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ze.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ze.prototype.off=ze.prototype.removeListener=ze.prototype.removeAllListeners=ze.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};ze.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};ze.prototype.emitReserved=ze.prototype.emit;ze.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ze.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ec=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),rn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),z3="arraybuffer";function dk(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const V3=rn.setTimeout,U3=rn.clearTimeout;function _c(e,t){t.useNativeTimers?(e.setTimeoutFn=V3.bind(rn),e.clearTimeoutFn=U3.bind(rn)):(e.setTimeoutFn=rn.setTimeout.bind(rn),e.clearTimeoutFn=rn.clearTimeout.bind(rn))}const H3=1.33;function W3(e){return typeof e=="string"?q3(e):Math.ceil((e.byteLength||e.size)*H3)}function q3(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 fk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function G3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Q3(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 Y3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Gm extends ze{constructor(t){super(),this.writable=!1,_c(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 Y3(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=qm(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=G3(t);return n.length?"?"+n:""}}class K3 extends Gm{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)};L3(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,N3(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]=fk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pk=!1;try{pk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const X3=pk;function Z3(){}class J3 extends K3{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 qn extends ze{constructor(t,n,r){super(),this.createRequest=t,_c(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=dk(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=qn.requestsCount++,qn.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=Z3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete qn.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()}}qn.requestsCount=0;qn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",S0);else if(typeof addEventListener=="function"){const e="onpagehide"in rn?"pagehide":"unload";addEventListener(e,S0,!1)}}function S0(){for(let e in qn.requests)qn.requests.hasOwnProperty(e)&&qn.requests[e].abort()}const eD=function(){const e=hk({xdomain:!1});return e&&e.responseType!==null}();class tD extends J3{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=eD&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new qn(hk,this.uri(),t)}}function hk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||X3))return new XMLHttpRequest}catch{}if(!t)try{return new rn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const mk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nD extends Gm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=mk?{}:dk(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;Wm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Ec(()=>{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]=fk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ud=rn.WebSocket||rn.MozWebSocket;class rD extends nD{createSocket(t,n,r){return mk?new Ud(t,n,r):n?new Ud(t,n):new Ud(t)}doWrite(t,n){this.ws.send(n)}}class iD extends Gm{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=$3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=I3();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&&Ec(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const sD={websocket:rD,webtransport:iD,polling:tD},oD=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,aD=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Lp(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=oD.exec(e||""),s={},o=14;for(;o--;)s[aD[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=lD(s,s.path),s.queryKey=uD(s,s.query),s}function lD(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 uD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Ip=typeof addEventListener=="function"&&typeof removeEventListener=="function",iu=[];Ip&&addEventListener("offline",()=>{iu.forEach(e=>e())},!1);class Xr extends ze{constructor(t,n){if(super(),this.binaryType=z3,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=Lp(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=Lp(n.host).host);_c(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=Q3(this.opts.query)),Ip&&(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"})},iu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=ck,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+=W3(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,Ec(()=>{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(),Ip&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=iu.indexOf(this._offlineEventListener);r!==-1&&iu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=ck;class cD 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",u=>{if(!r)if(u.type==="pong"&&u.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=u=>{const f=new Error("probe error: "+u);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.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",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),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 dD=class extends cD{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=>sD[i]).filter(i=>!!i)),super(t,r)}};function fD(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=Lp(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 pD=typeof ArrayBuffer=="function",hD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,gk=Object.prototype.toString,mD=typeof Blob=="function"||typeof Blob<"u"&&gk.call(Blob)==="[object BlobConstructor]",gD=typeof File=="function"||typeof File<"u"&&gk.call(File)==="[object FileConstructor]";function Qm(e){return pD&&(e instanceof ArrayBuffer||hD(e))||mD&&e instanceof Blob||gD&&e instanceof File}function su(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(su(e[n]))return!0;return!1}if(Qm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return su(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&su(e[n]))return!0;return!1}function vD(e){const t=[],n=e.data,r=e;return r.data=$p(n,t),r.attachments=t.length,{packet:r,buffers:t}}function $p(e,t){if(!e)return e;if(Qm(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]=$p(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]=$p(e[r],t));return n}return e}function yD(e,t){return e.data=Bp(e.data,t),delete e.attachments,e}function Bp(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]=Bp(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Bp(e[n],t));return e}const xD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],wD=5;var ue;(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"})(ue||(ue={}));class bD{constructor(t){this.replacer=t}encode(t){return(t.type===ue.EVENT||t.type===ue.ACK)&&su(t)?this.encodeAsBinary({type:t.type===ue.EVENT?ue.BINARY_EVENT:ue.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ue.BINARY_EVENT||t.type===ue.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=vD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function k0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ym extends ze{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===ue.BINARY_EVENT;r||n.type===ue.BINARY_ACK?(n.type=r?ue.EVENT:ue.ACK,this.reconstructor=new SD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Qm(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(ue[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ue.BINARY_EVENT||r.type===ue.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(Ym.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 ue.CONNECT:return k0(n);case ue.DISCONNECT:return n===void 0;case ue.CONNECT_ERROR:return typeof n=="string"||k0(n);case ue.EVENT:case ue.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&xD.indexOf(n[0])===-1);case ue.ACK:case ue.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class SD{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=yD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const kD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ym,Encoder:bD,get PacketType(){return ue},protocol:wD},Symbol.toStringTag,{value:"Module"}));function wn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const CD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vk extends ze{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(CD.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:ue.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,u=n.pop();this._registerAckCallback(d,u),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:ue.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 ue.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 ue.EVENT:case ue.BINARY_EVENT:this.onevent(t);break;case ue.ACK:case ue.BINARY_ACK:this.onack(t);break;case ue.DISCONNECT:this.ondisconnect();break;case ue.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:ue.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:ue.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 To(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}To.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};To.prototype.reset=function(){this.attempts=0};To.prototype.setMin=function(e){this.ms=e};To.prototype.setMax=function(e){this.max=e};To.prototype.setJitter=function(e){this.jitter=e};class zp extends ze{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,_c(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 To({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||kD;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 dD(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){Ec(()=>{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 vk(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 Io={};function ou(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=fD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Io[i]&&s in Io[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new zp(r,t):(Io[i]||(Io[i]=new zp(r,t)),l=Io[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(ou,{Manager:zp,Socket:vk,io:ou,connect:ou});const au=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Gn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Gn||{});const Hd=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},lu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},Vp=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},yk=v.createContext(null),ui=()=>{const e=v.useContext(yk);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},TD=({children:e})=>{const{widget:t}=kt(),n=v.useRef(null),r=v.useRef(!1),[i,s]=v.useState(!1),o=v.useCallback(()=>{n.current&&(console.log("WS: Cleaning up existing socket."),n.current.removeAllListeners(),n.current.disconnect(),n.current=null),s(!1),r.current=!1},[]),a=v.useCallback(p=>{if(r.current||n.current&&n.current.connected){console.log("WS: Connect called but already connecting or connected.");return}n.current&&o(),console.log("WS: Attempting to connect..."),r.current=!0;const b=ou(O_,{transports:["websocket"],auth:{customer_token:lu(Gn.CustomerToken,p)||au("customer_token"),device_id:lu(Gn.DeviceId,p)||au("device_id"),customer_refresh_token:lu(Gn.CustomerRefreshToken,p)||au("customer_refresh_token")}});b.removeAllListeners(),b.on("error",g=>{console.error("WS: Websocket error",g),r.current=!1}),b.on("connect_error",g=>{console.error("WS: Connect error",g),r.current=!1,s(!1),n.current=null}),b.on("disconnect",g=>{console.log("WS: Disconnected",g),s(!1),r.current=!1,n.current===b&&(n.current=null)}),b.on("connect",()=>{console.log("WS: Connected successfully"),n.current=b,s(!0),r.current=!1})},[o]);v.useEffect(()=>{const p=t==null?void 0:t.link_id;return p?a(p):o(),()=>{console.log("WS: Cleanup effect running (unmount or linkId change)"),o()}},[t==null?void 0:t.link_id,a,o]);const l=v.useCallback(()=>{const p=t==null?void 0:t.link_id;p?a(p):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,a]),c=v.useCallback(()=>{console.log("WS: Reconnecting..."),o();const p=t==null?void 0:t.link_id;p&&a(p)},[t==null?void 0:t.link_id,a,o]),d=v.useCallback(()=>{console.log("WS: Manual disconnect"),o()},[o]),u=v.useCallback((p,b)=>{var g;(g=n.current)==null||g.on(p,b)},[]),f=v.useCallback((p,b)=>{var g;(g=n.current)==null||g.off(p,b)},[]),h=v.useCallback((p,b,g)=>{n.current&&n.current.connected?n.current.emit(p,b,g):console.warn(`WS: Cannot emit event '${p}', socket not connected.`)},[]),m=v.useMemo(()=>({connected:i,connect:l,reconnect:c,disconnect:d,on:u,off:f,emit:h}),[i,l,c,d,u,f,h]);return y.jsx(yk.Provider,{value:m,children:e})};var En=(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.MessageRead="message:read",e))(En||{}),st=(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))(st||{});const Pc=e=>{const t=bb(),n=(r,i)=>{var o;const s=((o=J$.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},ED=e=>({accessToken:localStorage.getItem(`${e}:${Gn.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${Gn.CustomerRefreshToken}`)||""}),il=()=>{const{widget:e}=kt();return e?ED(e.link_id):null},ho=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function _D(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const PD=()=>am({mutationFn:e=>bo(`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})})}),jD=(e,t)=>bo(`clients/${e}/chats`,{headers:t}),Up=(e,t)=>bo(`clients/${e}/chats`,{method:"DELETE",headers:t}),RD=(e,t,n)=>bo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":lu(Gn.DeviceId,"")||""}}),AD=()=>{const e=il();return am({mutationFn:t=>RD(t.rating,t.comment,ho(e))})},OD=e=>{const t=il();return am({mutationFn:n=>bo(`clients/${e}/chats/files`,{method:"POST",headers:ho(t),body:N_({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function DD(e){return e&&typeof e=="object"&&"file_urls"in e}const Km=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},is=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t};function Hp({text:e}){var c,d,u,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=kt(),o=Oe(),a=rl(),l=()=>{i(!1),s&&s()};return r?y.jsxs(be.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:ge("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(C.TooltipBackground),color:o.getColor(C.TooltipText)},children:[y.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(Q.CloseButtonAria),children:y.jsx(fe.X,{className:"size-3"})}),y.jsx(be.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(C.TooltipText)},children:e||(n?(d=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:d.tooltip_message_active:(f=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:f.tooltip_message)||a(n?Q.TooltipActive:Q.TooltipDefault)}),y.jsx("div",{className:ge("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const MD="/notify.mp3",FD=async e=>{await new Audio(e||MD).play()};function C0({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=ui(),{isHaveChat:i,open:s,soundPath:o}=kt(),[a,l]=v.useState(!0),[c,d]=v.useState(0),[u,f]=v.useState(null),h=rl(),m=()=>{FD(o)},p=(b,g)=>{if(u&&clearInterval(u),b||!i||g===0||Number.isNaN(g)){window.document.title=n,f(null);return}const w=setInterval(()=>{if(b||!i||g===0||Number.isNaN(g)){window.document.title=n,clearInterval(w),f(null);return}const x=`${g} ${h(Q.NewMessagesNotification)} - ${n}`;window.document.title!==x?window.document.title=x:window.document.title=n},1e3);return f(w),()=>{clearInterval(w),f(null)}};return v.useEffect(()=>p(s&&a,c),[c,s,a]),v.useEffect(()=>{const b=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",b,!1),()=>{document.removeEventListener("visibilitychange",b)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const b=()=>{!i||s&&a||(d(g=>g+1),m())};return r.on(st.MessageAgentCreate,b),r.on(st.ChatUserAssignee,m),()=>{r.off(st.MessageAgentCreate,b),r.off(st.ChatUserAssignee,m)}},[r,i,s,a]),s?null:!i||c===0?t?e:null:y.jsx(Hp,{text:h(Q.NewMessagesNotification)})}function ND({children:e,border:t}){var F,z,G,re;const n=ui(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:c}=kt(),[d]=v.useState(!0),u=Pc(),f=il(),h=Za(),m=Oe(),p=is(),[b,g]=v.useState({x:0,y:0}),w=T3(),x=v.useRef(null),k=v.useRef(null),[T,E]=v.useState(!1);v.useEffect(()=>((()=>{E("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{E(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{E(!0)})}),[]),v.useEffect(()=>{o&&h.pathname==="/"&&f&&f.accessToken&&u.push("chat")},[o]);const _=K=>{if(!x.current||!k.current)return K;const X=x.current.getBoundingClientRect(),D={width:window.innerWidth,height:window.innerHeight},I={top:20,right:20,bottom:40,left:20};let q=K.x,H=K.y;return X.right+q-b.x>D.width-I.right&&(q=D.width-I.right-X.width-(X.left-b.x)),X.left+q-b.x<I.left&&(q=I.left-(X.left-b.x)),X.bottom+H-b.y>D.height-I.bottom&&(H=D.height-I.bottom-X.height-(X.top-b.y)),X.top+H-b.y<I.top&&(H=I.top-(X.top-b.y)),{x:q,y:H}},j=()=>{i(!0),n&&(n.emit(En.WidgetOpen,{}),l&&l())},P=()=>{i(!1),n&&(n.emit(En.WidgetClose,{}),c&&c())},O=()=>{i(!1),s(!1),Up(a.client_id,ho(f)),u.push("registration")};v.useEffect(()=>{if(p&&o&&j(),!(!n||!a))return n.on(st.Banned,O),()=>{n.off(st.Banned,O)}},[]);function $(K){T&&w.start(K)}return y.jsx("section",{className:"relative w-full h-full",ref:k,children:y.jsxs(Kr,{children:[r&&y.jsx(be.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%":((z=(F=a==null?void 0:a.appearance)==null?void 0:F.design)==null?void 0:z.width)||"21rem",height:p?"var(--app-height, 100dvh)":((re=(G=a==null?void 0:a.appearance)==null?void 0:G.design)==null?void 0:re.height)||"30rem",left:p?"0":"",right:p?"0px !important":"",maxHeight:p?"var(--app-height, 100dvh)":"",borderColor:p?"":m.getColor(C.Border),boxShadow:p?"":`0 10px 25px -5px ${m.getColor(C.ShadowColor)}, 0 8px 10px -6px ${m.getColor(C.ShadowColor)}`,borderRadius:p?"":m.getRadius()},className:ge("fixed z-300 overflow-hidden",{"border border-solid dark:border-zink-500":t,"bottom-12 right-12":!p,"!bottom-0 !right-0":p}),children:e},"widget-container"),!T&&y.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[y.jsx(C0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),y.jsxs(Kr,{mode:"wait",children:[!r&&y.jsxs(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:j,children:[y.jsx(be.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:ge("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(C.ButtonBackground)}}),y.jsx(fe.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!p&&y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:P,children:y.jsx(fe.X,{className:"size-7"})},"desktop-close-button")]})]}),T&&y.jsx(be.div,{ref:x,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:b.x,y:b.y},drag:T,dragControls:w,dragMomentum:!1,dragElastic:0,onDragEnd:(K,X)=>{const D={x:b.x+X.offset.x,y:b.y+X.offset.y},I=_(D);g(I)},children:y.jsxs(Kr,{children:[y.jsx(C0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),!r&&y.jsx("div",{className:"cursor-move",onPointerDown:$,children:y.jsxs(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:j,children:[y.jsx(be.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:ge("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:m.getColor(C.ButtonBackground)}}),y.jsx(fe.Chat,{className:"size-7"})]})},"chat-button"),r&&!p&&y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:P,children:y.jsx(fe.X,{className:"size-7"})},"desktop-close-button")]})})]})})}function xk(e){const{widget:t}=kt();return y.jsx(A3,{widget:t,children:y.jsx(ND,{...e})})}function ss(e){this._maxSize=e,this.clear()}ss.prototype.clear=function(){this._size=0,this._values=Object.create(null)};ss.prototype.get=function(e){return this._values[e]};ss.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var LD=/[^.^\]^[]+|(?=\[\]|\.\.)/g,wk=/^\d+$/,ID=/^\d/,$D=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,BD=/^\s*(['"]?)(.*?)(\1)\s*$/,Xm=512,T0=new ss(Xm),E0=new ss(Xm),_0=new ss(Xm),zi={Cache:ss,split:Wp,normalizePath:Wd,setter:function(e){var t=Wd(e);return E0.get(e)||E0.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=Wd(e);return _0.get(e)||_0.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+(Zm(n)||wk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){zD(Array.isArray(e)?e:Wp(e),t,n)}};function Wd(e){return T0.get(e)||T0.set(e,Wp(e).map(function(t){return t.replace(BD,"$2")}))}function Wp(e){return e.match(LD)||[""]}function zD(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(HD(i)&&(i='"'+i+'"'),a=Zm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Zm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function VD(e){return e.match(ID)&&!e.match(wk)}function UD(e){return $D.test(e)}function HD(e){return!Zm(e)&&(VD(e)||UD(e))}const WD=/[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,jc=e=>e.match(WD)||[],Rc=e=>e[0].toUpperCase()+e.slice(1),Jm=(e,t)=>jc(e).join(t).toLowerCase(),bk=e=>jc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),qD=e=>Rc(bk(e)),GD=e=>Jm(e,"_"),QD=e=>Jm(e,"-"),YD=e=>Rc(Jm(e," ")),KD=e=>jc(e).map(Rc).join(" ");var qd={words:jc,upperFirst:Rc,camelCase:bk,pascalCase:qD,snakeCase:GD,kebabCase:QD,sentenceCase:YD,titleCase:KD},eg={exports:{}};eg.exports=function(e){return Sk(XD(e),e)};eg.exports.array=Sk;function Sk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=ZD(t),a=JD(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[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(c,d,u){if(u.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[d]){i[d]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),d=h.length){u.add(c);do{var m=h[--d];l(m,a.get(m),u)}while(d);u.delete(c)}r[--n]=c}}}function XD(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 ZD(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 JD(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var eM=eg.exports;const tM=Xi(eM),nM=Object.prototype.toString,rM=Error.prototype.toString,iM=RegExp.prototype.toString,sM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",oM=/^Symbol\((.*)\)(.*)$/;function aM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function P0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return aM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return sM.call(e).replace(oM,"Symbol($1)");const r=nM.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+rM.call(e)+"]":r==="RegExp"?iM.call(e):null}function Zr(e,t){let n=P0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=P0(this[r],t);return s!==null?s:i},2)}function kk(e){return e==null?[]:[].concat(e)}let Ck,Tk,Ek,lM=/\$\{\s*(\w+)\s*\}/g;Ck=Symbol.toStringTag;class j0{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[Ck]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],kk(t).forEach(s=>{if(Rt.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]}}Tk=Symbol.hasInstance;Ek=Symbol.toStringTag;class Rt 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(lM,(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 j0(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[Ek]="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,Rt)}static[Tk](t){return j0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Mn={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}},Tt={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"},uM={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"},qp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},cM={isValue:"${path} field must be ${value}"},uu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},dM={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"},fM={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 Rt.formatError(Mn.notType,e)}};Object.assign(Object.create(null),{mixed:Mn,string:Tt,number:uM,date:qp,object:uu,array:dM,boolean:cM,tuple:fM});const tg=e=>e&&e.__isYupSchema__;class Gu{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 Gu(t,(a,l)=>{var c;let d=o(...a)?i:s;return(c=d==null?void 0:d(l))!=null?c: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(!tg(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Fl={context:"$",value:"."};class os{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]===Fl.context,this.isValue=this.key[0]===Fl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Fl.context:this.isValue?Fl.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}}os.prototype.__isYupRef=!0;const ji=e=>e==null;function gs(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:d,params:u,message:f,skipAbsent:h}=e;let{parent:m,context:p,abortEarly:b=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function w($){return os.isRef($)?$.getValue(n,m,p):$}function x($={}){const F=Object.assign({value:n,originalValue:s,label:o.spec.label,path:$.path||r,spec:o.spec,disableStackTrace:$.disableStackTrace||g},u,$.params);for(const G of Object.keys(F))F[G]=w(F[G]);const z=new Rt(Rt.formatError($.message||f,F),n,F.path,$.type||c,F.disableStackTrace);return z.params=F,z}const k=b?a:l;let T={path:r,parent:m,type:c,from:i.from,createError:x,resolve:w,options:i,originalValue:s,schema:o};const E=$=>{Rt.isError($)?k($):$?l(null):k(x())},_=$=>{Rt.isError($)?k($):a($)};if(h&&ji(n))return E(!0);let P;try{var O;if(P=d.call(T,n,T),typeof((O=P)==null?void 0:O.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(P).then(E,_)}}catch($){_($);return}E(P)}return t.OPTIONS=e,t}function pM(e,t,n,r=n){let i,s,o;return t?(zi.forEach(t,(a,l,c)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",f=c?parseInt(d,10):0;if(e.innerType||u){if(u&&!c)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=u?e.spec.types[f]:e.innerType}if(!c){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 Qu extends Set{describe(){const t=[];for(const n of this.values())t.push(os.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 Qu(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(tg(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 Yn{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 Qu,this._blacklist=new Qu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Mn.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&&ji(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(QP,{isPresent:t,childRef:i,sizeRef:s,children:v.cloneElement(e,{ref:i})})}const KP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=wc(XP),c=v.useId();let d=!0,u=v.useMemo(()=>(d=!1,{id:c,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&&(u={...u}),v.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),v.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=y.jsx(YP,{isPresent:n,anchorX:a,children:e})),y.jsx(bc.Provider,{value:u,children:e})};function XP(){return new Map}function Ob(e=!0){const t=v.useContext(bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=v.useId();v.useEffect(()=>{if(e)return i(s)},[e]);const o=v.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const jl=e=>e.key||"";function ty(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Kr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Ob(o),d=v.useMemo(()=>ty(e),[e]),u=o&&!l?[]:d.map(jl),f=v.useRef(!0),p=v.useRef(d),h=wc(()=>new Map),[m,x]=v.useState(d),[g,w]=v.useState(d);Ab(()=>{f.current=!1,p.current=d;for(let T=0;T<g.length;T++){const E=jl(g[T]);u.includes(E)?h.delete(E):h.get(E)!==!0&&h.set(E,!1)}},[g,u.length,u.join("-")]);const b=[];if(d!==m){let T=[...d];for(let E=0;E<g.length;E++){const _=g[E],j=jl(_);u.includes(j)||(T.splice(E,0,_),b.push(_))}return s==="wait"&&b.length&&(T=b),w(ty(T)),x(d),null}const{forceRender:k}=v.useContext(dm);return y.jsx(y.Fragment,{children:g.map(T=>{const E=jl(T),_=o&&!l?!1:d===g||u.includes(E),j=()=>{if(h.has(E))h.set(E,!0);else return;let M=!0;h.forEach(P=>{P||(M=!1)}),M&&(k==null||k(),w(p.current),o&&(c==null||c()),r&&r())};return y.jsx(KP,{isPresent:_,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:_?void 0:j,anchorX:a,children:T},E)})})};function hm(e,t){e.indexOf(t)===-1&&e.push(t)}function mm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let gp=()=>{};const vp={skipAnimations:!1,useManualTiming:!1};function gm(e){let t;return()=>(t===void 0&&(t=e()),t)}const ln=e=>e,ja=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class vm{constructor(){this.subscriptions=[]}add(t){return hm(this.subscriptions,t),()=>mm(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 Vn=e=>e*1e3,Un=e=>e/1e3;function Db(e,t){return t?e*(1e3/t):0}const ZP=gm(()=>window.ScrollTimeline!==void 0);class JP{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(ZP()&&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 ej extends JP{then(t,n){return this.finished.finally(t).then(()=>{})}}const ny={value:null,addProjectionMetrics:null},ym=e=>Array.isArray(e)&&typeof e[0]=="number",tj={};function nj(e,t){const n=gm(e);return()=>tj[t]??n()}const Ra=nj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mb=(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)})`},Wo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,yp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wo([0,.65,.55,1]),circOut:Wo([.55,0,1,.45]),backIn:Wo([.31,.01,.66,-.59]),backOut:Wo([.33,1.53,.69,.99])};function Fb(e,t){if(e)return typeof e=="function"&&Ra()?Mb(e,t):ym(e)?Wo(e):Array.isArray(e)?e.map(n=>Fb(n,t)||yp.easeOut):yp[e]}function rj(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=Fb(a,i);return Array.isArray(u)&&(d.easing=u),e.animate(d,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function xm(e){return typeof e=="function"&&"applyToOptions"in e}function wm(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Bu=2e4;function bm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Bu;)t+=n,r=e.next(t);return t>=Bu?1/0:t}function ij(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(bm(r),Bu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Un(i)}}function Nb(e){return!!(typeof e=="function"&&Ra()||!e||typeof e=="string"&&(e in yp||Ra())||ym(e)||Array.isArray(e)&&e.every(Nb))}function ry(e,t){e.timeline=t,e.onfinish=null}const Rl=["read","resolveKeyframes","update","preRender","render","postRender"];function sj(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 c(u){o.has(u)&&(d.schedule(u),e()),l++,u(a)}const d={schedule:(u,f=!1,p=!1)=>{const m=p&&i?n:r;return f&&o.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&ny.value&&ny.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(u))}};return d}const oj=40;function Lb(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Rl.reduce((g,w)=>(g[w]=sj(s,t?w:void 0),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,oj),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),d.process(i),u.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:Rl.reduce((g,w)=>{const b=o[w];return g[w]=(k,T=!1,E=!1)=>(n||h(),b.schedule(k,T,E)),g},{}),cancel:g=>{for(let w=0;w<Rl.length;w++)o[Rl[w]].cancel(g)},state:i,steps:o}}const{schedule:Sm,cancel:lB}=Lb(queueMicrotask,!1),{schedule:Se,cancel:ni,state:it,steps:Pd}=Lb(typeof requestAnimationFrame<"u"?requestAnimationFrame:ln,!0);let eu;function aj(){eu=void 0}const Hn={now:()=>(eu===void 0&&Hn.set(it.isProcessing||vp.useManualTiming?it.timestamp:performance.now()),eu),set:e=>{eu=e,queueMicrotask(aj)}},gn={x:!1,y:!1};function Ib(){return gn.x||gn.y}function lj(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 uj(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 $b(e,t){const n=uj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function iy(e){return!(e.pointerType==="touch"||Ib())}function cj(e,t,n={}){const[r,i,s]=$b(e,n),o=a=>{if(!iy(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{iy(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Bb=(e,t)=>t?e===t?!0:Bb(e,t.parentElement):!1,km=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fj(e){return dj.has(e.tagName)||e.tabIndex!==-1}const qo=new WeakSet;function sy(e){return t=>{t.key==="Enter"&&e(t)}}function jd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const pj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=sy(()=>{if(qo.has(n))return;jd(n,"down");const i=sy(()=>{jd(n,"up")}),s=()=>jd(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 oy(e){return km(e)&&!Ib()}function hj(e,t,n={}){const[r,i,s]=$b(e,n),o=a=>{const l=a.currentTarget;if(!oy(a)||qo.has(l))return;qo.add(l);const c=t(l,a),d=(p,h)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),!(!oy(p)||!qo.has(l))&&(qo.delete(l),typeof c=="function"&&c(p,{success:h}))},u=p=>{d(p,l===window||l===document||n.useGlobalTarget||Bb(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>pj(c,i)),!fj(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const ay=30,mj=e=>!isNaN(parseFloat(e));class gj{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Hn.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=Hn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mj(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 vm);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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=Hn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ay)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ay);return Db(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 Aa(e,t){return new gj(e,t)}const zb=v.createContext({strict:!1}),ly={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"]},fo={};for(const e in ly)fo[e]={isEnabled:t=>ly[e].some(n=>!!t[n])};function vj(e){for(const t in e)fo[t]={...fo[t],...e[t]}}const yj=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 zu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||yj.has(e)}let Vb=e=>!zu(e);function xj(e){e&&(Vb=t=>t.startsWith("on")?!zu(t):e(t))}try{xj(require("@emotion/is-prop-valid").default)}catch{}function wj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Vb(i)||n===!0&&zu(i)||!t&&!zu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function bj(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 Sc=v.createContext({});function kc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Oa(e){return typeof e=="string"||Array.isArray(e)}const Cm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tm=["initial",...Cm];function Cc(e){return kc(e.animate)||Tm.some(t=>Oa(e[t]))}function Ub(e){return!!(Cc(e)||e.variants)}function Sj(e,t){if(Cc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Oa(n)?n:void 0,animate:Oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function kj(e){const{initial:t,animate:n}=Sj(e,v.useContext(Sc));return v.useMemo(()=>({initial:t,animate:n}),[uy(t),uy(n)])}function uy(e){return Array.isArray(e)?e.join(" "):e}const Cj=Symbol.for("motionComponentSymbol");function Rs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Tj(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Rs(n)&&(n.current=r))},[t])}const Em=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ej="framerAppearId",Hb="data-"+Em(Ej),Wb=v.createContext({});function _j(e,t,n,r,i){var m,x;const{visualElement:s}=v.useContext(Sc),o=v.useContext(zb),a=v.useContext(bc),l=v.useContext(pm).reducedMotion,c=v.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,u=v.useContext(Wb);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Pj(c.current,n,i,u);const f=v.useRef(!1);v.useInsertionEffect(()=>{d&&f.current&&d.update(n,a)});const p=n[Hb],h=v.useRef(!!p&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,p))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,p)));return Ab(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Sm.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),v.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,p)}),h.current=!1))}),d}function Pj(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:qb(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Rs(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function qb(e){if(e)return e.options.allowProjection!==!1?e.projection:qb(e.parent)}function jj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&vj(e);function s(a,l){let c;const d={...v.useContext(pm),...a,layoutId:Rj(a)},{isStatic:u}=d,f=kj(a),p=r(a,u);if(!u&&fm){Aj();const h=Oj(d);c=h.MeasureLayout,f.visualElement=_j(i,p,d,t,h.ProjectionNode)}return y.jsxs(Sc.Provider,{value:f,children:[c&&f.visualElement?y.jsx(c,{visualElement:f.visualElement,...d}):null,n(i,a,Tj(p,f.visualElement,l),p,u,f.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=v.forwardRef(s);return o[Cj]=i,o}function Rj({layoutId:e}){const t=v.useContext(dm).id;return t&&e!==void 0?t+"-"+e:e}function Aj(e,t){v.useContext(zb).strict}function Oj(e){const{drag:t,layout:n}=fo;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 Gb=e=>t=>typeof t=="string"&&t.startsWith(e),_m=Gb("--"),Dj=Gb("var(--"),Pm=e=>Dj(e)?Mj.test(e.split("/*")[0].trim()):!1,Mj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Da={};function Fj(e){for(const t in e)Da[t]=e[t],_m(t)&&(Da[t].isCSSVariable=!0)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rs=new Set(ko);function Qb(e,{layout:t,layoutId:n}){return rs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Da[e]||e==="opacity")}const ht=e=>!!(e&&e.getVelocity),Yb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ma={...Co,transform:e=>pr(0,1,e)},Al={...Co,default:1},Ja=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sr=Ja("deg"),Wn=Ja("%"),Z=Ja("px"),Nj=Ja("vh"),Lj=Ja("vw"),cy={...Wn,parse:e=>Wn.parse(e)/100,transform:e=>Wn.transform(e*100)},Ij={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,backgroundPositionX:Z,backgroundPositionY:Z},$j={rotate:Sr,rotateX:Sr,rotateY:Sr,rotateZ:Sr,scale:Al,scaleX:Al,scaleY:Al,scaleZ:Al,skew:Sr,skewX:Sr,skewY:Sr,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Ma,originX:cy,originY:cy,originZ:Z},dy={...Co,transform:Math.round},jm={...Ij,...$j,zIndex:dy,size:Z,fillOpacity:Ma,strokeOpacity:Ma,numOctaves:dy},Bj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zj=ko.length;function Vj(e,t,n){let r="",i=!0;for(let s=0;s<zj;s++){const o=ko[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 c=Yb(a,jm[o]);if(!l){i=!1;const d=Bj[o]||o;r+=`${d}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Rm(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(rs.has(l)){o=!0;continue}else if(_m(l)){i[l]=c;continue}else{const d=Yb(c,jm[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=Vj(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${c} ${d}`}}const Am=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Kb(e,t,n){for(const r in t)!ht(t[r])&&!Qb(r,n)&&(e[r]=t[r])}function Uj({transformTemplate:e},t){return v.useMemo(()=>{const n=Am();return Rm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Hj(e,t){const n=e.style||{},r={};return Kb(r,n,e),Object.assign(r,Uj(e,t)),r}function Wj(e,t){const n={},r=Hj(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 qj=["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 Om(e){return typeof e!="string"||e.includes("-")?!1:!!(qj.indexOf(e)>-1||/[A-Z]/u.test(e))}const Gj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qj={offset:"strokeDashoffset",array:"strokeDasharray"};function Yj(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Gj:Qj;e[s.offset]=Z.transform(-r);const o=Z.transform(t),a=Z.transform(n);e[s.array]=`${o} ${a}`}function fy(e,t,n){return typeof e=="string"?e:Z.transform(t+n*e)}function Kj(e,t,n){const r=fy(t,e.x,e.width),i=fy(n,e.y,e.height);return`${r} ${i}`}function Dm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Rm(e,c,u),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=Kj(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&&Yj(f,o,a,l,!1)}const Xb=()=>({...Am(),attrs:{}}),Mm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Xj(e,t,n,r){const i=v.useMemo(()=>{const s=Xb();return Dm(s,t,Mm(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Kb(s,e.style,e),i.style={...s,...i.style}}return i}function Zj(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Om(n)?Xj:Wj)(r,s,o,n),c=wj(r,typeof n=="string",e),d=n!==v.Fragment?{...c,...l,ref:i}:{},{children:u}=r,f=v.useMemo(()=>ht(u)?u.get():u,[u]);return v.createElement(n,{...d,children:f})}}function py(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fm(e,t,n,r){if(typeof t=="function"){const[i,s]=py(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]=py(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const xp=e=>Array.isArray(e),Jj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),eR=e=>xp(e)?e[e.length-1]||0:e;function tu(e){const t=ht(e)?e.get():e;return Jj(t)?t.toValue():t}function tR({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:nR(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const Zb=e=>(t,n)=>{const r=v.useContext(Sc),i=v.useContext(bc),s=()=>tR(e,t,r,i);return n?s():wc(s)};function nR(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=tu(s[f]);let{initial:o,animate:a}=e;const l=Cc(e),c=Ub(e);t&&c&&!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 u=d?a:o;if(u&&typeof u!="boolean"&&!kc(u)){const f=Array.isArray(u)?u:[u];for(let p=0;p<f.length;p++){const h=Fm(e,f[p]);if(h){const{transitionEnd:m,transition:x,...g}=h;for(const w in g){let b=g[w];if(Array.isArray(b)){const k=d?b.length-1:0;b=b[k]}b!==null&&(i[w]=b)}for(const w in m)i[w]=m[w]}}}return i}function Nm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ht(r[o])||t.style&&ht(t.style[o])||Qb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const rR={useVisualState:Zb({scrapeMotionValuesFromProps:Nm,createRenderState:Am})};function Jb(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 eS(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 tS=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 nS(e,t,n,r){eS(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(tS.has(i)?i:Em(i),t.attrs[i])}function rS(e,t,n){const r=Nm(e,t,n);for(const i in e)if(ht(e[i])||ht(t[i])){const s=ko.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const hy=["x","y","width","height","cx","cy","r"],iR={useVisualState:Zb({scrapeMotionValuesFromProps:rS,createRenderState:Xb,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(rs.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<hy.length;a++){const l=hy[a];e[l]!==t[l]&&(o=!0)}o&&Se.read(()=>{Jb(n,r),Se.render(()=>{Dm(r,i,Mm(n.tagName),e.transformTemplate),nS(n,r)})})}})};function sR(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Om(r)?iR:rR,preloadedFeatures:e,useRender:Zj(i),createVisualElement:t,Component:r};return jj(o)}}function Fa(e,t,n){const r=e.getProps();return Fm(r,t,n!==void 0?n:r.custom,e)}const iS=new Set(["width","height","top","left","right","bottom",...ko]);function oR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Aa(n))}function aR(e,t){const n=Fa(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=eR(s[o]);oR(e,o,a)}}function lR(e){return!!(ht(e)&&e.add)}function wp(e,t){const n=e.getValue("willChange");if(lR(n))return n.add(t);if(!n&&vp.WillChange){const r=new vp.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function sS(e){return e.props[Hb]}const oS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uR=1e-7,cR=12;function dR(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=oS(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>uR&&++a<cR);return o}function el(e,t,n,r){if(e===t&&n===r)return ln;const i=s=>dR(s,0,1,e,n);return s=>s===0||s===1?s:oS(i(s),t,r)}const aS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lS=e=>t=>1-e(1-t),uS=el(.33,1.53,.69,.99),Lm=lS(uS),cS=aS(Lm),dS=e=>(e*=2)<1?.5*Lm(e):.5*(2-Math.pow(2,-10*(e-1))),Im=e=>1-Math.sin(Math.acos(e)),fS=lS(Im),pS=aS(Im),hS=e=>/^0[^.\s]+$/u.test(e);function fR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hS(e):!0}const ra=e=>Math.round(e*1e5)/1e5,$m=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pR(e){return e==null}const hR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bm=(e,t)=>n=>!!(typeof n=="string"&&hR.test(n)&&n.startsWith(e)||t&&!pR(n)&&Object.prototype.hasOwnProperty.call(n,t)),mS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match($m);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},mR=e=>pr(0,255,e),Rd={...Co,transform:e=>Math.round(mR(e))},_i={test:Bm("rgb","red"),parse:mS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rd.transform(e)+", "+Rd.transform(t)+", "+Rd.transform(n)+", "+ra(Ma.transform(r))+")"};function gR(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 bp={test:Bm("#"),parse:gR,transform:_i.transform},As={test:Bm("hsl","hue"),parse:mS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wn.transform(ra(t))+", "+Wn.transform(ra(n))+", "+ra(Ma.transform(r))+")"},ft={test:e=>_i.test(e)||bp.test(e)||As.test(e),parse:e=>_i.test(e)?_i.parse(e):As.test(e)?As.parse(e):bp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_i.transform(e):As.transform(e)},vR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yR(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match($m))==null?void 0:t.length)||0)+(((n=e.match(vR))==null?void 0:n.length)||0)>0}const gS="number",vS="color",xR="var",wR="var(",my="${}",bR=/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 Na(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(bR,l=>(ft.test(l)?(r.color.push(s),i.push(vS),n.push(ft.parse(l))):l.startsWith(wR)?(r.var.push(s),i.push(xR),n.push(l)):(r.number.push(s),i.push(gS),n.push(parseFloat(l))),++s,my)).split(my);return{values:n,split:a,indexes:r,types:i}}function yS(e){return Na(e).values}function xS(e){const{split:t,types:n}=Na(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===gS?s+=ra(i[o]):a===vS?s+=ft.transform(i[o]):s+=i[o]}return s}}const SR=e=>typeof e=="number"?0:e;function kR(e){const t=yS(e);return xS(e)(t.map(SR))}const ri={test:yR,parse:yS,createTransformer:xS,getAnimatableNone:kR},CR=new Set(["brightness","contrast","saturate","opacity"]);function TR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($m)||[];if(!r)return e;const i=n.replace(r,"");let s=CR.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const ER=/\b([a-z-]*)\(.*?\)/gu,Sp={...ri,getAnimatableNone:e=>{const t=e.match(ER);return t?t.map(TR).join(" "):e}},_R={...jm,color:ft,backgroundColor:ft,outlineColor:ft,fill:ft,stroke:ft,borderColor:ft,borderTopColor:ft,borderRightColor:ft,borderBottomColor:ft,borderLeftColor:ft,filter:Sp,WebkitFilter:Sp},wS=e=>_R[e];function bS(e,t){let n=wS(e);return n!==Sp&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const PR=new Set(["auto","none","0"]);function jR(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!PR.has(s)&&Na(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=bS(n,i)}const Pi=e=>e*180/Math.PI,kp=e=>{const t=Pi(Math.atan2(e[1],e[0]));return Cp(t)},RR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:kp,rotateZ:kp,skewX:e=>Pi(Math.atan(e[1])),skewY:e=>Pi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cp=e=>(e=e%360,e<0&&(e+=360),e),gy=kp,vy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),AR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vy,scaleY:yy,scale:e=>(vy(e)+yy(e))/2,rotateX:e=>Cp(Pi(Math.atan2(e[6],e[5]))),rotateY:e=>Cp(Pi(Math.atan2(-e[2],e[0]))),rotateZ:gy,rotate:gy,skewX:e=>Pi(Math.atan(e[4])),skewY:e=>Pi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xy(e){return e.includes("scale")?1:0}function Tp(e,t){if(!e||e==="none")return xy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=AR,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=RR,i=a}if(!i)return xy(t);const s=r[t],o=i[1].split(",").map(DR);return typeof s=="function"?s(o):o[s]}const OR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Tp(n,t)};function DR(e){return parseFloat(e.trim())}const wy=e=>e===Co||e===Z,MR=new Set(["x","y","z"]),FR=ko.filter(e=>!MR.has(e));function NR(e){const t=[];return FR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const po={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})=>Tp(t,"x"),y:(e,{transform:t})=>Tp(t,"y")};po.translateX=po.x;po.translateY=po.y;const Bi=new Set;let Ep=!1,_p=!1;function SS(){if(_p){const e=Array.from(Bi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=NR(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)})}_p=!1,Ep=!1,Bi.forEach(e=>e.complete()),Bi.clear()}function kS(){Bi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_p=!0)})}function LR(){kS(),SS()}class zm{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?(Bi.add(this),Ep||(Ep=!0,Se.read(kS),Se.resolveKeyframes(SS))):(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),Bi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Bi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const CS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),IR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $R(e){const t=IR.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function TS(e,t,n=1){const[r,i]=$R(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return CS(o)?parseFloat(o):o}return Pm(i)?TS(i,t,n+1):i}const ES=e=>t=>t.test(e),BR={test:e=>e==="auto",parse:e=>e},_S=[Co,Z,Wn,Sr,Lj,Nj,BR],by=e=>_S.find(ES(e));class PS extends zm{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 c=t[l];if(typeof c=="string"&&(c=c.trim(),Pm(c))){const d=TS(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!iS.has(r)||t.length!==2)return;const[i,s]=t,o=by(i),a=by(s);if(o!==a)if(wy(o)&&wy(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)fR(t[i])&&r.push(i);r.length&&jR(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=po[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]=po[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,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Sy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ri.test(e)||e==="0")&&!e.startsWith("url("));function zR(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 VR(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=Sy(i,t),a=Sy(s,t);return!o||!a?!1:zR(e)||(n==="spring"||xm(n))&&r}const UR=e=>e!==null;function Tc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(UR),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const HR=40;class jS{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=Hn.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>HR?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&LR(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Hn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!VR(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Tc(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 je=(e,t,n)=>e+(t-e)*n;function Ad(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 WR({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=Ad(l,a,e+1/3),s=Ad(l,a,e),o=Ad(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Vu(e,t){return n=>n>0?t:e}const Od=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},qR=[bp,_i,As],GR=e=>qR.find(t=>t.test(e));function ky(e){const t=GR(e);if(!t)return!1;let n=t.parse(e);return t===As&&(n=WR(n)),n}const Cy=(e,t)=>{const n=ky(e),r=ky(t);if(!n||!r)return Vu(e,t);const i={...n};return s=>(i.red=Od(n.red,r.red,s),i.green=Od(n.green,r.green,s),i.blue=Od(n.blue,r.blue,s),i.alpha=je(n.alpha,r.alpha,s),_i.transform(i))},QR=(e,t)=>n=>t(e(n)),tl=(...e)=>e.reduce(QR),Pp=new Set(["none","hidden"]);function YR(e,t){return Pp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function KR(e,t){return n=>je(e,t,n)}function Vm(e){return typeof e=="number"?KR:typeof e=="string"?Pm(e)?Vu:ft.test(e)?Cy:JR:Array.isArray(e)?RS:typeof e=="object"?ft.test(e)?Cy:XR:Vu}function RS(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Vm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function XR(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function ZR(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 JR=(e,t)=>{const n=ri.createTransformer(t),r=Na(e),i=Na(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?Pp.has(e)&&!i.values.length||Pp.has(t)&&!r.values.length?YR(e,t):tl(RS(ZR(r,i),i.values),n):Vu(e,t)};function AS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?je(e,t,n):Vm(e)(e,t)}const eA=5;function OS(e,t,n){const r=Math.max(t-eA,0);return Db(n-e(r),t-r)}const Me={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},Dd=.001;function tA({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:r=Me.mass}){let i,s,o=1-t;o=pr(Me.minDamping,Me.maxDamping,o),e=pr(Me.minDuration,Me.maxDuration,Un(e)),o<1?(i=c=>{const d=c*o,u=d*e,f=d-n,p=jp(c,o),h=Math.exp(-u);return Dd-f/p*h},s=c=>{const u=c*o*e,f=u*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,h=Math.exp(-u),m=jp(Math.pow(c,2),o);return(-i(c)+Dd>0?-1:1)*((f-p)*h)/m}):(i=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Dd+d*u},s=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=rA(i,s,a);if(e=Vn(e),isNaN(l))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const nA=12;function rA(e,t,n){let r=n;for(let i=1;i<nA;i++)r=r-e(r)/t(r);return r}function jp(e,t){return e*Math.sqrt(1-t*t)}const iA=["duration","bounce"],sA=["stiffness","damping","mass"];function Ty(e,t){return t.some(n=>e[n]!==void 0)}function oA(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!Ty(e,sA)&&Ty(e,iA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*pr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Me.mass,stiffness:i,damping:s}}else{const n=tA(e);t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function Uu(e=Me.visualDuration,t=Me.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:c,mass:d,duration:u,velocity:f,isResolvedFromDuration:p}=oA({...n,velocity:-Un(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*d)),x=o-s,g=Un(Math.sqrt(l/d)),w=Math.abs(x)<5;r||(r=w?Me.restSpeed.granular:Me.restSpeed.default),i||(i=w?Me.restDelta.granular:Me.restDelta.default);let b;if(m<1){const T=jp(g,m);b=E=>{const _=Math.exp(-m*g*E);return o-_*((h+m*g*x)/T*Math.sin(T*E)+x*Math.cos(T*E))}}else if(m===1)b=T=>o-Math.exp(-g*T)*(x+(h+g*x)*T);else{const T=g*Math.sqrt(m*m-1);b=E=>{const _=Math.exp(-m*g*E),j=Math.min(T*E,300);return o-_*((h+m*g*x)*Math.sinh(j)+T*x*Math.cosh(j))/T}}const k={calculatedDuration:p&&u||null,next:T=>{const E=b(T);if(p)a.done=T>=u;else{let _=0;m<1&&(_=T===0?Vn(h):OS(b,T,E));const j=Math.abs(_)<=r,M=Math.abs(o-E)<=i;a.done=j&&M}return a.value=a.done?o:E,a},toString:()=>{const T=Math.min(bm(k),Bu),E=Mb(_=>k.next(T*_).value,T,30);return T+"ms "+E},toTransition:()=>{}};return k}Uu.applyToOptions=e=>{const t=ij(e,100,Uu);return e.ease=Ra()?t.ease:"easeOut",e.duration=Vn(t.duration),e.type="keyframes",e};function Ey({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},p=j=>a!==void 0&&j<a||l!==void 0&&j>l,h=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let m=n*t;const x=u+m,g=o===void 0?x:o(x);g!==x&&(m=g-u);const w=j=>-m*Math.exp(-j/r),b=j=>g+w(j),k=j=>{const M=w(j),P=b(j);f.done=Math.abs(M)<=c,f.value=f.done?g:P};let T,E;const _=j=>{p(f.value)&&(T=j,E=Uu({keyframes:[f.value,h(f.value)],velocity:OS(b,j,f.value),damping:i,stiffness:s,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:j=>{let M=!1;return!E&&T===void 0&&(M=!0,k(j),_(j)),T!==void 0&&j>=T?E.next(j-T):(!M&&k(j),f)}}}const aA=el(.42,0,1,1),lA=el(0,0,.58,1),DS=el(.42,0,.58,1),uA=e=>Array.isArray(e)&&typeof e[0]!="number",_y={linear:ln,easeIn:aA,easeInOut:DS,easeOut:lA,circIn:Im,circInOut:pS,circOut:fS,backIn:Lm,backInOut:cS,backOut:uS,anticipate:dS},Py=e=>{if(ym(e)){gp(e.length===4);const[t,n,r,i]=e;return el(t,n,r,i)}else if(typeof e=="string")return gp(_y[e]!==void 0),_y[e];return e};function cA(e,t,n){const r=[],i=n||AS,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]||ln:t;a=tl(l,a)}r.push(a)}return r}function dA(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(gp(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=cA(t,r,i),l=a.length,c=d=>{if(o&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=ja(e[u],e[u+1],d);return a[u](f)};return n?d=>c(pr(e[0],e[s-1],d)):c}function fA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ja(0,t,r);e.push(je(n,1,i))}}function pA(e){const t=[0];return fA(t,e.length-1),t}function hA(e,t){return e.map(n=>n*t)}function mA(e,t){return e.map(()=>t||DS).splice(0,e.length-1)}function Hu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=uA(r)?r.map(Py):Py(r),s={done:!1,value:t[0]},o=hA(n&&n.length===t.length?n:pA(t),e),a=dA(o,t,{ease:Array.isArray(i)?i:mA(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const gA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Se.update(t,!0),stop:()=>ni(t),now:()=>it.isProcessing?it.timestamp:Hn.now()}},vA={decay:Ey,inertia:Ey,tween:Hu,keyframes:Hu,spring:Uu},yA=e=>e/100;class Um extends jS{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)||zm,a=(l,c)=>this.onKeyframesResolved(l,c);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=xm(n)?n:vA[n]||Hu;let l,c;a!==Hu&&typeof t[0]!="number"&&(l=tl(yA,AS(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=bm(d));const{calculatedDuration:u}=d,f=u+i,p=f*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,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:j}=this.options;return{done:!0,value:j[j.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:p,repeatType:h,repeatDelay:m,onUpdate:x}=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 g=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,k=s;if(p){const j=Math.min(this.currentTime,d)/u;let M=Math.floor(j),P=j%1;!P&&j>=1&&(P=1),P===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(h==="reverse"?(P=1-P,m&&(P-=m/u)):h==="mirror"&&(k=o)),b=pr(0,1,P)*u}const T=w?{done:!1,value:l[0]}:k.next(b);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return _&&i!==void 0&&(T.value=Tc(l,this.options,i)),x&&x(T.value),_&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Un(t.calculatedDuration):0}get time(){return Un(this.currentTime)}set time(t){t=Vn(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=Un(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=gA,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 xA=new Set(["opacity","clipPath","filter","transform"]),wA=gm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Wu=10,bA=2e4;function SA(e){return xm(e.type)||e.type==="spring"||!Nb(e.ease)}function kA(e,t){const n=new Um({...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<bA;)r=n.sample(s),i.push(r.value),s+=Wu;return{times:void 0,keyframes:i,duration:s-Wu,ease:"linear"}}const MS={anticipate:dS,backInOut:cS,circInOut:pS};function CA(e){return e in MS}class jy extends jS{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new PS(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:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Ra()&&CA(s)&&(s=MS[s]),SA(this.options)){const{onComplete:u,onUpdate:f,motionValue:p,element:h,...m}=this.options,x=kA(t,m);t=x.keyframes,t.length===1&&(t[1]=t[0]),r=x.duration,i=x.times,s=x.ease,o="keyframes"}const d=rj(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(ry(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:u}=this.options;a.set(Tc(t,this.options,n)),u&&u(),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 Un(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Un(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Vn(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 ln;const{animation:r}=n;ry(r,t)}return ln}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:c,onUpdate:d,onComplete:u,element:f,...p}=this.options,h=new Um({...p,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),m=Vn(this.time);c.setWithVelocity(h.sample(m-Wu).value,h.sample(m).value,Wu)}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:c}=n.owner.getProps();return wA()&&r&&xA.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const TA={type:"spring",stiffness:500,damping:25,restSpeed:10},EA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_A={type:"keyframes",duration:.8},PA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jA=(e,{keyframes:t})=>t.length>2?_A:rs.has(e)?e.startsWith("scale")?EA(t[1]):TA:PA;function RA({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const Hm=(e,t,n,r={},i,s)=>o=>{const a=wm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Vn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,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};RA(a)||(d={...d,...jA(e,d)}),d.duration&&(d.duration=Vn(d.duration)),d.repeatDelay&&(d.repeatDelay=Vn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),d.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const f=Tc(d.keyframes,a);if(f!==void 0)return Se.update(()=>{d.onUpdate(f),d.onComplete()}),new ej([])}return!s&&jy.supports(d)?new jy(d):new Um(d)};function AA({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function FS(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const u=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||c&&AA(c,d))continue;const p={delay:n,...wm(s||{},d)};let h=!1;if(window.MotionHandoffAnimation){const x=sS(e);if(x){const g=window.MotionHandoffAnimation(x,d,Se);g!==null&&(p.startTime=g,h=!0)}}wp(e,d),u.start(Hm(d,u,f,e.shouldReduceMotion&&iS.has(d)?{type:!1}:p,e,h));const m=u.animation;m&&l.push(m)}return o&&Promise.all(l).then(()=>{Se.update(()=>{o&&aR(e,o)})}),l}function Rp(e,t,n={}){var l;const r=Fa(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(FS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:f}=i;return OA(e,t,d+c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,d]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>d())}else return Promise.all([s(),o(n.delay)])}function OA(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(DA).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(Rp(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function DA(e,t){return e.sortNodePosition(t)}function MA(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Rp(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Rp(e,t,n);else{const i=typeof t=="function"?Fa(e,t,n.custom):t;r=Promise.all(FS(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function NS(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 FA=Tm.length;function LS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?LS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<FA;n++){const r=Tm[n],i=e.props[r];(Oa(i)||i===!1)&&(t[r]=i)}return t}const NA=[...Cm].reverse(),LA=Cm.length;function IA(e){return t=>Promise.all(t.map(({animation:n,options:r})=>MA(e,n,r)))}function $A(e){let t=IA(e),n=Ry(),r=!0;const i=l=>(c,d)=>{var f;const u=Fa(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(u){const{transition:p,transitionEnd:h,...m}=u;c={...c,...m,...h}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,d=LS(e.parent)||{},u=[],f=new Set;let p={},h=1/0;for(let x=0;x<LA;x++){const g=NA[x],w=n[g],b=c[g]!==void 0?c[g]:d[g],k=Oa(b),T=g===l?w.isActive:null;T===!1&&(h=x);let E=b===d[g]&&b!==c[g]&&k;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...p},!w.isActive&&T===null||!b&&!w.prevProp||kc(b)||typeof b=="boolean")continue;const _=BA(w.prevProp,b);let j=_||g===l&&w.isActive&&!E&&k||x>h&&k,M=!1;const P=Array.isArray(b)?b:[b];let I=P.reduce(i(g),{});T===!1&&(I={});const{prevResolvedValues:F={}}=w,B={...F,...I},V=te=>{j=!0,f.has(te)&&(M=!0,f.delete(te)),w.needsAnimating[te]=!0;const O=e.getValue(te);O&&(O.liveStyle=!1)};for(const te in B){const O=I[te],$=F[te];if(p.hasOwnProperty(te))continue;let H=!1;xp(O)&&xp($)?H=!NS(O,$):H=O!==$,H?O!=null?V(te):f.add(te):O!==void 0&&f.has(te)?V(te):w.protectedKeys[te]=!0}w.prevProp=b,w.prevResolvedValues=I,w.isActive&&(p={...p,...I}),r&&e.blockInitialAnimation&&(j=!1),j&&(!(E&&_)||M)&&u.push(...P.map(te=>({animation:te,options:{type:g}})))}if(f.size){const x={};if(typeof c.initial!="boolean"){const g=Fa(e,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(x.transition=g.transition)}f.forEach(g=>{const w=e.getBaseTarget(g),b=e.getValue(g);b&&(b.liveStyle=!0),x[g]=w??null}),u.push({animation:x})}let m=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,c)}),n[l].isActive=c;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=Ry(),r=!0}}}function BA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!NS(t,e):!1}function mi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ry(){return{animate:mi(!0),whileInView:mi(),whileHover:mi(),whileTap:mi(),whileDrag:mi(),whileFocus:mi(),exit:mi()}}class li{constructor(t){this.isMounted=!1,this.node=t}update(){}}class zA extends li{constructor(t){super(t),t.animationState||(t.animationState=$A(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();kc(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 VA=0;class UA extends li{constructor(){super(...arguments),this.id=VA++}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 HA={animation:{Feature:zA},exit:{Feature:UA}};function La(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function nl(e){return{point:{x:e.pageX,y:e.pageY}}}const WA=e=>t=>km(t)&&e(t,nl(t));function ia(e,t,n,r){return La(e,t,WA(n),r)}function IS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function qA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function GA(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 $S=1e-4,QA=1-$S,YA=1+$S,BS=.01,KA=0-BS,XA=0+BS;function xt(e){return e.max-e.min}function ZA(e,t,n){return Math.abs(e-t)<=n}function Ay(e,t,n,r=.5){e.origin=r,e.originPoint=je(t.min,t.max,e.origin),e.scale=xt(n)/xt(t),e.translate=je(n.min,n.max,e.origin)-e.originPoint,(e.scale>=QA&&e.scale<=YA||isNaN(e.scale))&&(e.scale=1),(e.translate>=KA&&e.translate<=XA||isNaN(e.translate))&&(e.translate=0)}function sa(e,t,n,r){Ay(e.x,t.x,n.x,r?r.originX:void 0),Ay(e.y,t.y,n.y,r?r.originY:void 0)}function Oy(e,t,n){e.min=n.min+t.min,e.max=e.min+xt(t)}function JA(e,t,n){Oy(e.x,t.x,n.x),Oy(e.y,t.y,n.y)}function Dy(e,t,n){e.min=t.min-n.min,e.max=e.min+xt(t)}function oa(e,t,n){Dy(e.x,t.x,n.x),Dy(e.y,t.y,n.y)}const My=()=>({translate:0,scale:1,origin:0,originPoint:0}),Os=()=>({x:My(),y:My()}),Fy=()=>({min:0,max:0}),Ie=()=>({x:Fy(),y:Fy()});function Zt(e){return[e("x"),e("y")]}function Md(e){return e===void 0||e===1}function Ap({scale:e,scaleX:t,scaleY:n}){return!Md(e)||!Md(t)||!Md(n)}function xi(e){return Ap(e)||zS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zS(e){return Ny(e.x)||Ny(e.y)}function Ny(e){return e&&e!=="0%"}function qu(e,t,n){const r=e-n,i=t*r;return n+i}function Ly(e,t,n,r,i){return i!==void 0&&(e=qu(e,i,r)),qu(e,n,r)+t}function Op(e,t=0,n=1,r,i){e.min=Ly(e.min,t,n,r,i),e.max=Ly(e.max,t,n,r,i)}function VS(e,{x:t,y:n}){Op(e.x,t.translate,t.scale,t.originPoint),Op(e.y,n.translate,n.scale,n.originPoint)}const Iy=.999999999999,$y=1.0000000000001;function eO(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&&Ms(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,VS(e,o)),r&&xi(s.latestValues)&&Ms(e,s.latestValues))}t.x<$y&&t.x>Iy&&(t.x=1),t.y<$y&&t.y>Iy&&(t.y=1)}function Ds(e,t){e.min=e.min+t,e.max=e.max+t}function By(e,t,n,r,i=.5){const s=je(e.min,e.max,i);Op(e,t,n,s,r)}function Ms(e,t){By(e.x,t.x,t.scaleX,t.scale,t.originX),By(e.y,t.y,t.scaleY,t.scale,t.originY)}function US(e,t){return IS(GA(e.getBoundingClientRect(),t))}function tO(e,t,n){const r=US(e,n),{scroll:i}=t;return i&&(Ds(r.x,i.offset.x),Ds(r.y,i.offset.y)),r}const HS=({current:e})=>e?e.ownerDocument.defaultView:null,zy=(e,t)=>Math.abs(e-t);function nO(e,t){const n=zy(e.x,t.x),r=zy(e.y,t.y);return Math.sqrt(n**2+r**2)}class WS{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 u=Nd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=nO(u.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:h}=u,{timestamp:m}=it;this.history.push({...h,timestamp:m});const{onStart:x,onMove:g}=this.handlers;f||(x&&x(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Fd(f,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Nd(u.type==="pointercancel"?this.lastMoveEventInfo:Fd(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,x),h&&h(u,x)},!km(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=nl(t),a=Fd(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=it;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Nd(a,this.history)),this.removeListeners=tl(ia(this.contextWindow,"pointermove",this.handlePointerMove),ia(this.contextWindow,"pointerup",this.handlePointerUp),ia(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ni(this.updatePoint)}}function Fd(e,t){return t?{point:t(e.point)}:e}function Vy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nd({point:e},t){return{point:e,delta:Vy(e,qS(t)),offset:Vy(e,rO(t)),velocity:iO(t,.1)}}function rO(e){return e[0]}function qS(e){return e[e.length-1]}function iO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qS(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Vn(t)));)n--;if(!r)return{x:0,y:0};const s=Un(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 sO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?je(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?je(n,e,r.max):Math.min(e,n)),e}function Uy(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 oO(e,{top:t,left:n,bottom:r,right:i}){return{x:Uy(e.x,n,i),y:Uy(e.y,t,r)}}function Hy(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 aO(e,t){return{x:Hy(e.x,t.x),y:Hy(e.y,t.y)}}function lO(e,t){let n=.5;const r=xt(e),i=xt(t);return i>r?n=ja(t.min,t.max-r,e.min):r>i&&(n=ja(e.min,e.max-i,t.min)),pr(0,1,n)}function uO(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 Dp=.35;function cO(e=Dp){return e===!1?e=0:e===!0&&(e=Dp),{x:Wy(e,"left","right"),y:Wy(e,"top","bottom")}}function Wy(e,t,n){return{min:qy(e,t),max:qy(e,n)}}function qy(e,t){return typeof e=="number"?e:e[t]||0}const dO=new WeakMap;class fO{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=Ie(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(nl(d).point)},s=(d,u)=>{const{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lj(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),Zt(x=>{let g=this.getAxisMotionValue(x).get()||0;if(Wn.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[x];b&&(g=xt(b)*(parseFloat(g)/100))}}this.originPoint[x]=g}),h&&Se.postRender(()=>h(d,u)),wp(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,u)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:x}=u;if(p&&this.currentDirection===null){this.currentDirection=pO(x),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,x),this.updateAxis("y",u.point,x),this.visualElement.render(),m&&m(d,u)},a=(d,u)=>this.stop(d,u),l=()=>Zt(d=>{var u;return this.getAnimationState(d)==="paused"&&((u=this.getAxisMotionValue(d).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new WS(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:HS(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&&Se.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||!Ol(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=sO(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&&Rs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=oO(r.layoutBox,t):this.constraints=!1,this.elastic=cO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=uO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Rs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=tO(r,i.root,this.visualElement.getTransformPagePoint());let o=aO(i.layout.layoutBox,s);if(n){const a=n(qA(o));this.hasMutatedConstraints=!!a,a&&(o=IS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(d=>{if(!Ol(d,n,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={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,...u};return this.startAxisValueAnimation(d,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wp(this.visualElement,t),r.start(Hm(t,r,0,n,this.visualElement,!1))}stopAnimation(){Zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zt(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){Zt(n=>{const{drag:r}=this.getProps();if(!Ol(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]-je(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=lO({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(),Zt(o=>{if(!Ol(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(je(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;dO.set(this.visualElement,this);const t=this.visualElement.current,n=ia(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Rs(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()),Se.read(r);const o=La(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.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=Dp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ol(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class hO extends li{constructor(t){super(t),this.removeGroupControls=ln,this.removeListeners=ln,this.controls=new fO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ln}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gy=e=>(t,n)=>{e&&Se.postRender(()=>e(t,n))};class mO extends li{constructor(){super(...arguments),this.removePointerDownListener=ln}onPointerDown(t){this.session=new WS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gy(t),onStart:Gy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Se.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=ia(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 nu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Z.test(e))e=parseFloat(e);else return e;const n=Qy(e,t.target.x),r=Qy(e,t.target.y);return`${n}% ${r}%`}},gO={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 c=je(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class vO extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Fj(yO),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()})),nu.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()||Se.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sm.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 GS(e){const[t,n]=Ob(),r=v.useContext(dm);return y.jsx(vO,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(Wb),isPresent:t,safeToRemove:n})}const yO={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:gO};function xO(e,t,n){const r=ht(e)?e:Aa(e);return r.start(Hm("",r,t,n)),r.animation}function wO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const bO=(e,t)=>e.depth-t.depth;class SO{constructor(){this.children=[],this.isDirty=!1}add(t){hm(this.children,t),this.isDirty=!0}remove(t){mm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(bO),this.isDirty=!1,this.children.forEach(t)}}function kO(e,t){const n=Hn.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(ni(r),e(s-t))};return Se.read(r,!0),()=>ni(r)}const QS=["TopLeft","TopRight","BottomLeft","BottomRight"],CO=QS.length,Yy=e=>typeof e=="string"?parseFloat(e):e,Ky=e=>typeof e=="number"||Z.test(e);function TO(e,t,n,r,i,s){i?(e.opacity=je(0,n.opacity??1,EO(r)),e.opacityExit=je(t.opacity??1,0,_O(r))):s&&(e.opacity=je(t.opacity??1,n.opacity??1,r));for(let o=0;o<CO;o++){const a=`border${QS[o]}Radius`;let l=Xy(t,a),c=Xy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ky(l)===Ky(c)?(e[a]=Math.max(je(Yy(l),Yy(c),r),0),(Wn.test(c)||Wn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=je(t.rotate||0,n.rotate||0,r))}function Xy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const EO=YS(0,.5,fS),_O=YS(.5,.95,ln);function YS(e,t,n){return r=>r<e?0:r>t?1:n(ja(e,t,r))}function Zy(e,t){e.min=t.min,e.max=t.max}function Kt(e,t){Zy(e.x,t.x),Zy(e.y,t.y)}function Jy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function e0(e,t,n,r,i){return e-=t,e=qu(e,1/n,r),i!==void 0&&(e=qu(e,1/i,r)),e}function PO(e,t=0,n=1,r=.5,i,s=e,o=e){if(Wn.test(t)&&(t=parseFloat(t),t=je(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=je(s.min,s.max,r);e===s&&(a-=t),e.min=e0(e.min,t,n,a,i),e.max=e0(e.max,t,n,a,i)}function t0(e,t,[n,r,i],s,o){PO(e,t[n],t[r],t[i],t.scale,s,o)}const jO=["x","scaleX","originX"],RO=["y","scaleY","originY"];function n0(e,t,n,r){t0(e.x,t,jO,n?n.x:void 0,r?r.x:void 0),t0(e.y,t,RO,n?n.y:void 0,r?r.y:void 0)}function r0(e){return e.translate===0&&e.scale===1}function KS(e){return r0(e.x)&&r0(e.y)}function i0(e,t){return e.min===t.min&&e.max===t.max}function AO(e,t){return i0(e.x,t.x)&&i0(e.y,t.y)}function s0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function XS(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function o0(e){return xt(e.x)/xt(e.y)}function a0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class OO{constructor(){this.members=[]}add(t){hm(this.members,t),t.scheduleRender()}remove(t){if(mm(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 DO(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:c,rotate:d,rotateX:u,rotateY:f,skewX:p,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}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 Ld=["","X","Y","Z"],MO={visibility:"hidden"},l0=1e3;let FO=0;function Id(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ZS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=sS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Se,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ZS(r)}function JS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=FO++,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(IO),this.nodes.forEach(UO),this.nodes.forEach(HO),this.nodes.forEach($O)},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 SO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new vm),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=wO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=kO(f,250),nu.hasAnimatedSinceResize&&(nu.hasAnimatedSinceResize=!1,this.nodes.forEach(c0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||YO,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=d.getProps(),w=!this.targetLayout||!XS(this.targetLayout,h),b=!f&&p;if(this.options.layoutRoot||this.resumeFrom||b||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,b);const k={...wm(m,"layout"),onPlay:x,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else f||c0(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(WO),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&&ZS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(u0);return}this.isUpdating||this.nodes.forEach(zO),this.isUpdating=!1,this.nodes.forEach(VO),this.nodes.forEach(NO),this.nodes.forEach(LO),this.clearAllSnapshots();const a=Hn.now();it.delta=pr(0,1e3/60,a-it.timestamp),it.timestamp=a,it.isProcessing=!0,Pd.update.process(it),Pd.preRender.process(it),Pd.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BO),this.sharedNodes.forEach(qO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(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=Ie(),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&&!KS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&(a||xi(this.latestValues)||d)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),KO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ie();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(XO))){const{scroll:d}=this.root;d&&(Ds(a.x,d.offset.x),Ds(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=Ie();if(Kt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:f}=d;d!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&Kt(a,o),Ds(a.x,u.offset.x),Ds(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Ie();Kt(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ms(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),xi(d.latestValues)&&Ms(l,d.latestValues)}return xi(this.latestValues)&&Ms(l,this.latestValues),l}removeTransform(o){const a=Ie();Kt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!xi(c.latestValues))continue;Ap(c.latestValues)&&c.updateSnapshot();const d=Ie(),u=c.measurePageBox();Kt(d,u),n0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return xi(this.latestValues)&&n0(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!==it.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:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=it.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),oa(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Kt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ie(),this.targetWithTransforms=Ie()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Kt(this.target,this.layout.layoutBox),VS(this.target,this.targetDelta)):Kt(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=Ie(),this.relativeTargetOrigin=Ie(),oa(this.relativeTargetOrigin,this.target,p.target),Kt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ap(this.parent.latestValues)||zS(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===it.timestamp&&(l=!1),l)return;const{layout:c,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||!(c||d))return;Kt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;eO(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=Ie());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jy(this.prevProjectionDelta.x,this.projectionDelta.x),Jy(this.prevProjectionDelta.y,this.projectionDelta.y)),sa(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!a0(this.projectionDelta.x,this.prevProjectionDelta.x)||!a0(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=Os(),this.projectionDelta=Os(),this.projectionDeltaWithTransform=Os()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=Os();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ie(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,x=this.getStack(),g=!x||x.members.length<=1,w=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(QO));this.animationProgress=0;let b;this.mixTargetDelta=k=>{const T=k/1e3;d0(u.x,o.x,T),d0(u.y,o.y,T),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GO(this.relativeTarget,this.relativeTargetOrigin,f,T),b&&AO(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ie()),Kt(b,this.relativeTarget)),m&&(this.animationValues=d,TO(d,c,this.latestValues,T,w,g)),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=Se.update(()=>{nu.hasAnimatedSinceResize=!0,this.currentAnimation=xO(0,l0,{...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(l0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&ek(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ie();const u=xt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const f=xt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Kt(a,l),Ms(a,d),sa(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new OO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&Id("z",o,c,this.animationValues);for(let d=0;d<Ld.length;d++)Id(`rotate${Ld[d]}`,o,c,this.animationValues),Id(`skew${Ld[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return MO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=tu(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=tu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!xi(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=DO(this.projectionDeltaWithTransform,this.treeScale,d),l&&(a.transform=l(d,a.transform));const{x:u,y:f}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in Da){if(d[p]===void 0)continue;const{correct:h,applyTo:m,isCSSVariable:x}=Da[p],g=a.transform==="none"?d[p]:h(d[p],c);if(m){const w=m.length;for(let b=0;b<w;b++)a[m[b]]=g}else x?this.options.visualElement.renderState.vars[p]=g:a[p]=g}return this.options.layoutId&&(a.pointerEvents=c===this?tu(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(u0),this.root.sharedNodes.clear()}}}function NO(e){e.updateLayout()}function LO(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"?Zt(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],p=xt(f);f.min=r[u].min,f.max=f.min+p}):ek(s,t.layoutBox,r)&&Zt(u=>{const f=o?t.measuredBox[u]:t.layoutBox[u],p=xt(r[u]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const a=Os();sa(a,r,t.layoutBox);const l=Os();o?sa(l,e.applyTransform(i,!0),t.measuredBox):sa(l,r,t.layoutBox);const c=!KS(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:p}=u;if(f&&p){const h=Ie();oa(h,t.layoutBox,f.layoutBox);const m=Ie();oa(m,r,p.layoutBox),XS(h,m)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function IO(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 $O(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function BO(e){e.clearSnapshot()}function u0(e){e.clearMeasurements()}function zO(e){e.isLayoutDirty=!1}function VO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function c0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UO(e){e.resolveTargetDelta()}function HO(e){e.calcProjection()}function WO(e){e.resetSkewAndRotation()}function qO(e){e.removeLeadSnapshot()}function d0(e,t,n){e.translate=je(t.translate,0,n),e.scale=je(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function f0(e,t,n,r){e.min=je(t.min,n.min,r),e.max=je(t.max,n.max,r)}function GO(e,t,n,r){f0(e.x,t.x,n.x,r),f0(e.y,t.y,n.y,r)}function QO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const YO={duration:.45,ease:[.4,0,.1,1]},p0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),h0=p0("applewebkit/")&&!p0("chrome/")?Math.round:ln;function m0(e){e.min=h0(e.min),e.max=h0(e.max)}function KO(e){m0(e.x),m0(e.y)}function ek(e,t,n){return e==="position"||e==="preserve-aspect"&&!ZA(o0(t),o0(n),.2)}function XO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ZO=JS({attachResizeListener:(e,t)=>La(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$d={current:void 0},tk=JS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$d.current){const e=new ZO({});e.mount(window),e.setOptions({layoutScroll:!0}),$d.current=e}return $d.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),JO={pan:{Feature:mO},drag:{Feature:hO,ProjectionNode:tk,MeasureLayout:GS}};function g0(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&&Se.postRender(()=>s(t,nl(t)))}class e3 extends li{mount(){const{current:t}=this.node;t&&(this.unmount=cj(t,(n,r)=>(g0(this.node,r,"Start"),i=>g0(this.node,i,"End"))))}unmount(){}}class t3 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=tl(La(this.node.current,"focus",()=>this.onFocus()),La(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v0(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&&Se.postRender(()=>s(t,nl(t)))}class n3 extends li{mount(){const{current:t}=this.node;t&&(this.unmount=hj(t,(n,r)=>(v0(this.node,r,"Start"),(i,{success:s})=>v0(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Mp=new WeakMap,Bd=new WeakMap,r3=e=>{const t=Mp.get(e.target);t&&t(e)},i3=e=>{e.forEach(r3)};function s3({root:e,...t}){const n=e||document;Bd.has(n)||Bd.set(n,{});const r=Bd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(i3,{root:e,...t})),r[i]}function o3(e,t,n){const r=s3(t);return Mp.set(e,n),r.observe(e),()=>{Mp.delete(e),r.unobserve(e)}}const a3={some:0,all:1};class l3 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:a3[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:u}=this.node.getProps(),f=c?d:u;f&&f(l)};return o3(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(u3(t,n))&&this.startObserver()}unmount(){}}function u3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const c3={inView:{Feature:l3},tap:{Feature:n3},focus:{Feature:t3},hover:{Feature:e3}},d3={layout:{ProjectionNode:tk,MeasureLayout:GS}},Fp={current:null},nk={current:!1};function f3(){if(nk.current=!0,!!fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fp.current=e.matches;e.addListener(t),t()}else Fp.current=!1}const p3=[..._S,ft,ri],h3=e=>p3.find(ES(e)),m3=new WeakMap;function g3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ht(i))e.addValue(r,i);else if(ht(s))e.addValue(r,Aa(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,Aa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const y0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class v3{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=zm,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=Hn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Se.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,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=Cc(n),this.isVariantNode=Ub(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const h=f[p];l[p]!==void 0&&ht(h)&&h.set(l[p],!1)}}mount(t){this.current=t,m3.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)),nk.current||f3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){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=rs.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Se.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 fo){const n=fo[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):Ie()}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<y0.length;r++){const i=y0[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=g3(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=Aa(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"&&(CS(r)||hS(r))?r=parseFloat(r):!h3(r)&&ri.test(n)&&(r=bS(t,n)),this.setBaseTarget(t,ht(r)?r.get():r)),ht(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=Fm(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&&!ht(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 vm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class rk extends v3{constructor(){super(...arguments),this.KeyframeResolver=PS}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;ht(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function y3(e){return window.getComputedStyle(e)}class x3 extends rk{constructor(){super(...arguments),this.type="html",this.renderInstance=eS}readValueFromInstance(t,n){if(rs.has(n))return OR(t,n);{const r=y3(t),i=(_m(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return US(t,n)}build(t,n,r){Rm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Nm(t,n,r)}}class w3 extends rk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ie,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Jb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rs.has(n)){const r=wS(n);return r&&r.default||0}return n=tS.has(n)?n:Em(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return rS(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Se.postRender(this.updateDimensions)}build(t,n,r){Dm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){nS(t,n,r,i)}mount(t){this.isSVGTag=Mm(t.tagName),super.mount(t)}}const b3=(e,t)=>Om(e)?new w3(t):new x3(t,{allowProjection:e!==v.Fragment}),S3=sR({...HA,...c3,...JO,...d3},b3),be=bj(S3);class k3{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 C3=()=>new k3;function T3(){return wc(C3)}var Tr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(Tr||{});const ik=v.createContext({}),E3={[Y.TooltipDefault]:"Bizimle sohbet edin!",[Y.TooltipActive]:"Yeni mesajlar var!",[Y.CloseButtonAria]:"Kapat",[Y.MessagePlaceholder]:"Mesajınızı yazın",[Y.FileUploadDisabled]:"Dosya gönderim izniniz olmadığı için yükleyemezsiniz",[Y.NewMessagesNotification]:"Yeni mesajlar var!",[Y.ChatCloseConfirm]:"Sohbeti kapatmak istediğinizden emin misiniz?",[Y.ChatCloseWarning]:"Bu işlem geri alınamaz.",[Y.ChatSettings]:"Sohbet Ayarları",[Y.ChatEndConversation]:"Sohbeti Sonlandır",[Y.CancelAction]:"Vazgeç",[Y.CloseAction]:"Kapat",[Y.QuickActions]:"Hızlı işlemler",[Y.GreetingStartChat]:"Sohbete başla",[Y.RateLimitMessage]:"Çok fazla mesaj gönderdiniz. Lütfen {seconds} saniye bekleyin.",[Y.RatingHeaderEvaluate]:"Görüşmenizi Değerlendirin",[Y.RatingHeaderThanks]:"Teşekkürler!",[Y.RatingDescription]:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli.",[Y.RatingRateConversation]:"Görüşmeyi puanlayın",[Y.RatingComment]:"Yorumunuz (İsteğe bağlı)",[Y.RatingCommentPlaceholder]:"Görüşme hakkında düşüncelerinizi paylaşın...",[Y.RatingSubmit]:"Değerlendirmeyi Gönder",[Y.RatingNewConversation]:"Yeni Görüşme Başlat",[Y.RatingThankYouTitle]:"Değerlendirmeniz için teşekkürler!",[Y.RatingThankYouDescription]:"Geri bildiriminiz bizim için çok değerli.",[Y.RatingCountdown]:"Ekran {seconds} saniye içinde kapanacaktır.",[Y.RatingMinimumError]:"Lütfen en az 1 yıldız seçiniz.",[Y.RatingYourScore]:"Puanınız: {score}",[Y.PoweredBy]:"Powered by"},_3={[C.Background]:"#ffffff",[C.Border]:"#e2e8f0",[C.TooltipText]:"#1e40af",[C.TooltipBackground]:"#dbeafe",[C.TooltipBorder]:"#3b82f6",[C.HeaderBackground]:"#2563eb",[C.HeaderBorder]:"#e2e8f0",[C.HeaderText]:"#ffffff",[C.FooterBackground]:"#f8fafc",[C.FooterBorder]:"#e2e8f0",[C.FooterText]:"#475569",[C.MessageAdminBackground]:"#f1f5f9",[C.MessageAdminText]:"#334155",[C.MessageVisitorBackground]:"#3b82f6",[C.MessageVisitorText]:"#ffffff",[C.GreeterBackground]:"#ffffff",[C.GreeterText]:"#334155",[C.GreeterBorder]:"#e2e8f0",[C.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[C.GreeterTopText]:"#ffffff",[C.GreeterButtonBackground]:"#4f46e5",[C.GreeterButtonText]:"#ffffff",[C.ButtonBackground]:"#4f46e5",[C.ButtonText]:"#ffffff",[C.InputBackground]:"#ffffff",[C.InputText]:"#1e293b",[C.InputBorder]:"#e2e8f0",[C.CloseButtonBackground]:"#f1f5f9",[C.CloseButtonText]:"#475569",[C.CloseButtonHover]:"#e2e8f0",[C.IconColor]:"#64748b",[C.IconBackground]:"transparent",[C.ErrorBackground]:"#fef2f2",[C.ErrorText]:"#dc2626",[C.ErrorBorder]:"#fca5a5",[C.SuccessBackground]:"#f0fdf4",[C.SuccessText]:"#16a34a",[C.SuccessBorder]:"#86efac",[C.WarningBackground]:"#fffbeb",[C.WarningText]:"#d97706",[C.WarningBorder]:"#fcd34d",[C.LinkColor]:"#2563eb",[C.LinkHoverColor]:"#1d4ed8",[C.DividerColor]:"#e2e8f0",[C.ShadowColor]:"rgba(0, 0, 0, 0.1)",[C.StarActiveColor]:"#3b82f6",[C.StarInactiveColor]:"#e2e8f0",[C.ModalOverlayColor]:"rgba(0, 0, 0, 0.4)",[C.ChatCloseConfirmText]:"#dc2626",[C.RatingHeaderBackground]:"#4F46E5",[C.RatingHeaderText]:"#ffffff",[C.RatingSuccessBackground]:"#ffffff",[C.RatingSuccessText]:"#334155",[C.RatingRateConversationText]:"#1e293b"},P3={[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)"},j3=e=>{const t={...E3};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.texts)return t;for(const n in e.appearance.design.texts){const r=n;e.appearance.design.texts[r]&&(t[r]=e.appearance.design.texts[r])}return t},R3=e=>{const t={..._3};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 A3({children:e,widget:t}){const n=R3(t),r=j3(t),i=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:Tr.Md,s=l=>n[l],o=l=>r[l],a=()=>P3[i];return y.jsx(ik.Provider,{value:{colors:n,texts:r,getColor:s,getText:o,getRadius:a},children:e})}const Oe=()=>v.useContext(ik),rl=()=>Oe().getText;function on({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,style:l,textKey:c=C.ButtonText,bgKey:d=C.ButtonBackground,animations:u={},withoutTheming:f,...p}){const h=Oe();return y.jsx(be.button,{type:t,className:ge("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,ey[n]&&ey[n][r],qP[i][o?"rounded":"default"]),disabled:s,style:{...!f&&{color:h.getColor(c),backgroundColor:h.getColor(d),...o?{}:{borderRadius:h.getRadius()}},...l},...u,...p,children:e})}function fe(){}fe.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"})})};fe.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"})});fe.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"})});fe.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"})});fe.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"})})};fe.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"})]})};fe.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"})});fe.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"})});fe.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"})});fe.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"})});fe.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"})})};fe.ExternalLink=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:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});fe.Phone=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:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})});fe.Mail=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:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});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 ru=Object.create(null);Object.keys(Qn).forEach(e=>{ru[Qn[e]]=e});const Np={type:"error",data:"parser error"},sk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ok=typeof ArrayBuffer=="function",ak=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wm=({type:e,data:t},n,r)=>sk&&t instanceof Blob?n?r(t):x0(t,r):ok&&(t instanceof ArrayBuffer||ak(t))?n?r(t):x0(new Blob([t]),r):r(Qn[e]+(t||"")),x0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function w0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let zd;function O3(e,t){if(sk&&e.data instanceof Blob)return e.data.arrayBuffer().then(w0).then(t);if(ok&&(e.data instanceof ArrayBuffer||ak(e.data)))return t(w0(e.data));Wm(e,!1,n=>{zd||(zd=new TextEncoder),t(zd.encode(n))})}const b0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Go=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<b0.length;e++)Go[b0.charCodeAt(e)]=e;const D3=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 c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)s=Go[e.charCodeAt(r)],o=Go[e.charCodeAt(r+1)],a=Go[e.charCodeAt(r+2)],l=Go[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 c},M3=typeof ArrayBuffer=="function",qm=(e,t)=>{if(typeof e!="string")return{type:"message",data:lk(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:F3(e.substring(1),t)}:ru[n]?e.length>1?{type:ru[n],data:e.substring(1)}:{type:ru[n]}:Np},F3=(e,t)=>{if(M3){const n=D3(e);return lk(n,t)}else return{base64:!0,data:e}},lk=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},uk="",N3=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{Wm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(uk))})})},L3=(e,t)=>{const n=e.split(uk),r=[];for(let i=0;i<n.length;i++){const s=qm(n[i],t);if(r.push(s),s.type==="error")break}return r};function I3(){return new TransformStream({transform(e,t){O3(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 Vd;function Dl(e){return e.reduce((t,n)=>t+n.length,0)}function Ml(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 $3(e,t){Vd||(Vd=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(Dl(n)<1)break;const l=Ml(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(Dl(n)<2)break;const l=Ml(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Dl(n)<8)break;const l=Ml(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(Np);break}i=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Dl(n)<i)break;const l=Ml(n,i);a.enqueue(qm(s?l:Vd.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Np);break}}}})}const ck=4;function ze(e){if(e)return B3(e)}function B3(e){for(var t in ze.prototype)e[t]=ze.prototype[t];return e}ze.prototype.on=ze.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ze.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ze.prototype.off=ze.prototype.removeListener=ze.prototype.removeAllListeners=ze.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};ze.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};ze.prototype.emitReserved=ze.prototype.emit;ze.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ze.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ec=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),rn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),z3="arraybuffer";function dk(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const V3=rn.setTimeout,U3=rn.clearTimeout;function _c(e,t){t.useNativeTimers?(e.setTimeoutFn=V3.bind(rn),e.clearTimeoutFn=U3.bind(rn)):(e.setTimeoutFn=rn.setTimeout.bind(rn),e.clearTimeoutFn=rn.clearTimeout.bind(rn))}const H3=1.33;function W3(e){return typeof e=="string"?q3(e):Math.ceil((e.byteLength||e.size)*H3)}function q3(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 fk(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function G3(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Q3(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 Y3 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Gm extends ze{constructor(t){super(),this.writable=!1,_c(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 Y3(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=qm(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=G3(t);return n.length?"?"+n:""}}class K3 extends Gm{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)};L3(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,N3(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]=fk()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pk=!1;try{pk=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const X3=pk;function Z3(){}class J3 extends K3{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 qn extends ze{constructor(t,n,r){super(),this.createRequest=t,_c(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=dk(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=qn.requestsCount++,qn.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=Z3,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete qn.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()}}qn.requestsCount=0;qn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",S0);else if(typeof addEventListener=="function"){const e="onpagehide"in rn?"pagehide":"unload";addEventListener(e,S0,!1)}}function S0(){for(let e in qn.requests)qn.requests.hasOwnProperty(e)&&qn.requests[e].abort()}const eD=function(){const e=hk({xdomain:!1});return e&&e.responseType!==null}();class tD extends J3{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=eD&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new qn(hk,this.uri(),t)}}function hk(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||X3))return new XMLHttpRequest}catch{}if(!t)try{return new rn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const mk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nD extends Gm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=mk?{}:dk(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;Wm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Ec(()=>{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]=fk()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ud=rn.WebSocket||rn.MozWebSocket;class rD extends nD{createSocket(t,n,r){return mk?new Ud(t,n,r):n?new Ud(t,n):new Ud(t)}doWrite(t,n){this.ws.send(n)}}class iD extends Gm{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=$3(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=I3();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&&Ec(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const sD={websocket:rD,webtransport:iD,polling:tD},oD=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,aD=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Lp(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=oD.exec(e||""),s={},o=14;for(;o--;)s[aD[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=lD(s,s.path),s.queryKey=uD(s,s.query),s}function lD(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 uD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Ip=typeof addEventListener=="function"&&typeof removeEventListener=="function",iu=[];Ip&&addEventListener("offline",()=>{iu.forEach(e=>e())},!1);class Xr extends ze{constructor(t,n){if(super(),this.binaryType=z3,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=Lp(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=Lp(n.host).host);_c(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=Q3(this.opts.query)),Ip&&(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"})},iu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=ck,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+=W3(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,Ec(()=>{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(),Ip&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=iu.indexOf(this._offlineEventListener);r!==-1&&iu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=ck;class cD 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",u=>{if(!r)if(u.type==="pong"&&u.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=u=>{const f=new Error("probe error: "+u);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.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",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),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 dD=class extends cD{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=>sD[i]).filter(i=>!!i)),super(t,r)}};function fD(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=Lp(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 pD=typeof ArrayBuffer=="function",hD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,gk=Object.prototype.toString,mD=typeof Blob=="function"||typeof Blob<"u"&&gk.call(Blob)==="[object BlobConstructor]",gD=typeof File=="function"||typeof File<"u"&&gk.call(File)==="[object FileConstructor]";function Qm(e){return pD&&(e instanceof ArrayBuffer||hD(e))||mD&&e instanceof Blob||gD&&e instanceof File}function su(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(su(e[n]))return!0;return!1}if(Qm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return su(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&su(e[n]))return!0;return!1}function vD(e){const t=[],n=e.data,r=e;return r.data=$p(n,t),r.attachments=t.length,{packet:r,buffers:t}}function $p(e,t){if(!e)return e;if(Qm(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]=$p(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]=$p(e[r],t));return n}return e}function yD(e,t){return e.data=Bp(e.data,t),delete e.attachments,e}function Bp(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]=Bp(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Bp(e[n],t));return e}const xD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],wD=5;var ue;(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"})(ue||(ue={}));class bD{constructor(t){this.replacer=t}encode(t){return(t.type===ue.EVENT||t.type===ue.ACK)&&su(t)?this.encodeAsBinary({type:t.type===ue.EVENT?ue.BINARY_EVENT:ue.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ue.BINARY_EVENT||t.type===ue.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=vD(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function k0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ym extends ze{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===ue.BINARY_EVENT;r||n.type===ue.BINARY_ACK?(n.type=r?ue.EVENT:ue.ACK,this.reconstructor=new SD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Qm(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(ue[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ue.BINARY_EVENT||r.type===ue.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(Ym.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 ue.CONNECT:return k0(n);case ue.DISCONNECT:return n===void 0;case ue.CONNECT_ERROR:return typeof n=="string"||k0(n);case ue.EVENT:case ue.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&xD.indexOf(n[0])===-1);case ue.ACK:case ue.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class SD{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=yD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const kD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ym,Encoder:bD,get PacketType(){return ue},protocol:wD},Symbol.toStringTag,{value:"Module"}));function wn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const CD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vk extends ze{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(CD.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:ue.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,u=n.pop();this._registerAckCallback(d,u),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:ue.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 ue.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 ue.EVENT:case ue.BINARY_EVENT:this.onevent(t);break;case ue.ACK:case ue.BINARY_ACK:this.onack(t);break;case ue.DISCONNECT:this.ondisconnect();break;case ue.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:ue.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:ue.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 To(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}To.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};To.prototype.reset=function(){this.attempts=0};To.prototype.setMin=function(e){this.ms=e};To.prototype.setMax=function(e){this.max=e};To.prototype.setJitter=function(e){this.jitter=e};class zp extends ze{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,_c(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 To({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||kD;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 dD(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){Ec(()=>{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 vk(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 Io={};function ou(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=fD(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Io[i]&&s in Io[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new zp(r,t):(Io[i]||(Io[i]=new zp(r,t)),l=Io[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(ou,{Manager:zp,Socket:vk,io:ou,connect:ou});const au=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null};var Gn=(e=>(e.CustomerToken="lc:customer:token",e.CustomerRefreshToken="lc:customer:refresh_token",e.DeviceId="lc:device:id",e))(Gn||{});const Hd=(e,t,n)=>{let r=e;["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(r=`${n}:${e}`),localStorage.setItem(r,t)},lu=(e,t)=>{let n=e;return["lc:customer:token","lc:customer:refresh_token"].includes(e)&&(n=`${t}:${e}`),localStorage.getItem(n)},Vp=e=>{localStorage.removeItem(`${e}:lc:customer:token`),localStorage.removeItem(`${e}:lc:customer:refresh_token`)},yk=v.createContext(null),ui=()=>{const e=v.useContext(yk);if(!e)throw new Error("useWebsocket must be used within a WebSocketProvider");return e},TD=({children:e})=>{const{widget:t,isHaveChat:n}=kt(),r=v.useRef(null),i=v.useRef(!1),[s,o]=v.useState(!1),a=v.useCallback(()=>{r.current&&(console.log("WS: Cleaning up existing socket."),r.current.removeAllListeners(),r.current.disconnect(),r.current=null),o(!1),i.current=!1},[]),l=v.useCallback(x=>{if(i.current||r.current&&r.current.connected){console.log("WS: Connect called but already connecting or connected.");return}if(!n){console.log("WS: Connect skipped - no active chat");return}const g=lu(Gn.CustomerToken,x)||au("customer_token"),w=lu(Gn.CustomerRefreshToken,x)||au("customer_refresh_token");if(!g||!w){console.log("WS: Connect skipped - missing required tokens");return}r.current&&a(),console.log("WS: Attempting to connect..."),i.current=!0;const b=ou(O_,{transports:["websocket"],forceNew:!0,timeout:1e4,auth:{customer_token:g,device_id:lu(Gn.DeviceId,x)||au("device_id"),customer_refresh_token:w}});b.removeAllListeners(),b.on("error",k=>{console.error("WS: Websocket error",k),i.current=!1}),b.on("connect_error",k=>{console.error("WS: Connect error",k),i.current=!1,o(!1),r.current=null}),b.on("disconnect",k=>{console.log("WS: Disconnected",k),o(!1),i.current=!1,r.current===b&&(r.current=null)}),b.on("connect",()=>{console.log("WS: Connected successfully"),r.current=b,o(!0),i.current=!1})},[a,n]);v.useEffect(()=>{const x=t==null?void 0:t.link_id;return x&&n?(console.log("WS: Auto-connecting due to linkId and isHaveChat"),l(x)):(console.log("WS: Auto-disconnect due to missing linkId or isHaveChat"),a()),()=>{console.log("WS: Cleanup on effect change"),a()}},[t==null?void 0:t.link_id,n]);const c=v.useCallback(()=>{const x=t==null?void 0:t.link_id;x?l(x):console.warn("WS: Manual connect failed, no link_id available.")},[t==null?void 0:t.link_id,l]),d=v.useCallback(()=>{console.log("WS: Reconnecting..."),a();const x=t==null?void 0:t.link_id;x&&l(x)},[t==null?void 0:t.link_id,l,a]),u=v.useCallback(()=>{console.log("WS: Manual disconnect"),a()},[a]),f=v.useCallback((x,g)=>{var w;(w=r.current)==null||w.on(x,g)},[]),p=v.useCallback((x,g)=>{var w;(w=r.current)==null||w.off(x,g)},[]),h=v.useCallback((x,g,w)=>{r.current&&r.current.connected?r.current.emit(x,g,w):console.warn(`WS: Cannot emit event '${x}', socket not connected.`)},[]),m=v.useMemo(()=>({connected:s,connect:c,reconnect:d,disconnect:u,on:f,off:p,emit:h}),[s,c,d,u,f,p,h]);return y.jsx(yk.Provider,{value:m,children:e})};var En=(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.MessageRead="message:read",e))(En||{}),st=(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))(st||{});const Pc=e=>{const t=bb(),n=(r,i)=>{var o;const s=((o=eB.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},ED=e=>({accessToken:localStorage.getItem(`${e}:${Gn.CustomerToken}`)||"",refreshToken:localStorage.getItem(`${e}:${Gn.CustomerRefreshToken}`)||""}),il=()=>{const{widget:e}=kt();return e?ED(e.link_id):null},ho=e=>{if(!e)return{};const{accessToken:t,refreshToken:n}=e,r={};return t&&(r["X-Customer-Token"]=t),n&&(r["X-Customer-Refresh-Token"]=n),{...r}};function _D(e){return e&&typeof e=="object"&&"customer_token"in e&&"customer_refresh_token"in e}const PD=()=>am({mutationFn:e=>bo(`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})})}),jD=(e,t)=>bo(`clients/${e}/chats`,{headers:t}),Up=(e,t)=>bo(`clients/${e}/chats`,{method:"DELETE",headers:t}),RD=(e,t,n)=>bo("review",{method:"POST",body:JSON.stringify({rating:e,comment:t||void 0}),headers:{...n,"X-Device-Id":lu(Gn.DeviceId,"")||""}}),AD=()=>{const e=il();return am({mutationFn:t=>RD(t.rating,t.comment,ho(e))})},OD=e=>{const t=il();return am({mutationFn:n=>bo(`clients/${e}/chats/files`,{method:"POST",headers:ho(t),body:N_({files:n},{arrayWithBracketAndIndex:!1,arrayWithBrackets:!1})})})};function DD(e){return e&&typeof e=="object"&&"file_urls"in e}const Km=(e,t,n)=>{const r=typeof window<"u"?window:void 0;v.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},is=()=>{let e=!1,t=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true",t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent)),e||t},MD=()=>{let e=!1;return typeof window<"u"&&(e=new URLSearchParams(window.location.search).get("fullscreen")==="true"),e};function Hp({text:e}){var c,d,u,f;const{widget:t,isHaveChat:n,isTooltipVisible:r,setIsTooltipVisible:i,onTooltipClose:s}=kt(),o=Oe(),a=rl(),l=()=>{i(!1),s&&s()};return r?y.jsxs(be.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:ge("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:o.getRadius(),backgroundColor:o.getColor(C.TooltipBackground),color:o.getColor(C.TooltipText)},children:[y.jsx("button",{onClick:l,className:"absolute top-2 right-2 p-1 rounded-full hover:bg-black/10 transition-colors","aria-label":a(Y.CloseButtonAria),children:y.jsx(fe.X,{className:"size-3"})}),y.jsx(be.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium pr-5",style:{color:o.getColor(C.TooltipText)},children:e||(n?(d=(c=t==null?void 0:t.appearance)==null?void 0:c.design)==null?void 0:d.tooltip_message_active:(f=(u=t==null?void 0:t.appearance)==null?void 0:u.design)==null?void 0:f.tooltip_message)||a(n?Y.TooltipActive:Y.TooltipDefault)}),y.jsx("div",{className:ge("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]},"widget-tooltip"):null}const FD="/notify.mp3",ND=async e=>{await new Audio(e||FD).play()};function C0({fallback:e,fallbackOpen:t}){const[n]=v.useState(window.document.title),r=ui(),{isHaveChat:i,open:s,soundPath:o}=kt(),[a,l]=v.useState(!0),[c,d]=v.useState(0),[u,f]=v.useState(null),p=rl(),h=()=>{ND(o)},m=(x,g)=>{if(u&&clearInterval(u),x||!i||g===0||Number.isNaN(g)){window.document.title=n,f(null);return}const w=setInterval(()=>{if(x||!i||g===0||Number.isNaN(g)){window.document.title=n,clearInterval(w),f(null);return}const b=`${g} ${p(Y.NewMessagesNotification)} - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return f(w),()=>{clearInterval(w),f(null)}};return v.useEffect(()=>m(s&&a,c),[c,s,a]),v.useEffect(()=>{const x=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",x,!1),()=>{document.removeEventListener("visibilitychange",x)}},[]),v.useEffect(()=>{if(i&&s&&a&&d(0),!r||!i||s&&a)return;const x=()=>{!i||s&&a||(d(g=>g+1),h())};return r.on(st.MessageAgentCreate,x),r.on(st.ChatUserAssignee,h),()=>{r.off(st.MessageAgentCreate,x),r.off(st.ChatUserAssignee,h)}},[r,i,s,a]),s?null:!i||c===0?t?e:null:y.jsx(Hp,{text:p(Y.NewMessagesNotification)})}function LD({children:e,border:t}){var B,V,re,J;const n=ui(),{open:r,setOpen:i,setIsHaveChat:s,isHaveChat:o,widget:a,onOpen:l,onClose:c}=kt(),[d]=v.useState(!0),u=Pc(),f=il(),p=Za(),h=Oe(),m=is(),x=MD(),[g,w]=v.useState({x:0,y:0}),b=T3(),k=v.useRef(null),T=v.useRef(null),[E,_]=v.useState(!1);v.useEffect(()=>((()=>{_("ontouchstart"in window||navigator.maxTouchPoints>0)})(),window.addEventListener("touchstart",()=>{_(!0)},{once:!0}),()=>{window.removeEventListener("touchstart",()=>{_(!0)})}),[]),v.useEffect(()=>{o&&p.pathname==="/"&&f&&f.accessToken&&u.push("chat")},[o]);const j=te=>{if(!k.current||!T.current)return te;const O=k.current.getBoundingClientRect(),$={width:window.innerWidth,height:window.innerHeight},H={top:20,right:20,bottom:40,left:20};let q=te.x,Q=te.y;return O.right+q-g.x>$.width-H.right&&(q=$.width-H.right-O.width-(O.left-g.x)),O.left+q-g.x<H.left&&(q=H.left-(O.left-g.x)),O.bottom+Q-g.y>$.height-H.bottom&&(Q=$.height-H.bottom-O.height-(O.top-g.y)),O.top+Q-g.y<H.top&&(Q=H.top-(O.top-g.y)),{x:q,y:Q}},M=()=>{i(!0),n&&(n.emit(En.WidgetOpen,{}),l&&l())},P=()=>{i(!1),n&&(n.emit(En.WidgetClose,{}),c&&c())},I=()=>{i(!1),s(!1),Up(a.client_id,ho(f)),u.push("registration")};v.useEffect(()=>{if(m&&(o||x)&&M(),!(!n||!a))return n.on(st.Banned,I),()=>{n.off(st.Banned,I)}},[]);function F(te){E&&b.start(te)}return y.jsx("section",{className:"relative w-full h-full",ref:T,children:y.jsxs(Kr,{children:[r&&y.jsx(be.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:m?"100%":((V=(B=a==null?void 0:a.appearance)==null?void 0:B.design)==null?void 0:V.width)||"21rem",height:m?"var(--app-height, 100dvh)":((J=(re=a==null?void 0:a.appearance)==null?void 0:re.design)==null?void 0:J.height)||"30rem",left:m?"0":"",right:m?"0px !important":"",maxHeight:m?"var(--app-height, 100dvh)":"",borderColor:m?"":h.getColor(C.Border),boxShadow:m?"":`0 10px 25px -5px ${h.getColor(C.ShadowColor)}, 0 8px 10px -6px ${h.getColor(C.ShadowColor)}`},className:ge("fixed z-300 overflow-hidden",{"border border-solid dark:border-zink-500 ":t,"bottom-12 right-12 rounded-t-xl":!m,"!bottom-0 !right-0":m}),children:e},"widget-container"),!E&&y.jsxs("div",{className:"fixed bottom-[40px] right-[20px] z-400",children:[y.jsx(C0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),y.jsxs(Kr,{mode:"wait",children:[!r&&y.jsxs(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:M,children:[y.jsx(be.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:ge("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),y.jsx(fe.Chat,{className:"size-7"})]},"desktop-open-button"),r&&!m&&y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:P,children:y.jsx(fe.X,{className:"size-7"})},"desktop-close-button")]})]}),E&&y.jsx(be.div,{ref:k,className:"fixed z-400 bottom-24 right-5",initial:{bottom:"96px",right:"20px"},animate:{x:g.x,y:g.y},drag:E,dragControls:b,dragMomentum:!1,dragElastic:0,onDragEnd:(te,O)=>{const $={x:g.x+O.offset.x,y:g.y+O.offset.y},H=j($);w(H)},children:y.jsxs(Kr,{children:[y.jsx(C0,{fallback:y.jsx(Hp,{}),fallbackOpen:d}),!r&&y.jsx("div",{className:"cursor-move",onPointerDown:F,children:y.jsxs(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:M,children:[y.jsx(be.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:ge("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:h.getColor(C.ButtonBackground)}}),y.jsx(fe.Chat,{className:"size-7"})]})},"chat-button"),r&&!m&&y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:P,children:y.jsx(fe.X,{className:"size-7"})},"desktop-close-button")]})})]})})}function xk(e){const{widget:t}=kt();return y.jsx(A3,{widget:t,children:y.jsx(LD,{...e})})}function ss(e){this._maxSize=e,this.clear()}ss.prototype.clear=function(){this._size=0,this._values=Object.create(null)};ss.prototype.get=function(e){return this._values[e]};ss.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var ID=/[^.^\]^[]+|(?=\[\]|\.\.)/g,wk=/^\d+$/,$D=/^\d/,BD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,zD=/^\s*(['"]?)(.*?)(\1)\s*$/,Xm=512,T0=new ss(Xm),E0=new ss(Xm),_0=new ss(Xm),zi={Cache:ss,split:Wp,normalizePath:Wd,setter:function(e){var t=Wd(e);return E0.get(e)||E0.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=Wd(e);return _0.get(e)||_0.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+(Zm(n)||wk.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){VD(Array.isArray(e)?e:Wp(e),t,n)}};function Wd(e){return T0.get(e)||T0.set(e,Wp(e).map(function(t){return t.replace(zD,"$2")}))}function Wp(e){return e.match(ID)||[""]}function VD(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(WD(i)&&(i='"'+i+'"'),a=Zm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function Zm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function UD(e){return e.match($D)&&!e.match(wk)}function HD(e){return BD.test(e)}function WD(e){return!Zm(e)&&(UD(e)||HD(e))}const qD=/[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,jc=e=>e.match(qD)||[],Rc=e=>e[0].toUpperCase()+e.slice(1),Jm=(e,t)=>jc(e).join(t).toLowerCase(),bk=e=>jc(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),GD=e=>Rc(bk(e)),QD=e=>Jm(e,"_"),YD=e=>Jm(e,"-"),KD=e=>Rc(Jm(e," ")),XD=e=>jc(e).map(Rc).join(" ");var qd={words:jc,upperFirst:Rc,camelCase:bk,pascalCase:GD,snakeCase:QD,kebabCase:YD,sentenceCase:KD,titleCase:XD},eg={exports:{}};eg.exports=function(e){return Sk(ZD(e),e)};eg.exports.array=Sk;function Sk(e,t){var n=e.length,r=new Array(n),i={},s=n,o=JD(t),a=eM(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[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(c,d,u){if(u.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[d]){i[d]=!0;var p=o.get(c)||new Set;if(p=Array.from(p),d=p.length){u.add(c);do{var h=p[--d];l(h,a.get(h),u)}while(d);u.delete(c)}r[--n]=c}}}function ZD(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 JD(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 eM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var tM=eg.exports;const nM=Xi(tM),rM=Object.prototype.toString,iM=Error.prototype.toString,sM=RegExp.prototype.toString,oM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",aM=/^Symbol\((.*)\)(.*)$/;function lM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function P0(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return lM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return oM.call(e).replace(aM,"Symbol($1)");const r=rM.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+iM.call(e)+"]":r==="RegExp"?sM.call(e):null}function Zr(e,t){let n=P0(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=P0(this[r],t);return s!==null?s:i},2)}function kk(e){return e==null?[]:[].concat(e)}let Ck,Tk,Ek,uM=/\$\{\s*(\w+)\s*\}/g;Ck=Symbol.toStringTag;class j0{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[Ck]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],kk(t).forEach(s=>{if(Rt.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]}}Tk=Symbol.hasInstance;Ek=Symbol.toStringTag;class Rt 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(uM,(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 j0(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[Ek]="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,Rt)}static[Tk](t){return j0[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Mn={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}},Tt={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"},cM={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"},qp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},dM={isValue:"${path} field must be ${value}"},uu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},fM={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"},pM={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 Rt.formatError(Mn.notType,e)}};Object.assign(Object.create(null),{mixed:Mn,string:Tt,number:cM,date:qp,object:uu,array:fM,boolean:dM,tuple:pM});const tg=e=>e&&e.__isYupSchema__;class Gu{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 Gu(t,(a,l)=>{var c;let d=o(...a)?i:s;return(c=d==null?void 0:d(l))!=null?c: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(!tg(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const Fl={context:"$",value:"."};class os{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]===Fl.context,this.isValue=this.key[0]===Fl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Fl.context:this.isValue?Fl.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}}os.prototype.__isYupRef=!0;const ji=e=>e==null;function gs(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:d,params:u,message:f,skipAbsent:p}=e;let{parent:h,context:m,abortEarly:x=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=i;function w(I){return os.isRef(I)?I.getValue(n,h,m):I}function b(I={}){const F=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||g},u,I.params);for(const V of Object.keys(F))F[V]=w(F[V]);const B=new Rt(Rt.formatError(I.message||f,F),n,F.path,I.type||c,F.disableStackTrace);return B.params=F,B}const k=x?a:l;let T={path:r,parent:h,type:c,from:i.from,createError:b,resolve:w,options:i,originalValue:s,schema:o};const E=I=>{Rt.isError(I)?k(I):I?l(null):k(b())},_=I=>{Rt.isError(I)?k(I):a(I)};if(p&&ji(n))return E(!0);let M;try{var P;if(M=d.call(T,n,T),typeof((P=M)==null?void 0:P.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(M).then(E,_)}}catch(I){_(I);return}E(M)}return t.OPTIONS=e,t}function hM(e,t,n,r=n){let i,s,o;return t?(zi.forEach(t,(a,l,c)=>{let d=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",f=c?parseInt(d,10):0;if(e.innerType||u){if(u&&!c)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=u?e.spec.types[f]:e.innerType}if(!c){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 Qu extends Set{describe(){const t=[];for(const n of this.values())t.push(os.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 Qu(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(tg(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 Yn{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 Qu,this._blacklist=new Qu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Mn.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&&ji(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 c=[];for(let d of Object.values(this.internalTests))d&&c.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},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:c}=t,d=p=>{i||(i=!0,n(p,o))},u=p=>{i||(i=!0,r(p,o))},f=s.length,h=[];if(!f)return u([]);let m={value:o,originalValue:a,path:l,options:c,schema:this};for(let p=0;p<s.length;p++){const b=s[p];b(m,d,function(w){w&&(Array.isArray(w)?h.push(...w):h.push(w)),--f<=0&&u(h)})}}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 c=r[a];const d=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,f,h)=>this.resolve(d)._validate(c,d,f,h)}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,c)=>{Rt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new Rt(l,c,void 0,void 0,s)):o(c)}))}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 Rt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Rt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Rt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Rt.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=gs({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=gs({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Mn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Mn.notNull){return this.nullability(!1,t)}required(t=Mn.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=Mn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=gs(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=kk(t).map(s=>new os(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Gu(i,n):Gu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=gs({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=Mn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=gs({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=Mn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=gs({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,c,d)=>d.findIndex(u=>u.name===l.name)===c)}}}Yn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Yn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=pM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Yn.prototype[e]=Yn.prototype.oneOf;for(const e of["not","nope"])Yn.prototype[e]=Yn.prototype.notOneOf;const hM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function mM(e){const t=Gp(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 Gp(e){var t,n;const r=hM.exec(e);return r?{year:Zn(r[1]),month:Zn(r[2],1)-1,day:Zn(r[3],1),hour:Zn(r[4]),minute:Zn(r[5]),second:Zn(r[6]),millisecond:r[7]?Zn(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:Zn(r[10]),minuteOffset:Zn(r[11])}:null}function Zn(e,t=0){return Number(e)||t}let gM=/^[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])?)*$/,vM=/^((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,yM=/^(?:[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,xM="^\\d{4}-\\d{2}-\\d{2}",wM="\\d{2}:\\d{2}:\\d{2}",bM="(([+-]\\d{2}(:?\\d{2})?)|Z)",SM=new RegExp(`${xM}T${wM}(\\.\\d+)?${bM}$`),kM=e=>ji(e)||e===e.trim(),CM={}.toString();function Yu(){return new _k}class _k extends Yn{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===CM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Mn.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=Tt.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=Tt.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=Tt.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||Tt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Tt.email){return this.matches(gM,{name:"email",message:t,excludeEmptyString:!0})}url(t=Tt.url){return this.matches(vM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Tt.uuid){return this.matches(yM,{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(SM,{name:"datetime",message:n||Tt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Tt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=Gp(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Tt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=Gp(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Tt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:kM})}lowercase(t=Tt.lowercase){return this.transform(n=>ji(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ji(n)||n===n.toLowerCase()})}uppercase(t=Tt.uppercase){return this.transform(n=>ji(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ji(n)||n===n.toUpperCase()})}}Yu.prototype=_k.prototype;let TM=new Date(""),EM=e=>Object.prototype.toString.call(e)==="[object Date]";class Ac extends Yn{constructor(){super({type:"date",check(t){return EM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=mM(t),isNaN(t)?Ac.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(os.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=qp.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=qp.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)}})}}Ac.INVALID_DATE=TM;Ac.prototype;function _M(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),os.isRef(a)&&a.isSibling?s(a.path,o):tg(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return tM.array(Array.from(r),n).reverse()}function R0(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 Pk(e){return(t,n)=>R0(e,t)-R0(e,n)}const PM=(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 cu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=cu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=cu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(cu)}):"optional"in e?e.optional():e}const jM=(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 A0=e=>Object.prototype.toString.call(e)==="[object Object]";function O0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const RM=Pk([]);function ng(e){return new jk(e)}class jk extends Yn{constructor(t){super({type:"object",check(n){return A0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=RM,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(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const u of a){let f=s[u],h=u in i;if(f){let m,p=i[u];c.path=(n.path?`${n.path}.`:"")+u,f=f.resolve({value:p,context:n.context,parent:l});let b=f instanceof Yn?f.spec:void 0,g=b==null?void 0:b.strict;if(b!=null&&b.strip){d=d||u in i;continue}m=!n.__validating||!g?f.cast(i[u],c):i[u],m!==void 0&&(l[u]=m)}else h&&!o&&(l[u]=i[u]);(h!==u in l||l[u]!==i[u])&&(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,c)=>{if(!a||!A0(c)){i(l,c);return}o=o||c;let d=[];for(let u of this._nodes){let f=this.fields[u];!f||os.isRef(f)||d.push(f.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}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=_M(t,n),r._sortErrors=Pk(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 cu(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 jM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(PM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||uu.exact,test(n){if(n==null)return!0;const r=O0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=uu.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=O0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=uu.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(qd.camelCase)}snakeCase(){return this.transformKeys(qd.snakeCase)}constantCase(){return this.transformKeys(t=>qd.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}}ng.prototype=jk.prototype;var AM=function(t){return OM(t)&&!DM(t)};function OM(e){return!!e&&typeof e=="object"}function DM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||NM(e)}var MM=typeof Symbol=="function"&&Symbol.for,FM=MM?Symbol.for("react.element"):60103;function NM(e){return e.$$typeof===FM}function LM(e){return Array.isArray(e)?[]:{}}function Ku(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ia(LM(e),e,t):e}function IM(e,t,n){return e.concat(t).map(function(r){return Ku(r,n)})}function $M(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Ku(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Ku(t[i],n):r[i]=Ia(e[i],t[i],n)}),r}function Ia(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||IM,n.isMergeableObject=n.isMergeableObject||AM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):$M(e,t,n):Ku(t,n)}Ia.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ia(r,i,n)},{})};var Qp=Ia,Rk=typeof global=="object"&&global&&global.Object===Object&&global,BM=typeof self=="object"&&self&&self.Object===Object&&self,Kn=Rk||BM||Function("return this")(),ii=Kn.Symbol,Ak=Object.prototype,zM=Ak.hasOwnProperty,VM=Ak.toString,$o=ii?ii.toStringTag:void 0;function UM(e){var t=zM.call(e,$o),n=e[$o];try{e[$o]=void 0;var r=!0}catch{}var i=VM.call(e);return r&&(t?e[$o]=n:delete e[$o]),i}var HM=Object.prototype,WM=HM.toString;function qM(e){return WM.call(e)}var GM="[object Null]",QM="[object Undefined]",D0=ii?ii.toStringTag:void 0;function as(e){return e==null?e===void 0?QM:GM:D0&&D0 in Object(e)?UM(e):qM(e)}function Ok(e,t){return function(n){return e(t(n))}}var rg=Ok(Object.getPrototypeOf,Object);function ls(e){return e!=null&&typeof e=="object"}var YM="[object Object]",KM=Function.prototype,XM=Object.prototype,Dk=KM.toString,ZM=XM.hasOwnProperty,JM=Dk.call(Object);function M0(e){if(!ls(e)||as(e)!=YM)return!1;var t=rg(e);if(t===null)return!0;var n=ZM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Dk.call(n)==JM}function eF(){this.__data__=[],this.size=0}function Mk(e,t){return e===t||e!==e&&t!==t}function Oc(e,t){for(var n=e.length;n--;)if(Mk(e[n][0],t))return n;return-1}var tF=Array.prototype,nF=tF.splice;function rF(e){var t=this.__data__,n=Oc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():nF.call(t,n,1),--this.size,!0}function iF(e){var t=this.__data__,n=Oc(t,e);return n<0?void 0:t[n][1]}function sF(e){return Oc(this.__data__,e)>-1}function oF(e,t){var n=this.__data__,r=Oc(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=eF;mr.prototype.delete=rF;mr.prototype.get=iF;mr.prototype.has=sF;mr.prototype.set=oF;function aF(){this.__data__=new mr,this.size=0}function lF(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function uF(e){return this.__data__.get(e)}function cF(e){return this.__data__.has(e)}function sl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dF="[object AsyncFunction]",fF="[object Function]",pF="[object GeneratorFunction]",hF="[object Proxy]";function Fk(e){if(!sl(e))return!1;var t=as(e);return t==fF||t==pF||t==dF||t==hF}var Gd=Kn["__core-js_shared__"],F0=function(){var e=/[^.]+$/.exec(Gd&&Gd.keys&&Gd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mF(e){return!!F0&&F0 in e}var gF=Function.prototype,vF=gF.toString;function us(e){if(e!=null){try{return vF.call(e)}catch{}try{return e+""}catch{}}return""}var yF=/[\\^$.*+?()[\]{}|]/g,xF=/^\[object .+?Constructor\]$/,wF=Function.prototype,bF=Object.prototype,SF=wF.toString,kF=bF.hasOwnProperty,CF=RegExp("^"+SF.call(kF).replace(yF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TF(e){if(!sl(e)||mF(e))return!1;var t=Fk(e)?CF:xF;return t.test(us(e))}function EF(e,t){return e==null?void 0:e[t]}function cs(e,t){var n=EF(e,t);return TF(n)?n:void 0}var $a=cs(Kn,"Map"),Ba=cs(Object,"create");function _F(){this.__data__=Ba?Ba(null):{},this.size=0}function PF(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jF="__lodash_hash_undefined__",RF=Object.prototype,AF=RF.hasOwnProperty;function OF(e){var t=this.__data__;if(Ba){var n=t[e];return n===jF?void 0:n}return AF.call(t,e)?t[e]:void 0}var DF=Object.prototype,MF=DF.hasOwnProperty;function FF(e){var t=this.__data__;return Ba?t[e]!==void 0:MF.call(t,e)}var NF="__lodash_hash_undefined__";function LF(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ba&&t===void 0?NF:t,this}function Ki(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])}}Ki.prototype.clear=_F;Ki.prototype.delete=PF;Ki.prototype.get=OF;Ki.prototype.has=FF;Ki.prototype.set=LF;function IF(){this.size=0,this.__data__={hash:new Ki,map:new($a||mr),string:new Ki}}function $F(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Dc(e,t){var n=e.__data__;return $F(t)?n[typeof t=="string"?"string":"hash"]:n.map}function BF(e){var t=Dc(this,e).delete(e);return this.size-=t?1:0,t}function zF(e){return Dc(this,e).get(e)}function VF(e){return Dc(this,e).has(e)}function UF(e,t){var n=Dc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ci(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])}}ci.prototype.clear=IF;ci.prototype.delete=BF;ci.prototype.get=zF;ci.prototype.has=VF;ci.prototype.set=UF;var HF=200;function WF(e,t){var n=this.__data__;if(n instanceof mr){var r=n.__data__;if(!$a||r.length<HF-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ci(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=aF;Eo.prototype.delete=lF;Eo.prototype.get=uF;Eo.prototype.has=cF;Eo.prototype.set=WF;function qF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var N0=function(){try{var e=cs(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Nk(e,t,n){t=="__proto__"&&N0?N0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var GF=Object.prototype,QF=GF.hasOwnProperty;function Lk(e,t,n){var r=e[t];(!(QF.call(e,t)&&Mk(r,n))||n===void 0&&!(t in e))&&Nk(e,t,n)}function Mc(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?Nk(n,a,l):Lk(n,a,l)}return n}function YF(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var KF="[object Arguments]";function L0(e){return ls(e)&&as(e)==KF}var Ik=Object.prototype,XF=Ik.hasOwnProperty,ZF=Ik.propertyIsEnumerable,JF=L0(function(){return arguments}())?L0:function(e){return ls(e)&&XF.call(e,"callee")&&!ZF.call(e,"callee")},ol=Array.isArray;function eN(){return!1}var $k=typeof zt=="object"&&zt&&!zt.nodeType&&zt,I0=$k&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,tN=I0&&I0.exports===$k,$0=tN?Kn.Buffer:void 0,nN=$0?$0.isBuffer:void 0,Bk=nN||eN,rN=9007199254740991,iN=/^(?:0|[1-9]\d*)$/;function sN(e,t){var n=typeof e;return t=t??rN,!!t&&(n=="number"||n!="symbol"&&iN.test(e))&&e>-1&&e%1==0&&e<t}var oN=9007199254740991;function zk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oN}var aN="[object Arguments]",lN="[object Array]",uN="[object Boolean]",cN="[object Date]",dN="[object Error]",fN="[object Function]",pN="[object Map]",hN="[object Number]",mN="[object Object]",gN="[object RegExp]",vN="[object Set]",yN="[object String]",xN="[object WeakMap]",wN="[object ArrayBuffer]",bN="[object DataView]",SN="[object Float32Array]",kN="[object Float64Array]",CN="[object Int8Array]",TN="[object Int16Array]",EN="[object Int32Array]",_N="[object Uint8Array]",PN="[object Uint8ClampedArray]",jN="[object Uint16Array]",RN="[object Uint32Array]",Ce={};Ce[SN]=Ce[kN]=Ce[CN]=Ce[TN]=Ce[EN]=Ce[_N]=Ce[PN]=Ce[jN]=Ce[RN]=!0;Ce[aN]=Ce[lN]=Ce[wN]=Ce[uN]=Ce[bN]=Ce[cN]=Ce[dN]=Ce[fN]=Ce[pN]=Ce[hN]=Ce[mN]=Ce[gN]=Ce[vN]=Ce[yN]=Ce[xN]=!1;function AN(e){return ls(e)&&zk(e.length)&&!!Ce[as(e)]}function ig(e){return function(t){return e(t)}}var Vk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,aa=Vk&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,ON=aa&&aa.exports===Vk,Qd=ON&&Rk.process,mo=function(){try{var e=aa&&aa.require&&aa.require("util").types;return e||Qd&&Qd.binding&&Qd.binding("util")}catch{}}(),B0=mo&&mo.isTypedArray,DN=B0?ig(B0):AN,MN=Object.prototype,FN=MN.hasOwnProperty;function Uk(e,t){var n=ol(e),r=!n&&JF(e),i=!n&&!r&&Bk(e),s=!n&&!r&&!i&&DN(e),o=n||r||i||s,a=o?YF(e.length,String):[],l=a.length;for(var c in e)(t||FN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||sN(c,l)))&&a.push(c);return a}var NN=Object.prototype;function sg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||NN;return e===n}var LN=Ok(Object.keys,Object),IN=Object.prototype,$N=IN.hasOwnProperty;function BN(e){if(!sg(e))return LN(e);var t=[];for(var n in Object(e))$N.call(e,n)&&n!="constructor"&&t.push(n);return t}function Hk(e){return e!=null&&zk(e.length)&&!Fk(e)}function og(e){return Hk(e)?Uk(e):BN(e)}function zN(e,t){return e&&Mc(t,og(t),e)}function VN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var UN=Object.prototype,HN=UN.hasOwnProperty;function WN(e){if(!sl(e))return VN(e);var t=sg(e),n=[];for(var r in e)r=="constructor"&&(t||!HN.call(e,r))||n.push(r);return n}function ag(e){return Hk(e)?Uk(e,!0):WN(e)}function qN(e,t){return e&&Mc(t,ag(t),e)}var Wk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,z0=Wk&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,GN=z0&&z0.exports===Wk,V0=GN?Kn.Buffer:void 0,U0=V0?V0.allocUnsafe:void 0;function QN(e,t){if(t)return e.slice();var n=e.length,r=U0?U0(n):new e.constructor(n);return e.copy(r),r}function qk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function YN(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 Gk(){return[]}var KN=Object.prototype,XN=KN.propertyIsEnumerable,H0=Object.getOwnPropertySymbols,lg=H0?function(e){return e==null?[]:(e=Object(e),YN(H0(e),function(t){return XN.call(e,t)}))}:Gk;function ZN(e,t){return Mc(e,lg(e),t)}function Qk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var JN=Object.getOwnPropertySymbols,Yk=JN?function(e){for(var t=[];e;)Qk(t,lg(e)),e=rg(e);return t}:Gk;function e5(e,t){return Mc(e,Yk(e),t)}function Kk(e,t,n){var r=t(e);return ol(e)?r:Qk(r,n(e))}function t5(e){return Kk(e,og,lg)}function n5(e){return Kk(e,ag,Yk)}var Yp=cs(Kn,"DataView"),Kp=cs(Kn,"Promise"),Xp=cs(Kn,"Set"),Zp=cs(Kn,"WeakMap"),W0="[object Map]",r5="[object Object]",q0="[object Promise]",G0="[object Set]",Q0="[object WeakMap]",Y0="[object DataView]",i5=us(Yp),s5=us($a),o5=us(Kp),a5=us(Xp),l5=us(Zp),nr=as;(Yp&&nr(new Yp(new ArrayBuffer(1)))!=Y0||$a&&nr(new $a)!=W0||Kp&&nr(Kp.resolve())!=q0||Xp&&nr(new Xp)!=G0||Zp&&nr(new Zp)!=Q0)&&(nr=function(e){var t=as(e),n=t==r5?e.constructor:void 0,r=n?us(n):"";if(r)switch(r){case i5:return Y0;case s5:return W0;case o5:return q0;case a5:return G0;case l5:return Q0}return t});var u5=Object.prototype,c5=u5.hasOwnProperty;function d5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&c5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var K0=Kn.Uint8Array;function ug(e){var t=new e.constructor(e.byteLength);return new K0(t).set(new K0(e)),t}function f5(e,t){var n=t?ug(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var p5=/\w*$/;function h5(e){var t=new e.constructor(e.source,p5.exec(e));return t.lastIndex=e.lastIndex,t}var X0=ii?ii.prototype:void 0,Z0=X0?X0.valueOf:void 0;function m5(e){return Z0?Object(Z0.call(e)):{}}function g5(e,t){var n=t?ug(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var v5="[object Boolean]",y5="[object Date]",x5="[object Map]",w5="[object Number]",b5="[object RegExp]",S5="[object Set]",k5="[object String]",C5="[object Symbol]",T5="[object ArrayBuffer]",E5="[object DataView]",_5="[object Float32Array]",P5="[object Float64Array]",j5="[object Int8Array]",R5="[object Int16Array]",A5="[object Int32Array]",O5="[object Uint8Array]",D5="[object Uint8ClampedArray]",M5="[object Uint16Array]",F5="[object Uint32Array]";function N5(e,t,n){var r=e.constructor;switch(t){case T5:return ug(e);case v5:case y5:return new r(+e);case E5:return f5(e,n);case _5:case P5:case j5:case R5:case A5:case O5:case D5:case M5:case F5:return g5(e,n);case x5:return new r;case w5:case k5:return new r(e);case b5:return h5(e);case S5:return new r;case C5:return m5(e)}}var J0=Object.create,L5=function(){function e(){}return function(t){if(!sl(t))return{};if(J0)return J0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function I5(e){return typeof e.constructor=="function"&&!sg(e)?L5(rg(e)):{}}var $5="[object Map]";function B5(e){return ls(e)&&nr(e)==$5}var ex=mo&&mo.isMap,z5=ex?ig(ex):B5,V5="[object Set]";function U5(e){return ls(e)&&nr(e)==V5}var tx=mo&&mo.isSet,H5=tx?ig(tx):U5,W5=1,q5=2,G5=4,Xk="[object Arguments]",Q5="[object Array]",Y5="[object Boolean]",K5="[object Date]",X5="[object Error]",Zk="[object Function]",Z5="[object GeneratorFunction]",J5="[object Map]",e4="[object Number]",Jk="[object Object]",t4="[object RegExp]",n4="[object Set]",r4="[object String]",i4="[object Symbol]",s4="[object WeakMap]",o4="[object ArrayBuffer]",a4="[object DataView]",l4="[object Float32Array]",u4="[object Float64Array]",c4="[object Int8Array]",d4="[object Int16Array]",f4="[object Int32Array]",p4="[object Uint8Array]",h4="[object Uint8ClampedArray]",m4="[object Uint16Array]",g4="[object Uint32Array]",xe={};xe[Xk]=xe[Q5]=xe[o4]=xe[a4]=xe[Y5]=xe[K5]=xe[l4]=xe[u4]=xe[c4]=xe[d4]=xe[f4]=xe[J5]=xe[e4]=xe[Jk]=xe[t4]=xe[n4]=xe[r4]=xe[i4]=xe[p4]=xe[h4]=xe[m4]=xe[g4]=!0;xe[X5]=xe[Zk]=xe[s4]=!1;function la(e,t,n,r,i,s){var o,a=t&W5,l=t&q5,c=t&G5;if(o!==void 0)return o;if(!sl(e))return e;var d=ol(e);if(d){if(o=d5(e),!a)return qk(e,o)}else{var u=nr(e),f=u==Zk||u==Z5;if(Bk(e))return QN(e,a);if(u==Jk||u==Xk||f&&!i){if(o=l||f?{}:I5(e),!a)return l?e5(e,qN(o,e)):ZN(e,zN(o,e))}else{if(!xe[u])return i?e:{};o=N5(e,u,a)}}s||(s=new Eo);var h=s.get(e);if(h)return h;s.set(e,o),H5(e)?e.forEach(function(b){o.add(la(b,t,n,b,e,s))}):z5(e)&&e.forEach(function(b,g){o.set(g,la(b,t,n,g,e,s))});var m=c?l?n5:t5:l?ag:og,p=d?void 0:m(e);return qF(p||e,function(b,g){p&&(g=b,b=e[g]),Lk(o,g,la(b,t,n,g,e,s))}),o}var v4=1,y4=4;function Nl(e){return la(e,v4|y4)}var nx=Array.isArray,rx=Object.keys,x4=Object.prototype.hasOwnProperty,w4=typeof Element<"u";function Jp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=nx(e),r=nx(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Jp(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 c=e instanceof RegExp,d=t instanceof RegExp;if(c!=d)return!1;if(c&&d)return e.toString()==t.toString();var u=rx(e);if(s=u.length,s!==rx(t).length)return!1;for(i=s;i--!==0;)if(!x4.call(t,u[i]))return!1;if(w4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!Jp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var b4=function(t,n){try{return Jp(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 wi=Xi(b4);var S4=4;function ix(e){return la(e,S4)}function eC(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 k4="[object Symbol]";function cg(e){return typeof e=="symbol"||ls(e)&&as(e)==k4}var C4="Expected a function";function dg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(C4);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(dg.Cache||ci),n}dg.Cache=ci;var T4=500;function E4(e){var t=dg(e,function(r){return n.size===T4&&n.clear(),r}),n=t.cache;return t}var _4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,P4=/\\(\\)?/g,j4=E4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_4,function(n,r,i,s){t.push(i?s.replace(P4,"$1"):r||n)}),t}),R4=1/0;function A4(e){if(typeof e=="string"||cg(e))return e;var t=e+"";return t=="0"&&1/e==-R4?"-0":t}var O4=1/0,sx=ii?ii.prototype:void 0,ox=sx?sx.toString:void 0;function tC(e){if(typeof e=="string")return e;if(ol(e))return eC(e,tC)+"";if(cg(e))return ox?ox.call(e):"";var t=e+"";return t=="0"&&1/e==-O4?"-0":t}function D4(e){return e==null?"":tC(e)}function nC(e){return ol(e)?eC(e,A4):cg(e)?[e]:qk(j4(D4(e)))}var rC={exports:{}},me={};/** @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 c=[];for(let d of Object.values(this.internalTests))d&&c.push(d);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},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:c}=t,d=m=>{i||(i=!0,n(m,o))},u=m=>{i||(i=!0,r(m,o))},f=s.length,p=[];if(!f)return u([]);let h={value:o,originalValue:a,path:l,options:c,schema:this};for(let m=0;m<s.length;m++){const x=s[m];x(h,d,function(w){w&&(Array.isArray(w)?p.push(...w):p.push(w)),--f<=0&&u(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 c=r[a];const d=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,f,p)=>this.resolve(d)._validate(c,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,c)=>{Rt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new Rt(l,c,void 0,void 0,s)):o(c)}))}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 Rt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Rt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Rt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Rt.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=gs({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=gs({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Mn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Mn.notNull){return this.nullability(!1,t)}required(t=Mn.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=Mn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=gs(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=kk(t).map(s=>new os(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Gu(i,n):Gu.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=gs({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=Mn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=gs({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=Mn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=gs({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,c,d)=>d.findIndex(u=>u.name===l.name)===c)}}}Yn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Yn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=hM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Yn.prototype[e]=Yn.prototype.oneOf;for(const e of["not","nope"])Yn.prototype[e]=Yn.prototype.notOneOf;const mM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function gM(e){const t=Gp(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 Gp(e){var t,n;const r=mM.exec(e);return r?{year:Zn(r[1]),month:Zn(r[2],1)-1,day:Zn(r[3],1),hour:Zn(r[4]),minute:Zn(r[5]),second:Zn(r[6]),millisecond:r[7]?Zn(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:Zn(r[10]),minuteOffset:Zn(r[11])}:null}function Zn(e,t=0){return Number(e)||t}let vM=/^[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])?)*$/,yM=/^((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,xM=/^(?:[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,wM="^\\d{4}-\\d{2}-\\d{2}",bM="\\d{2}:\\d{2}:\\d{2}",SM="(([+-]\\d{2}(:?\\d{2})?)|Z)",kM=new RegExp(`${wM}T${bM}(\\.\\d+)?${SM}$`),CM=e=>ji(e)||e===e.trim(),TM={}.toString();function Yu(){return new _k}class _k extends Yn{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===TM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Mn.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=Tt.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=Tt.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=Tt.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||Tt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=Tt.email){return this.matches(vM,{name:"email",message:t,excludeEmptyString:!0})}url(t=Tt.url){return this.matches(yM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Tt.uuid){return this.matches(xM,{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(kM,{name:"datetime",message:n||Tt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Tt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=Gp(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||Tt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=Gp(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Tt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:CM})}lowercase(t=Tt.lowercase){return this.transform(n=>ji(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ji(n)||n===n.toLowerCase()})}uppercase(t=Tt.uppercase){return this.transform(n=>ji(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ji(n)||n===n.toUpperCase()})}}Yu.prototype=_k.prototype;let EM=new Date(""),_M=e=>Object.prototype.toString.call(e)==="[object Date]";class Ac extends Yn{constructor(){super({type:"date",check(t){return _M(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=gM(t),isNaN(t)?Ac.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(os.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=qp.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=qp.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)}})}}Ac.INVALID_DATE=EM;Ac.prototype;function PM(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),os.isRef(a)&&a.isSibling?s(a.path,o):tg(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return nM.array(Array.from(r),n).reverse()}function R0(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 Pk(e){return(t,n)=>R0(e,t)-R0(e,n)}const jM=(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 cu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=cu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=cu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(cu)}):"optional"in e?e.optional():e}const RM=(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 A0=e=>Object.prototype.toString.call(e)==="[object Object]";function O0(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const AM=Pk([]);function ng(e){return new jk(e)}class jk extends Yn{constructor(t){super({type:"object",check(n){return A0(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=AM,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(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),d=!1;for(const u of a){let f=s[u],p=u in i;if(f){let h,m=i[u];c.path=(n.path?`${n.path}.`:"")+u,f=f.resolve({value:m,context:n.context,parent:l});let x=f instanceof Yn?f.spec:void 0,g=x==null?void 0:x.strict;if(x!=null&&x.strip){d=d||u in i;continue}h=!n.__validating||!g?f.cast(i[u],c):i[u],h!==void 0&&(l[u]=h)}else p&&!o&&(l[u]=i[u]);(p!==u in l||l[u]!==i[u])&&(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,c)=>{if(!a||!A0(c)){i(l,c);return}o=o||c;let d=[];for(let u of this._nodes){let f=this.fields[u];!f||os.isRef(f)||d.push(f.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:d,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}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=PM(t,n),r._sortErrors=Pk(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 cu(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 RM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(jM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||uu.exact,test(n){if(n==null)return!0;const r=O0(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=uu.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=O0(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=uu.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(qd.camelCase)}snakeCase(){return this.transformKeys(qd.snakeCase)}constantCase(){return this.transformKeys(t=>qd.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}}ng.prototype=jk.prototype;var OM=function(t){return DM(t)&&!MM(t)};function DM(e){return!!e&&typeof e=="object"}function MM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||LM(e)}var FM=typeof Symbol=="function"&&Symbol.for,NM=FM?Symbol.for("react.element"):60103;function LM(e){return e.$$typeof===NM}function IM(e){return Array.isArray(e)?[]:{}}function Ku(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ia(IM(e),e,t):e}function $M(e,t,n){return e.concat(t).map(function(r){return Ku(r,n)})}function BM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Ku(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Ku(t[i],n):r[i]=Ia(e[i],t[i],n)}),r}function Ia(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||$M,n.isMergeableObject=n.isMergeableObject||OM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):BM(e,t,n):Ku(t,n)}Ia.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ia(r,i,n)},{})};var Qp=Ia,Rk=typeof global=="object"&&global&&global.Object===Object&&global,zM=typeof self=="object"&&self&&self.Object===Object&&self,Kn=Rk||zM||Function("return this")(),ii=Kn.Symbol,Ak=Object.prototype,VM=Ak.hasOwnProperty,UM=Ak.toString,$o=ii?ii.toStringTag:void 0;function HM(e){var t=VM.call(e,$o),n=e[$o];try{e[$o]=void 0;var r=!0}catch{}var i=UM.call(e);return r&&(t?e[$o]=n:delete e[$o]),i}var WM=Object.prototype,qM=WM.toString;function GM(e){return qM.call(e)}var QM="[object Null]",YM="[object Undefined]",D0=ii?ii.toStringTag:void 0;function as(e){return e==null?e===void 0?YM:QM:D0&&D0 in Object(e)?HM(e):GM(e)}function Ok(e,t){return function(n){return e(t(n))}}var rg=Ok(Object.getPrototypeOf,Object);function ls(e){return e!=null&&typeof e=="object"}var KM="[object Object]",XM=Function.prototype,ZM=Object.prototype,Dk=XM.toString,JM=ZM.hasOwnProperty,eF=Dk.call(Object);function M0(e){if(!ls(e)||as(e)!=KM)return!1;var t=rg(e);if(t===null)return!0;var n=JM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Dk.call(n)==eF}function tF(){this.__data__=[],this.size=0}function Mk(e,t){return e===t||e!==e&&t!==t}function Oc(e,t){for(var n=e.length;n--;)if(Mk(e[n][0],t))return n;return-1}var nF=Array.prototype,rF=nF.splice;function iF(e){var t=this.__data__,n=Oc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():rF.call(t,n,1),--this.size,!0}function sF(e){var t=this.__data__,n=Oc(t,e);return n<0?void 0:t[n][1]}function oF(e){return Oc(this.__data__,e)>-1}function aF(e,t){var n=this.__data__,r=Oc(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=tF;mr.prototype.delete=iF;mr.prototype.get=sF;mr.prototype.has=oF;mr.prototype.set=aF;function lF(){this.__data__=new mr,this.size=0}function uF(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cF(e){return this.__data__.get(e)}function dF(e){return this.__data__.has(e)}function sl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fF="[object AsyncFunction]",pF="[object Function]",hF="[object GeneratorFunction]",mF="[object Proxy]";function Fk(e){if(!sl(e))return!1;var t=as(e);return t==pF||t==hF||t==fF||t==mF}var Gd=Kn["__core-js_shared__"],F0=function(){var e=/[^.]+$/.exec(Gd&&Gd.keys&&Gd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gF(e){return!!F0&&F0 in e}var vF=Function.prototype,yF=vF.toString;function us(e){if(e!=null){try{return yF.call(e)}catch{}try{return e+""}catch{}}return""}var xF=/[\\^$.*+?()[\]{}|]/g,wF=/^\[object .+?Constructor\]$/,bF=Function.prototype,SF=Object.prototype,kF=bF.toString,CF=SF.hasOwnProperty,TF=RegExp("^"+kF.call(CF).replace(xF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function EF(e){if(!sl(e)||gF(e))return!1;var t=Fk(e)?TF:wF;return t.test(us(e))}function _F(e,t){return e==null?void 0:e[t]}function cs(e,t){var n=_F(e,t);return EF(n)?n:void 0}var $a=cs(Kn,"Map"),Ba=cs(Object,"create");function PF(){this.__data__=Ba?Ba(null):{},this.size=0}function jF(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var RF="__lodash_hash_undefined__",AF=Object.prototype,OF=AF.hasOwnProperty;function DF(e){var t=this.__data__;if(Ba){var n=t[e];return n===RF?void 0:n}return OF.call(t,e)?t[e]:void 0}var MF=Object.prototype,FF=MF.hasOwnProperty;function NF(e){var t=this.__data__;return Ba?t[e]!==void 0:FF.call(t,e)}var LF="__lodash_hash_undefined__";function IF(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ba&&t===void 0?LF:t,this}function Ki(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])}}Ki.prototype.clear=PF;Ki.prototype.delete=jF;Ki.prototype.get=DF;Ki.prototype.has=NF;Ki.prototype.set=IF;function $F(){this.size=0,this.__data__={hash:new Ki,map:new($a||mr),string:new Ki}}function BF(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Dc(e,t){var n=e.__data__;return BF(t)?n[typeof t=="string"?"string":"hash"]:n.map}function zF(e){var t=Dc(this,e).delete(e);return this.size-=t?1:0,t}function VF(e){return Dc(this,e).get(e)}function UF(e){return Dc(this,e).has(e)}function HF(e,t){var n=Dc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ci(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])}}ci.prototype.clear=$F;ci.prototype.delete=zF;ci.prototype.get=VF;ci.prototype.has=UF;ci.prototype.set=HF;var WF=200;function qF(e,t){var n=this.__data__;if(n instanceof mr){var r=n.__data__;if(!$a||r.length<WF-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ci(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=lF;Eo.prototype.delete=uF;Eo.prototype.get=cF;Eo.prototype.has=dF;Eo.prototype.set=qF;function GF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var N0=function(){try{var e=cs(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Nk(e,t,n){t=="__proto__"&&N0?N0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var QF=Object.prototype,YF=QF.hasOwnProperty;function Lk(e,t,n){var r=e[t];(!(YF.call(e,t)&&Mk(r,n))||n===void 0&&!(t in e))&&Nk(e,t,n)}function Mc(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?Nk(n,a,l):Lk(n,a,l)}return n}function KF(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var XF="[object Arguments]";function L0(e){return ls(e)&&as(e)==XF}var Ik=Object.prototype,ZF=Ik.hasOwnProperty,JF=Ik.propertyIsEnumerable,eN=L0(function(){return arguments}())?L0:function(e){return ls(e)&&ZF.call(e,"callee")&&!JF.call(e,"callee")},ol=Array.isArray;function tN(){return!1}var $k=typeof zt=="object"&&zt&&!zt.nodeType&&zt,I0=$k&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,nN=I0&&I0.exports===$k,$0=nN?Kn.Buffer:void 0,rN=$0?$0.isBuffer:void 0,Bk=rN||tN,iN=9007199254740991,sN=/^(?:0|[1-9]\d*)$/;function oN(e,t){var n=typeof e;return t=t??iN,!!t&&(n=="number"||n!="symbol"&&sN.test(e))&&e>-1&&e%1==0&&e<t}var aN=9007199254740991;function zk(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aN}var lN="[object Arguments]",uN="[object Array]",cN="[object Boolean]",dN="[object Date]",fN="[object Error]",pN="[object Function]",hN="[object Map]",mN="[object Number]",gN="[object Object]",vN="[object RegExp]",yN="[object Set]",xN="[object String]",wN="[object WeakMap]",bN="[object ArrayBuffer]",SN="[object DataView]",kN="[object Float32Array]",CN="[object Float64Array]",TN="[object Int8Array]",EN="[object Int16Array]",_N="[object Int32Array]",PN="[object Uint8Array]",jN="[object Uint8ClampedArray]",RN="[object Uint16Array]",AN="[object Uint32Array]",Ce={};Ce[kN]=Ce[CN]=Ce[TN]=Ce[EN]=Ce[_N]=Ce[PN]=Ce[jN]=Ce[RN]=Ce[AN]=!0;Ce[lN]=Ce[uN]=Ce[bN]=Ce[cN]=Ce[SN]=Ce[dN]=Ce[fN]=Ce[pN]=Ce[hN]=Ce[mN]=Ce[gN]=Ce[vN]=Ce[yN]=Ce[xN]=Ce[wN]=!1;function ON(e){return ls(e)&&zk(e.length)&&!!Ce[as(e)]}function ig(e){return function(t){return e(t)}}var Vk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,aa=Vk&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,DN=aa&&aa.exports===Vk,Qd=DN&&Rk.process,mo=function(){try{var e=aa&&aa.require&&aa.require("util").types;return e||Qd&&Qd.binding&&Qd.binding("util")}catch{}}(),B0=mo&&mo.isTypedArray,MN=B0?ig(B0):ON,FN=Object.prototype,NN=FN.hasOwnProperty;function Uk(e,t){var n=ol(e),r=!n&&eN(e),i=!n&&!r&&Bk(e),s=!n&&!r&&!i&&MN(e),o=n||r||i||s,a=o?KF(e.length,String):[],l=a.length;for(var c in e)(t||NN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||oN(c,l)))&&a.push(c);return a}var LN=Object.prototype;function sg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||LN;return e===n}var IN=Ok(Object.keys,Object),$N=Object.prototype,BN=$N.hasOwnProperty;function zN(e){if(!sg(e))return IN(e);var t=[];for(var n in Object(e))BN.call(e,n)&&n!="constructor"&&t.push(n);return t}function Hk(e){return e!=null&&zk(e.length)&&!Fk(e)}function og(e){return Hk(e)?Uk(e):zN(e)}function VN(e,t){return e&&Mc(t,og(t),e)}function UN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var HN=Object.prototype,WN=HN.hasOwnProperty;function qN(e){if(!sl(e))return UN(e);var t=sg(e),n=[];for(var r in e)r=="constructor"&&(t||!WN.call(e,r))||n.push(r);return n}function ag(e){return Hk(e)?Uk(e,!0):qN(e)}function GN(e,t){return e&&Mc(t,ag(t),e)}var Wk=typeof zt=="object"&&zt&&!zt.nodeType&&zt,z0=Wk&&typeof Vt=="object"&&Vt&&!Vt.nodeType&&Vt,QN=z0&&z0.exports===Wk,V0=QN?Kn.Buffer:void 0,U0=V0?V0.allocUnsafe:void 0;function YN(e,t){if(t)return e.slice();var n=e.length,r=U0?U0(n):new e.constructor(n);return e.copy(r),r}function qk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function KN(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 Gk(){return[]}var XN=Object.prototype,ZN=XN.propertyIsEnumerable,H0=Object.getOwnPropertySymbols,lg=H0?function(e){return e==null?[]:(e=Object(e),KN(H0(e),function(t){return ZN.call(e,t)}))}:Gk;function JN(e,t){return Mc(e,lg(e),t)}function Qk(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var e5=Object.getOwnPropertySymbols,Yk=e5?function(e){for(var t=[];e;)Qk(t,lg(e)),e=rg(e);return t}:Gk;function t5(e,t){return Mc(e,Yk(e),t)}function Kk(e,t,n){var r=t(e);return ol(e)?r:Qk(r,n(e))}function n5(e){return Kk(e,og,lg)}function r5(e){return Kk(e,ag,Yk)}var Yp=cs(Kn,"DataView"),Kp=cs(Kn,"Promise"),Xp=cs(Kn,"Set"),Zp=cs(Kn,"WeakMap"),W0="[object Map]",i5="[object Object]",q0="[object Promise]",G0="[object Set]",Q0="[object WeakMap]",Y0="[object DataView]",s5=us(Yp),o5=us($a),a5=us(Kp),l5=us(Xp),u5=us(Zp),nr=as;(Yp&&nr(new Yp(new ArrayBuffer(1)))!=Y0||$a&&nr(new $a)!=W0||Kp&&nr(Kp.resolve())!=q0||Xp&&nr(new Xp)!=G0||Zp&&nr(new Zp)!=Q0)&&(nr=function(e){var t=as(e),n=t==i5?e.constructor:void 0,r=n?us(n):"";if(r)switch(r){case s5:return Y0;case o5:return W0;case a5:return q0;case l5:return G0;case u5:return Q0}return t});var c5=Object.prototype,d5=c5.hasOwnProperty;function f5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&d5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var K0=Kn.Uint8Array;function ug(e){var t=new e.constructor(e.byteLength);return new K0(t).set(new K0(e)),t}function p5(e,t){var n=t?ug(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var h5=/\w*$/;function m5(e){var t=new e.constructor(e.source,h5.exec(e));return t.lastIndex=e.lastIndex,t}var X0=ii?ii.prototype:void 0,Z0=X0?X0.valueOf:void 0;function g5(e){return Z0?Object(Z0.call(e)):{}}function v5(e,t){var n=t?ug(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var y5="[object Boolean]",x5="[object Date]",w5="[object Map]",b5="[object Number]",S5="[object RegExp]",k5="[object Set]",C5="[object String]",T5="[object Symbol]",E5="[object ArrayBuffer]",_5="[object DataView]",P5="[object Float32Array]",j5="[object Float64Array]",R5="[object Int8Array]",A5="[object Int16Array]",O5="[object Int32Array]",D5="[object Uint8Array]",M5="[object Uint8ClampedArray]",F5="[object Uint16Array]",N5="[object Uint32Array]";function L5(e,t,n){var r=e.constructor;switch(t){case E5:return ug(e);case y5:case x5:return new r(+e);case _5:return p5(e,n);case P5:case j5:case R5:case A5:case O5:case D5:case M5:case F5:case N5:return v5(e,n);case w5:return new r;case b5:case C5:return new r(e);case S5:return m5(e);case k5:return new r;case T5:return g5(e)}}var J0=Object.create,I5=function(){function e(){}return function(t){if(!sl(t))return{};if(J0)return J0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function $5(e){return typeof e.constructor=="function"&&!sg(e)?I5(rg(e)):{}}var B5="[object Map]";function z5(e){return ls(e)&&nr(e)==B5}var ex=mo&&mo.isMap,V5=ex?ig(ex):z5,U5="[object Set]";function H5(e){return ls(e)&&nr(e)==U5}var tx=mo&&mo.isSet,W5=tx?ig(tx):H5,q5=1,G5=2,Q5=4,Xk="[object Arguments]",Y5="[object Array]",K5="[object Boolean]",X5="[object Date]",Z5="[object Error]",Zk="[object Function]",J5="[object GeneratorFunction]",e4="[object Map]",t4="[object Number]",Jk="[object Object]",n4="[object RegExp]",r4="[object Set]",i4="[object String]",s4="[object Symbol]",o4="[object WeakMap]",a4="[object ArrayBuffer]",l4="[object DataView]",u4="[object Float32Array]",c4="[object Float64Array]",d4="[object Int8Array]",f4="[object Int16Array]",p4="[object Int32Array]",h4="[object Uint8Array]",m4="[object Uint8ClampedArray]",g4="[object Uint16Array]",v4="[object Uint32Array]",xe={};xe[Xk]=xe[Y5]=xe[a4]=xe[l4]=xe[K5]=xe[X5]=xe[u4]=xe[c4]=xe[d4]=xe[f4]=xe[p4]=xe[e4]=xe[t4]=xe[Jk]=xe[n4]=xe[r4]=xe[i4]=xe[s4]=xe[h4]=xe[m4]=xe[g4]=xe[v4]=!0;xe[Z5]=xe[Zk]=xe[o4]=!1;function la(e,t,n,r,i,s){var o,a=t&q5,l=t&G5,c=t&Q5;if(o!==void 0)return o;if(!sl(e))return e;var d=ol(e);if(d){if(o=f5(e),!a)return qk(e,o)}else{var u=nr(e),f=u==Zk||u==J5;if(Bk(e))return YN(e,a);if(u==Jk||u==Xk||f&&!i){if(o=l||f?{}:$5(e),!a)return l?t5(e,GN(o,e)):JN(e,VN(o,e))}else{if(!xe[u])return i?e:{};o=L5(e,u,a)}}s||(s=new Eo);var p=s.get(e);if(p)return p;s.set(e,o),W5(e)?e.forEach(function(x){o.add(la(x,t,n,x,e,s))}):V5(e)&&e.forEach(function(x,g){o.set(g,la(x,t,n,g,e,s))});var h=c?l?r5:n5:l?ag:og,m=d?void 0:h(e);return GF(m||e,function(x,g){m&&(g=x,x=e[g]),Lk(o,g,la(x,t,n,g,e,s))}),o}var y4=1,x4=4;function Nl(e){return la(e,y4|x4)}var nx=Array.isArray,rx=Object.keys,w4=Object.prototype.hasOwnProperty,b4=typeof Element<"u";function Jp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=nx(e),r=nx(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!Jp(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 c=e instanceof RegExp,d=t instanceof RegExp;if(c!=d)return!1;if(c&&d)return e.toString()==t.toString();var u=rx(e);if(s=u.length,s!==rx(t).length)return!1;for(i=s;i--!==0;)if(!w4.call(t,u[i]))return!1;if(b4&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!Jp(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var S4=function(t,n){try{return Jp(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 wi=Xi(S4);var k4=4;function ix(e){return la(e,k4)}function eC(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 C4="[object Symbol]";function cg(e){return typeof e=="symbol"||ls(e)&&as(e)==C4}var T4="Expected a function";function dg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(T4);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(dg.Cache||ci),n}dg.Cache=ci;var E4=500;function _4(e){var t=dg(e,function(r){return n.size===E4&&n.clear(),r}),n=t.cache;return t}var P4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,j4=/\\(\\)?/g,R4=_4(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(P4,function(n,r,i,s){t.push(i?s.replace(j4,"$1"):r||n)}),t}),A4=1/0;function O4(e){if(typeof e=="string"||cg(e))return e;var t=e+"";return t=="0"&&1/e==-A4?"-0":t}var D4=1/0,sx=ii?ii.prototype:void 0,ox=sx?sx.toString:void 0;function tC(e){if(typeof e=="string")return e;if(ol(e))return eC(e,tC)+"";if(cg(e))return ox?ox.call(e):"";var t=e+"";return t=="0"&&1/e==-D4?"-0":t}function M4(e){return e==null?"":tC(e)}function nC(e){return ol(e)?eC(e,O4):cg(e)?[e]:qk(R4(M4(e)))}var rC={exports:{}},me={};/** @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 Ze=typeof Symbol=="function"&&Symbol.for,fg=Ze?Symbol.for("react.element"):60103,pg=Ze?Symbol.for("react.portal"):60106,Fc=Ze?Symbol.for("react.fragment"):60107,Nc=Ze?Symbol.for("react.strict_mode"):60108,Lc=Ze?Symbol.for("react.profiler"):60114,Ic=Ze?Symbol.for("react.provider"):60109,$c=Ze?Symbol.for("react.context"):60110,hg=Ze?Symbol.for("react.async_mode"):60111,Bc=Ze?Symbol.for("react.concurrent_mode"):60111,zc=Ze?Symbol.for("react.forward_ref"):60112,Vc=Ze?Symbol.for("react.suspense"):60113,M4=Ze?Symbol.for("react.suspense_list"):60120,Uc=Ze?Symbol.for("react.memo"):60115,Hc=Ze?Symbol.for("react.lazy"):60116,F4=Ze?Symbol.for("react.block"):60121,N4=Ze?Symbol.for("react.fundamental"):60117,L4=Ze?Symbol.for("react.responder"):60118,I4=Ze?Symbol.for("react.scope"):60119;function Gt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case fg:switch(e=e.type,e){case hg:case Bc:case Fc:case Lc:case Nc:case Vc:return e;default:switch(e=e&&e.$$typeof,e){case $c:case zc:case Hc:case Uc:case Ic:return e;default:return t}}case pg:return t}}}function iC(e){return Gt(e)===Bc}me.AsyncMode=hg;me.ConcurrentMode=Bc;me.ContextConsumer=$c;me.ContextProvider=Ic;me.Element=fg;me.ForwardRef=zc;me.Fragment=Fc;me.Lazy=Hc;me.Memo=Uc;me.Portal=pg;me.Profiler=Lc;me.StrictMode=Nc;me.Suspense=Vc;me.isAsyncMode=function(e){return iC(e)||Gt(e)===hg};me.isConcurrentMode=iC;me.isContextConsumer=function(e){return Gt(e)===$c};me.isContextProvider=function(e){return Gt(e)===Ic};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===fg};me.isForwardRef=function(e){return Gt(e)===zc};me.isFragment=function(e){return Gt(e)===Fc};me.isLazy=function(e){return Gt(e)===Hc};me.isMemo=function(e){return Gt(e)===Uc};me.isPortal=function(e){return Gt(e)===pg};me.isProfiler=function(e){return Gt(e)===Lc};me.isStrictMode=function(e){return Gt(e)===Nc};me.isSuspense=function(e){return Gt(e)===Vc};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fc||e===Bc||e===Lc||e===Nc||e===Vc||e===M4||typeof e=="object"&&e!==null&&(e.$$typeof===Hc||e.$$typeof===Uc||e.$$typeof===Ic||e.$$typeof===$c||e.$$typeof===zc||e.$$typeof===N4||e.$$typeof===L4||e.$$typeof===I4||e.$$typeof===F4)};me.typeOf=Gt;rC.exports=me;var $4=rC.exports,sC=$4,B4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},z4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},oC={};oC[sC.ForwardRef]=B4;oC[sC.Memo]=z4;function Ye(){return Ye=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},Ye.apply(this,arguments)}function aC(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 Wc=v.createContext(void 0);Wc.displayName="FormikContext";Wc.Provider;Wc.Consumer;function V4(){var e=v.useContext(Wc);return e}var mn=function(t){return typeof t=="function"},qc=function(t){return t!==null&&typeof t=="object"},U4=function(t){return String(Math.floor(Number(t)))===t},Yd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Kd=function(t){return qc(t)&&mn(t.then)};function Lt(e,t,n,r){r===void 0&&(r=0);for(var i=nC(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Vi(e,t,n){for(var r=ix(e),i=r,s=0,o=nC(t);s<o.length-1;s++){var a=o[s],l=Lt(e,o.slice(0,s+1));if(l&&(qc(l)||Array.isArray(l)))i=i[a]=ix(l);else{var c=o[s+1];i=i[a]=U4(c)&&Number(c)>=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 lC(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];qc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},lC(a,t,n,r[o])):r[o]=t}return r}function H4(e,t){switch(t.type){case"SET_VALUES":return Ye({},e,{values:t.payload});case"SET_TOUCHED":return Ye({},e,{touched:t.payload});case"SET_ERRORS":return wi(e.errors,t.payload)?e:Ye({},e,{errors:t.payload});case"SET_STATUS":return Ye({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ye({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ye({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ye({},e,{values:Vi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ye({},e,{touched:Vi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ye({},e,{errors:Vi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ye({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ye({},e,{touched:lC(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ye({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ye({},e,{isSubmitting:!1});default:return e}}var gi={},Ll={};function W4(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,c=l===void 0?!1:l,d=e.onSubmit,u=aC(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Ye({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},u),h=v.useRef(f.initialValues),m=v.useRef(f.initialErrors||gi),p=v.useRef(f.initialTouched||Ll),b=v.useRef(f.initialStatus),g=v.useRef(!1),w=v.useRef({});v.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var x=v.useState(0),k=x[1],T=v.useRef({values:Nl(f.initialValues),errors:Nl(f.initialErrors)||gi,touched:Nl(f.initialTouched)||Ll,status:Nl(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),E=T.current,_=v.useCallback(function(R){var B=T.current;T.current=H4(B,R),B!==T.current&&k(function(A){return A+1})},[]),j=v.useCallback(function(R,B){return new Promise(function(A,M){var W=f.validate(R,B);W==null?A(gi):Kd(W)?W.then(function(J){A(J||gi)},function(J){M(J)}):A(W)})},[f.validate]),P=v.useCallback(function(R,B){var A=f.validationSchema,M=mn(A)?A(B):A,W=B&&M.validateAt?M.validateAt(B,R):G4(R,M);return new Promise(function(J,ae){W.then(function(){J(gi)},function(Ve){Ve.name==="ValidationError"?J(q4(Ve)):ae(Ve)})})},[f.validationSchema]),O=v.useCallback(function(R,B){return new Promise(function(A){return A(w.current[R].validate(B))})},[]),$=v.useCallback(function(R){var B=Object.keys(w.current).filter(function(M){return mn(w.current[M].validate)}),A=B.length>0?B.map(function(M){return O(M,Lt(R,M))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(A).then(function(M){return M.reduce(function(W,J,ae){return J==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||J&&(W=Vi(W,B[ae],J)),W},{})})},[O]),F=v.useCallback(function(R){return Promise.all([$(R),f.validationSchema?P(R):{},f.validate?j(R):{}]).then(function(B){var A=B[0],M=B[1],W=B[2],J=Qp.all([A,M,W],{arrayMerge:Q4});return J})},[f.validate,f.validationSchema,$,j,P]),z=Xt(function(R){return R===void 0&&(R=E.values),_({type:"SET_ISVALIDATING",payload:!0}),F(R).then(function(B){return g.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:B})),B})});v.useEffect(function(){o&&g.current===!0&&wi(h.current,f.initialValues)&&z(h.current)},[o,z]);var G=v.useCallback(function(R){var B=R&&R.values?R.values:h.current,A=R&&R.errors?R.errors:m.current?m.current:f.initialErrors||{},M=R&&R.touched?R.touched:p.current?p.current:f.initialTouched||{},W=R&&R.status?R.status:b.current?b.current:f.initialStatus;h.current=B,m.current=A,p.current=M,b.current=W;var J=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!R&&!!R.isSubmitting,errors:A,touched:M,status:W,values:B,isValidating:!!R&&!!R.isValidating,submitCount:R&&R.submitCount&&typeof R.submitCount=="number"?R.submitCount:0}})};if(f.onReset){var ae=f.onReset(E.values,di);Kd(ae)?ae.then(J):J()}else J()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){g.current===!0&&!wi(h.current,f.initialValues)&&c&&(h.current=f.initialValues,G(),o&&z(h.current))},[c,f.initialValues,G,o,z]),v.useEffect(function(){c&&g.current===!0&&!wi(m.current,f.initialErrors)&&(m.current=f.initialErrors||gi,_({type:"SET_ERRORS",payload:f.initialErrors||gi}))},[c,f.initialErrors]),v.useEffect(function(){c&&g.current===!0&&!wi(p.current,f.initialTouched)&&(p.current=f.initialTouched||Ll,_({type:"SET_TOUCHED",payload:f.initialTouched||Ll}))},[c,f.initialTouched]),v.useEffect(function(){c&&g.current===!0&&!wi(b.current,f.initialStatus)&&(b.current=f.initialStatus,_({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var re=Xt(function(R){if(w.current[R]&&mn(w.current[R].validate)){var B=Lt(E.values,R),A=w.current[R].validate(B);return Kd(A)?(_({type:"SET_ISVALIDATING",payload:!0}),A.then(function(M){return M}).then(function(M){_({type:"SET_FIELD_ERROR",payload:{field:R,value:M}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:R,value:A}}),Promise.resolve(A))}else if(f.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),P(E.values,R).then(function(M){return M}).then(function(M){_({type:"SET_FIELD_ERROR",payload:{field:R,value:Lt(M,R)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),K=v.useCallback(function(R,B){var A=B.validate;w.current[R]={validate:A}},[]),X=v.useCallback(function(R){delete w.current[R]},[]),D=Xt(function(R,B){_({type:"SET_TOUCHED",payload:R});var A=B===void 0?i:B;return A?z(E.values):Promise.resolve()}),I=v.useCallback(function(R){_({type:"SET_ERRORS",payload:R})},[]),q=Xt(function(R,B){var A=mn(R)?R(E.values):R;_({type:"SET_VALUES",payload:A});var M=B===void 0?n:B;return M?z(A):Promise.resolve()}),H=v.useCallback(function(R,B){_({type:"SET_FIELD_ERROR",payload:{field:R,value:B}})},[]),Y=Xt(function(R,B,A){_({type:"SET_FIELD_VALUE",payload:{field:R,value:B}});var M=A===void 0?n:A;return M?z(Vi(E.values,R,B)):Promise.resolve()}),te=v.useCallback(function(R,B){var A=B,M=R,W;if(!Yd(R)){R.persist&&R.persist();var J=R.target?R.target:R.currentTarget,ae=J.type,Ve=J.name,tt=J.id,Pn=J.value,Qt=J.checked,ps=J.outerHTML,Xn=J.options,xr=J.multiple;A=B||Ve||tt,M=/number|range/.test(ae)?(W=parseFloat(Pn),isNaN(W)?"":W):/checkbox/.test(ae)?K4(Lt(E.values,A),Qt,Pn):Xn&&xr?Y4(Xn):Pn}A&&Y(A,M)},[Y,E.values]),ce=Xt(function(R){if(Yd(R))return function(B){return te(B,R)};te(R)}),ve=Xt(function(R,B,A){B===void 0&&(B=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:R,value:B}});var M=A===void 0?i:A;return M?z(E.values):Promise.resolve()}),ne=v.useCallback(function(R,B){R.persist&&R.persist();var A=R.target,M=A.name,W=A.id,J=A.outerHTML,ae=B||M||W;ve(ae,!0)},[ve]),Ne=Xt(function(R){if(Yd(R))return function(B){return ne(B,R)};ne(R)}),Je=v.useCallback(function(R){mn(R)?_({type:"SET_FORMIK_STATE",payload:R}):_({type:"SET_FORMIK_STATE",payload:function(){return R}})},[]),et=v.useCallback(function(R){_({type:"SET_STATUS",payload:R})},[]),Ft=v.useCallback(function(R){_({type:"SET_ISSUBMITTING",payload:R})},[]),_n=Xt(function(){return _({type:"SUBMIT_ATTEMPT"}),z().then(function(R){var B=R instanceof Error,A=!B&&Object.keys(R).length===0;if(A){var M;try{if(M=gr(),M===void 0)return}catch(W){throw W}return Promise.resolve(M).then(function(W){return g.current&&_({type:"SUBMIT_SUCCESS"}),W}).catch(function(W){if(g.current)throw _({type:"SUBMIT_FAILURE"}),W})}else if(g.current&&(_({type:"SUBMIT_FAILURE"}),B))throw R})}),dn=Xt(function(R){R&&R.preventDefault&&mn(R.preventDefault)&&R.preventDefault(),R&&R.stopPropagation&&mn(R.stopPropagation)&&R.stopPropagation(),_n().catch(function(B){console.warn("Warning: An unhandled error was caught from submitForm()",B)})}),di={resetForm:G,validateForm:z,validateField:re,setErrors:I,setFieldError:H,setFieldTouched:ve,setFieldValue:Y,setStatus:et,setSubmitting:Ft,setTouched:D,setValues:q,setFormikState:Je,submitForm:_n},gr=Xt(function(){return d(E.values,di)}),fs=Xt(function(R){R&&R.preventDefault&&mn(R.preventDefault)&&R.preventDefault(),R&&R.stopPropagation&&mn(R.stopPropagation)&&R.stopPropagation(),G()}),fi=v.useCallback(function(R){return{value:Lt(E.values,R),error:Lt(E.errors,R),touched:!!Lt(E.touched,R),initialValue:Lt(h.current,R),initialTouched:!!Lt(p.current,R),initialError:Lt(m.current,R)}},[E.errors,E.touched,E.values]),Ct=v.useCallback(function(R){return{setValue:function(A,M){return Y(R,A,M)},setTouched:function(A,M){return ve(R,A,M)},setError:function(A){return H(R,A)}}},[Y,ve,H]),vr=v.useCallback(function(R){var B=qc(R),A=B?R.name:R,M=Lt(E.values,A),W={name:A,value:M,onChange:ce,onBlur:Ne};if(B){var J=R.type,ae=R.value,Ve=R.as,tt=R.multiple;J==="checkbox"?ae===void 0?W.checked=!!M:(W.checked=!!(Array.isArray(M)&&~M.indexOf(ae)),W.value=ae):J==="radio"?(W.checked=M===ae,W.value=ae):Ve==="select"&&tt&&(W.value=W.value||[],W.multiple=!0)}return W},[Ne,ce,E.values]),Ge=v.useMemo(function(){return!wi(h.current,E.values)},[h.current,E.values]),yr=v.useMemo(function(){return typeof a<"u"?Ge?E.errors&&Object.keys(E.errors).length===0:a!==!1&&mn(a)?a(f):a:E.errors&&Object.keys(E.errors).length===0},[a,Ge,E.errors,f]),_o=Ye({},E,{initialValues:h.current,initialErrors:m.current,initialTouched:p.current,initialStatus:b.current,handleBlur:Ne,handleChange:ce,handleReset:fs,handleSubmit:dn,resetForm:G,setErrors:I,setFormikState:Je,setFieldTouched:ve,setFieldValue:Y,setFieldError:H,setStatus:et,setSubmitting:Ft,setTouched:D,setValues:q,submitForm:_n,validateForm:z,validateField:re,isValid:yr,dirty:Ge,unregisterField:X,registerField:K,getFieldProps:vr,getFieldMeta:fi,getFieldHelpers:Ct,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return _o}function q4(e){var t={};if(e.inner){if(e.inner.length===0)return Vi(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;Lt(t,o.path)||(t=Vi(t,o.path,o.message))}}return t}function G4(e,t,n,r){n===void 0&&(n=!1);var i=eh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function eh(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||M0(i)?eh(i):i!==""?i:void 0}):M0(e[r])?t[r]=eh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Q4(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?Qp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Qp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function Y4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function K4(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 X4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Xt(e){var t=v.useRef(e);return X4(function(){t.current=e}),v.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 Z4=v.forwardRef(function(e,t){var n=e.action,r=aC(e,["action"]),i=n??"#",s=V4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ye({onSubmit:a,ref:t,onReset:o,action:i},r))});Z4.displayName="Form";const uC=({init:e,schema:t,action:n})=>W4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function J4(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 eL=e=>{switch(e){case"success":return rL;case"info":return sL;case"warning":return iL;case"error":return oL;default:return null}},tL=Array(12).fill(0),nL=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},tL.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),rL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),iL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.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"})),sL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),oL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),aL=N.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"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),lL=()=>{const[e,t]=N.useState(document.hidden);return N.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let th=1;class uL{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:th++,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 c=>{if(o=["resolve",c],N.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(dL(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...h})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...h})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:f,...h})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:u,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>o[0]==="reject"?d(o[1]):c(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)||th++;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 Pt=new uL,cL=(e,t)=>{const n=(t==null?void 0:t.id)||th++;return Pt.addToast({title:e,...t,id:n}),n},dL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",fL=cL,pL=()=>Pt.toasts,hL=()=>Pt.getActiveToasts(),cC=Object.assign(fL,{success:Pt.success,info:Pt.info,warning:Pt.warning,error:Pt.error,custom:Pt.custom,message:Pt.message,promise:Pt.promise,dismiss:Pt.dismiss,loading:Pt.loading},{getHistory:pL,getToasts:hL});J4("[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 Il(e){return e.label!==void 0}const mL=3,gL="24px",vL="16px",ax=4e3,yL=356,xL=14,wL=45,bL=200;function An(...e){return e.filter(Boolean).join(" ")}function SL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const kL=e=>{var t,n,r,i,s,o,a,l,c;const{invert:d,toast:u,unstyled:f,interacting:h,setHeights:m,visibleToasts:p,heights:b,index:g,toasts:w,expanded:x,removeToast:k,defaultRichColors:T,closeButton:E,style:_,cancelButtonStyle:j,actionButtonStyle:P,className:O="",descriptionClassName:$="",duration:F,position:z,gap:G,expandByDefault:re,classNames:K,icons:X,closeButtonAriaLabel:D="Close toast"}=e,[I,q]=N.useState(null),[H,Y]=N.useState(null),[te,ce]=N.useState(!1),[ve,ne]=N.useState(!1),[Ne,Je]=N.useState(!1),[et,Ft]=N.useState(!1),[_n,dn]=N.useState(!1),[di,gr]=N.useState(0),[fs,fi]=N.useState(0),Ct=N.useRef(u.duration||F||ax),vr=N.useRef(null),Ge=N.useRef(null),yr=g===0,_o=g+1<=p,R=u.type,B=u.dismissible!==!1,A=u.className||"",M=u.descriptionClassName||"",W=N.useMemo(()=>b.findIndex(ie=>ie.toastId===u.id)||0,[b,u.id]),J=N.useMemo(()=>{var ie;return(ie=u.closeButton)!=null?ie:E},[u.closeButton,E]),ae=N.useMemo(()=>u.duration||F||ax,[u.duration,F]),Ve=N.useRef(0),tt=N.useRef(0),Pn=N.useRef(0),Qt=N.useRef(null),[ps,Xn]=z.split("-"),xr=N.useMemo(()=>b.reduce((ie,Qe,lt)=>lt>=W?ie:ie+Qe.height,0),[b,W]),hs=lL(),Po=u.invert||d,pi=R==="loading";tt.current=N.useMemo(()=>W*G+xr,[W,xr]),N.useEffect(()=>{Ct.current=ae},[ae]),N.useEffect(()=>{ce(!0)},[]),N.useEffect(()=>{const ie=Ge.current;if(ie){const Qe=ie.getBoundingClientRect().height;return fi(Qe),m(lt=>[{toastId:u.id,height:Qe,position:u.position},...lt]),()=>m(lt=>lt.filter(Nt=>Nt.toastId!==u.id))}},[m,u.id]),N.useLayoutEffect(()=>{if(!te)return;const ie=Ge.current,Qe=ie.style.height;ie.style.height="auto";const lt=ie.getBoundingClientRect().height;ie.style.height=Qe,fi(lt),m(Nt=>Nt.find(nt=>nt.toastId===u.id)?Nt.map(nt=>nt.toastId===u.id?{...nt,height:lt}:nt):[{toastId:u.id,height:lt,position:u.position},...Nt])},[te,u.title,u.description,m,u.id]);const jn=N.useCallback(()=>{ne(!0),gr(tt.current),m(ie=>ie.filter(Qe=>Qe.toastId!==u.id)),setTimeout(()=>{k(u)},bL)},[u,k,m,tt]);N.useEffect(()=>{if(u.promise&&R==="loading"||u.duration===1/0||u.type==="loading")return;let ie;return x||h||hs?(()=>{if(Pn.current<Ve.current){const Nt=new Date().getTime()-Ve.current;Ct.current=Ct.current-Nt}Pn.current=new Date().getTime()})():(()=>{Ct.current!==1/0&&(Ve.current=new Date().getTime(),ie=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),jn()},Ct.current))})(),()=>clearTimeout(ie)},[x,h,u,R,hs,jn]),N.useEffect(()=>{u.delete&&jn()},[jn,u.delete]);function qC(){var ie;if(X!=null&&X.loading){var Qe;return N.createElement("div",{className:An(K==null?void 0:K.loader,u==null||(Qe=u.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":R==="loading"},X.loading)}return N.createElement(nL,{className:An(K==null?void 0:K.loader,u==null||(ie=u.classNames)==null?void 0:ie.loader),visible:R==="loading"})}var bg,Sg;return N.createElement("li",{tabIndex:0,ref:Ge,className:An(O,A,K==null?void 0:K.toast,u==null||(t=u.classNames)==null?void 0:t.toast,K==null?void 0:K.default,K==null?void 0:K[R],u==null||(n=u.classNames)==null?void 0:n[R]),"data-sonner-toast":"","data-rich-colors":(bg=u.richColors)!=null?bg:T,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":te,"data-promise":!!u.promise,"data-swiped":_n,"data-removed":ve,"data-visible":_o,"data-y-position":ps,"data-x-position":Xn,"data-index":g,"data-front":yr,"data-swiping":Ne,"data-dismissible":B,"data-type":R,"data-invert":Po,"data-swipe-out":et,"data-swipe-direction":H,"data-expanded":!!(x||re&&te),style:{"--index":g,"--toasts-before":g,"--z-index":w.length-g,"--offset":`${ve?di:tt.current}px`,"--initial-height":re?"auto":`${fs}px`,..._,...u.style},onDragEnd:()=>{Je(!1),q(null),Qt.current=null},onPointerDown:ie=>{pi||!B||(vr.current=new Date,gr(tt.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(Je(!0),Qt.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,Qe,lt;if(et||!B)return;Qt.current=null;const Nt=Number(((ie=Ge.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ll=Number(((Qe=Ge.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),nt=new Date().getTime()-((lt=vr.current)==null?void 0:lt.getTime()),Yt=I==="x"?Nt:ll,ul=Math.abs(Yt)/nt;if(Math.abs(Yt)>=wL||ul>.11){gr(tt.current),u.onDismiss==null||u.onDismiss.call(u,u),Y(I==="x"?Nt>0?"right":"left":ll>0?"down":"up"),jn(),Ft(!0);return}else{var fn,pn;(fn=Ge.current)==null||fn.style.setProperty("--swipe-amount-x","0px"),(pn=Ge.current)==null||pn.style.setProperty("--swipe-amount-y","0px")}dn(!1),Je(!1),q(null)},onPointerMove:ie=>{var Qe,lt,Nt;if(!Qt.current||!B||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;const nt=ie.clientY-Qt.current.y,Yt=ie.clientX-Qt.current.x;var ul;const fn=(ul=e.swipeDirections)!=null?ul:SL(z);!I&&(Math.abs(Yt)>1||Math.abs(nt)>1)&&q(Math.abs(Yt)>Math.abs(nt)?"x":"y");let pn={x:0,y:0};const kg=hi=>1/(1.5+Math.abs(hi)/20);if(I==="y"){if(fn.includes("top")||fn.includes("bottom"))if(fn.includes("top")&&nt<0||fn.includes("bottom")&&nt>0)pn.y=nt;else{const hi=nt*kg(nt);pn.y=Math.abs(hi)<Math.abs(nt)?hi:nt}}else if(I==="x"&&(fn.includes("left")||fn.includes("right")))if(fn.includes("left")&&Yt<0||fn.includes("right")&&Yt>0)pn.x=Yt;else{const hi=Yt*kg(Yt);pn.x=Math.abs(hi)<Math.abs(Yt)?hi:Yt}(Math.abs(pn.x)>0||Math.abs(pn.y)>0)&&dn(!0),(lt=Ge.current)==null||lt.style.setProperty("--swipe-amount-x",`${pn.x}px`),(Nt=Ge.current)==null||Nt.style.setProperty("--swipe-amount-y",`${pn.y}px`)}},J&&!u.jsx&&R!=="loading"?N.createElement("button",{"aria-label":D,"data-disabled":pi,"data-close-button":!0,onClick:pi||!B?()=>{}:()=>{jn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:An(K==null?void 0:K.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Sg=X==null?void 0:X.close)!=null?Sg:aL):null,R||u.icon||u.promise?N.createElement("div",{"data-icon":"",className:An(K==null?void 0:K.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||qC():null,u.type!=="loading"?u.icon||(X==null?void 0:X[R])||eL(R):null):null,N.createElement("div",{"data-content":"",className:An(K==null?void 0:K.content,u==null||(s=u.classNames)==null?void 0:s.content)},N.createElement("div",{"data-title":"",className:An(K==null?void 0:K.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?N.createElement("div",{"data-description":"",className:An($,M,K==null?void 0:K.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),N.isValidElement(u.cancel)?u.cancel:u.cancel&&Il(u.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||j,onClick:ie=>{Il(u.cancel)&&B&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,ie),jn())},className:An(K==null?void 0:K.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,N.isValidElement(u.action)?u.action:u.action&&Il(u.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||P,onClick:ie=>{Il(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,ie),!ie.defaultPrevented&&jn())},className:An(K==null?void 0:K.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function lx(){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 CL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?vL:gL;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const TL=N.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:h,style:m,visibleToasts:p=mL,toastOptions:b,dir:g=lx(),gap:w=xL,icons:x,containerAriaLabel:k="Notifications"}=t,[T,E]=N.useState([]),_=N.useMemo(()=>Array.from(new Set([i].concat(T.filter(H=>H.position).map(H=>H.position)))),[T,i]),[j,P]=N.useState([]),[O,$]=N.useState(!1),[F,z]=N.useState(!1),[G,re]=N.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=N.useRef(null),X=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=N.useRef(null),I=N.useRef(!1),q=N.useCallback(H=>{E(Y=>{var te;return(te=Y.find(ce=>ce.id===H.id))!=null&&te.delete||Pt.dismiss(H.id),Y.filter(({id:ce})=>ce!==H.id)})},[]);return N.useEffect(()=>Pt.subscribe(H=>{if(H.dismiss){const Y=T.map(te=>te.id===H.id?{...te,delete:!0}:te);requestAnimationFrame(()=>{E(Y)});return}setTimeout(()=>{w_.flushSync(()=>{E(Y=>{const te=Y.findIndex(ce=>ce.id===H.id);return te!==-1?[...Y.slice(0,te),{...Y[te],...H},...Y.slice(te+1)]:[H,...Y]})})})}),[T]),N.useEffect(()=>{if(u!=="system"){re(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Y})=>{re(Y?"dark":"light")})}catch{H.addListener(({matches:te})=>{try{re(te?"dark":"light")}catch(ce){console.error(ce)}})}},[u]),N.useEffect(()=>{T.length<=1&&$(!1)},[T]),N.useEffect(()=>{const H=Y=>{var te;if(s.every(ne=>Y[ne]||Y.code===ne)){var ve;$(!0),(ve=K.current)==null||ve.focus()}Y.code==="Escape"&&(document.activeElement===K.current||(te=K.current)!=null&&te.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),N.useEffect(()=>{if(K.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,I.current=!1)}},[K.current]),N.createElement("section",{ref:n,"aria-label":`${k} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((H,Y)=>{var te;const[ce,ve]=H.split("-");return T.length?N.createElement("ol",{key:H,dir:g==="auto"?lx():g,tabIndex:-1,ref:K,className:l,"data-sonner-toaster":!0,"data-sonner-theme":G,"data-y-position":ce,"data-lifted":O&&T.length>1&&!o,"data-x-position":ve,style:{"--front-toast-height":`${((te=j[0])==null?void 0:te.height)||0}px`,"--width":`${yL}px`,"--gap":`${w}px`,...m,...CL(c,d)},onBlur:ne=>{I.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(I.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||I.current||(I.current=!0,D.current=ne.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{F||$(!1)},onDragEnd:()=>$(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},T.filter(ne=>!ne.position&&Y===0||ne.position===H).map((ne,Ne)=>{var Je,et;return N.createElement(kL,{key:ne.id,icons:x,index:Ne,toast:ne,defaultRichColors:f,duration:(Je=b==null?void 0:b.duration)!=null?Je:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:p,closeButton:(et=b==null?void 0:b.closeButton)!=null?et:a,interacting:F,position:H,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:q,toasts:T.filter(Ft=>Ft.position==ne.position),heights:j.filter(Ft=>Ft.position==ne.position),setHeights:P,expandByDefault:o,gap:w,expanded:O,swipeDirections:t.swipeDirections})})):null}))});function Us(e){return cC.custom(t=>y.jsx(EL,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Xd={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 EL(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return y.jsxs("div",{className:ge("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",Xd[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:ge("text-sm font-medium",Xd[s||"info"].text),children:t}),y.jsx("p",{className:ge("text-sm",Xd[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(),cC.dismiss(i)},children:r.label})})]})}function _L(e){return Array.isArray(e)&&e[0].field!==void 0}const dC=(e,t)=>{var n;if(_L(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||Us({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Us({description:e.error,variant:"error"});return}};function PL(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 mg({id:e,text:t,className:n,required:r}){const i=Oe();return t?y.jsxs("label",{htmlFor:e,className:ge("mb-1 block text-sm font-medium",n),style:{color:i.getColor(C.InputText)},children:[t,r&&y.jsx("span",{className:"ml-1",style:{color:i.getColor(C.ErrorText)},children:"*"})]}):null}const Zd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function jL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:d,ariaInvalid:u,ariaLabel:f,autoFocus:h,...m}){const p=Oe();return y.jsxs("div",{className:ge({"mb-2":!o},d),children:[y.jsx(mg,{id:e,text:t,required:a}),y.jsxs("div",{className:"flex items-center",children:[r&&y.jsx("span",{className:ge("inline-block border border-solid border-r-0 rounded-l-md",Zd[i]),style:{borderColor:l?p.getColor(C.ErrorBorder):p.getColor(C.InputBorder),backgroundColor:p.getColor(C.InputBackground),borderRadius:p.getRadius()},children:r}),y.jsx("input",{id:e,className:ge("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",Zd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":f,style:{color:l?p.getColor(C.ErrorText):p.getColor(C.InputText),backgroundColor:p.getColor(C.InputBackground),borderColor:l?p.getColor(C.ErrorBorder):p.getColor(C.InputBorder),borderRadius:p.getRadius()},...m}),n&&y.jsx("span",{className:ge("inline-block border border-solid border-l-0 rounded-r-md",Zd[i]),style:{borderColor:l?p.getColor(C.ErrorBorder):p.getColor(C.InputBorder),backgroundColor:p.getColor(C.InputBackground),borderRadius:p.getRadius()},children:n})]}),!!l&&y.jsx("p",{className:"mt-1 text-xs",style:{color:p.getColor(C.ErrorText)},children:l})]})}const RL=(e,t)=>{document.cookie=`${e}=${t}`},fC=v.createContext({}),AL=()=>`${window.location.pathname}_$$_${document.title}`,OL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},DL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function ML({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(DL());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(fC.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function gg(){return v.useContext(fC)}function FL({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(mg,{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 ux={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:""}},NL={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"},LL={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"},IL={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 $L({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:d="ring",reversed:u=!1,variant:f="blue",error:h,...m}){return y.jsxs("div",{children:[y.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${ux[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 ${NL[f]} ${LL[c]} ${ux[d].input}`,required:n,checked:i,value:r,onChange:p=>s==null?void 0:s(p.target.checked),onBlur:p=>o==null?void 0:o(p.target.checked),...m}),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(fe.Check,{className:IL[c]})})]}),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}),h&&y.jsx("small",{className:"text-xs text-red-500",children:h})]})}function BL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return y.jsxs("label",{htmlFor:e,className:ge("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 zL({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 cx=Object.assign(BL,{Group:zL});function vg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:d,inputRef:u,autoFocus:f=!0,style:h,...m}){const p=Oe();return y.jsxs("div",{className:ge({"mb-2":!s},i),children:[t&&y.jsx(mg,{id:e,text:t,required:l}),y.jsx("textarea",{className:ge("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...m,ref:u,autoFocus:f,style:{...h,color:c?p.getColor(C.ErrorText):p.getColor(C.InputText),backgroundColor:p.getColor(C.InputBackground),borderColor:c?p.getColor(C.ErrorBorder):p.getColor(C.InputBorder),borderRadius:p.getRadius()}}),!!c&&y.jsx("p",{className:"mt-1 text-xs",style:{color:p.getColor(C.ErrorText)},children:c})]})}function VL({onOk:e,clientId:t,widgetId:n,appearance:r}){var g,w,x,k,T,E,_,j;const i=Oe(),{defaultValues:s,widget:o}=kt(),[a,l]=v.useState(!1),c=gg(),d=PD(),u=!!s&&"username"in s,f=(w=(g=r==null?void 0:r.body)==null?void 0:g.inputs)==null?void 0:w.reduce((P,O)=>{let $=O.remember?au(O.name):s==null?void 0:s[O.name];return O.options&&$&&!O.options.includes($)&&($=void 0),O.name==="username"&&u&&($=s.username),P[O.name]=$||"",P},{}),h=(k=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:k.reduce((P,O)=>(P[O.name]="",P),{}),m=ng((E=(T=r==null?void 0:r.body)==null?void 0:T.inputs)==null?void 0:E.reduce((P,O)=>(P[O.name]=O.required?Yu().required(`${O.label} alanı zorunludur`):Yu(),P),{})),p=uC({init:{...f},schema:m,action:async P=>{var F;if(a)return;l(!0),u&&(P.username=s.username),s!=null&&s.secret_data&&(P.secret_data=s.secret_data);for(const z in P)typeof P[z]=="string"&&(P[z]=P[z].trim());const[O,$]=await d.mutateAsync({inputs:P,history:c.history,client_id:t,widget_id:n});if(vc($)){_D(O)&&(Hd(Gn.CustomerToken,O.customer_token,(o==null?void 0:o.link_id)||""),Hd(Gn.CustomerRefreshToken,O.customer_refresh_token,(o==null?void 0:o.link_id)||""),Hd(Gn.DeviceId,O.device_id,(o==null?void 0:o.link_id)||"")),c.clearHistory();for(const z of((F=r==null?void 0:r.body)==null?void 0:F.inputs)||[])z.remember&&RL(z.name,P[z.name]);l(!1),e==null||e();return}l(!1),dC(O,{form:p})}}),b=!PL(h||{},(p==null?void 0:p.values)||{});return y.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:i.getColor(C.GreeterBackground)},children:y.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:P=>{P.preventDefault(),p.handleSubmit()},children:[(j=(_=r==null?void 0:r.body)==null?void 0:_.inputs)==null?void 0:j.map(P=>{var O,$;if(["text","email","phone"].includes(P.type))return y.jsx(jL,{id:P.name,name:P.name,type:P.type,label:P.label,value:p.values[P.name],onChange:p.handleChange,onBlur:p.handleBlur,disabled:P.name==="username"&&u,readOnly:P.name==="username"&&u,autoComplete:"off",placeholder:P.placeholder,error:p.errors[P.name],ariaInvalid:p.errors.name?!0:void 0,required:P.required,noMargin:!0},P.name);if(P.type==="select")return y.jsx(FL,{id:P.name,name:P.name,value:p.values[P.name],onChange:p.handleChange,label:P.label,error:p.errors[P.name],required:P.required,children:(O=P.options)==null?void 0:O.map(F=>y.jsx("option",{value:F,children:F},F))},P.name);if(P.type==="checkbox")return y.jsx($L,{id:P.name,name:P.name,value:p.values[P.name],checked:p.values[P.name]==="true",onChange:p.handleChange,required:P.required,error:p.errors[P.name],children:P.label},P.name);if(P.type==="radio")return y.jsx(cx.Group,{id:P.name,label:P.label,required:P.required,error:p.errors[P.name],children:($=P.options)==null?void 0:$.map(F=>y.jsx(cx,{onChange:z=>{z?p.setFieldValue(P.name,F):p.setFieldValue(P.name,"")},id:F,name:P.name,value:F===p.values[P.name],children:F},F))},P.name);if(P.type==="textarea")return y.jsx(vg,{id:P.name,name:P.name,value:p.values[P.name],onChange:p.handleChange,placeholder:P.placeholder,error:p.errors[P.name],required:P.required,label:P.label},P.name)}),y.jsx(on,{textKey:C.GreeterButtonText,bgKey:C.GreeterButtonBackground,type:"submit",disabled:!b||a,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:a?"Yükleniyor...":"Sohbet Oluştur"})]})})}function UL({onClose:e}){const t=Oe();return y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2 hover:opacity-80 transition-opacity",style:{backgroundColor:t.getColor(C.CloseButtonBackground),color:t.getColor(C.CloseButtonText)},withoutTheming:!0,children:y.jsx(fe.X,{className:"size-5",style:{color:t.getColor(C.CloseButtonText)}})})}function HL({image_url:e,name:t,size:n="size-9"}){const r=Oe();return e?y.jsx("img",{src:e,alt:t,className:ge("rounded-md",n)}):y.jsx("div",{className:"flex items-center justify-center gap-1",children:y.jsx(fe.Website,{className:ge(n),style:{color:r.getColor(C.IconColor)}})})}function WL(){const e=gg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Km("popstate",t),null}function qL(){const e=ui(),t=gg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(En.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Km("popstate",n),v.useEffect(()=>{if(!e)return;const r=OL(),i=AL();r!==i&&(e.emit(En.PageChange,{page:i}),t.setPage(i))},[e]),null}function GL({children:e}){const t=Oe(),{widget:n}=kt();if(!n)return null;const r=is();return y.jsx(Kr,{children:y.jsxs(be.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(be.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(C.GreeterTopBackground)},className:`h-44 absolute top-0 left-0 w-full ${r?"":"rounded-t-xl"} flex flex-col items-center justify-center shadow-sm`}),e]})})}function QL(){return WL(),null}const Jd=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function YL(){var f,h,m,p,b,g;const e=Oe(),{widget:t,setOpen:n}=kt(),r=il(),[i,s]=v.useState(!0),o=Pc(),a=is();if(!t)return null;const l=()=>{n(!1)};if(v.useEffect(()=>{if(!r||!r.accessToken){s(!1);return}jD(t.client_id,ho(r)).then(([w,x])=>{vc(x)?o.push("chat"):Vp(t.link_id||"")}).finally(()=>{s(!1)})},[]),i)return null;const c=Jd(((h=(f=t.appearance)==null?void 0:f.head)==null?void 0:h.elements)||[],"text"),d=Jd(((p=(m=t.appearance)==null?void 0:m.head)==null?void 0:p.elements)||[],"title"),u=Jd(((g=(b=t.appearance)==null?void 0:b.head)==null?void 0:g.elements)||[],"logo");return y.jsxs(GL,{children:[y.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[a&&y.jsx(UL,{onClose:l}),u&&y.jsx(be.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:y.jsx(HL,{name:t.name,image_url:u,size:"size-20"})}),d&&y.jsx(be.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(C.GreeterTopText)},className:"text-xl font-bold",children:d}),c&&y.jsx(be.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(C.GreeterTopText)},className:"text-sm opacity-90",children:c})]}),y.jsx(be.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:a?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:y.jsx(VL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{o.push("chat")}})})]})}function KL(){return y.jsxs(y.Fragment,{children:[y.jsx(xk,{border:!0,children:y.jsx(YL,{})}),y.jsx(QL,{})]})}const XL=[{path:"/",component:KL,name:"registration"}];var vs=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(vs||{}),Si=(e=>(e.AdminJoin="admin_join",e.ChatCreated="chat_created",e))(Si||{}),Le=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(Le||{});function ZL({name:e,avatar:t,className:n="text-neutral-500",textColor:r}){return y.jsxs(be.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 flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),y.jsx("div",{className:"flex flex-col",children:y.jsx("span",{className:ge("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e})})]})}var JL=Object.defineProperty,eI=(e,t,n)=>t in e?JL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ef=(e,t,n)=>(eI(e,typeof t!="symbol"?t+"":t,n),n);let tI=class{constructor(){ef(this,"current",this.detect()),ef(this,"handoffState","pending"),ef(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"}},du=new tI;function nI(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Gc(){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 nI(()=>{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=Gc();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 pC(){let[e]=v.useState(Gc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let Jr=(e,t)=>{du.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function hC(e){let t=v.useRef(e);return Jr(()=>{t.current=e},[e]),t}let or=function(e){let t=hC(e);return N.useCallback((...n)=>t.current(...n),[t])};function nh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Qc(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,Qc),r}var mC=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(mC||{}),Br=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Br||{});function gC(){let e=iI();return v.useCallback(t=>rI({mergeRefs:e,...t}),[e])}function rI({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??sI;let l=vC(t,e);if(s)return $l(l,n,r,o,a);let c=i??0;if(c&2){let{static:d=!1,...u}=l;if(d)return $l(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return Qc(d?0:1,{0(){return null},1(){return $l({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return $l(l,n,r,o,a)}function $l(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=tf(e,["unmount","static"]),c=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 u={};if(t){let f=!1,h=[];for(let[m,p]of Object.entries(t))typeof p=="boolean"&&(f=!0),p===!0&&h.push(m.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(f){u["data-headlessui-state"]=h.join(" ");for(let m of h)u[`data-${m}`]=""}}if(s===v.Fragment&&(Object.keys(bi(l)).length>0||Object.keys(bi(u)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(bi(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(bi(l)).concat(Object.keys(bi(u))).map(f=>` - ${f}`).join(`
|
|
105
|
+
*/var Ze=typeof Symbol=="function"&&Symbol.for,fg=Ze?Symbol.for("react.element"):60103,pg=Ze?Symbol.for("react.portal"):60106,Fc=Ze?Symbol.for("react.fragment"):60107,Nc=Ze?Symbol.for("react.strict_mode"):60108,Lc=Ze?Symbol.for("react.profiler"):60114,Ic=Ze?Symbol.for("react.provider"):60109,$c=Ze?Symbol.for("react.context"):60110,hg=Ze?Symbol.for("react.async_mode"):60111,Bc=Ze?Symbol.for("react.concurrent_mode"):60111,zc=Ze?Symbol.for("react.forward_ref"):60112,Vc=Ze?Symbol.for("react.suspense"):60113,F4=Ze?Symbol.for("react.suspense_list"):60120,Uc=Ze?Symbol.for("react.memo"):60115,Hc=Ze?Symbol.for("react.lazy"):60116,N4=Ze?Symbol.for("react.block"):60121,L4=Ze?Symbol.for("react.fundamental"):60117,I4=Ze?Symbol.for("react.responder"):60118,$4=Ze?Symbol.for("react.scope"):60119;function Gt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case fg:switch(e=e.type,e){case hg:case Bc:case Fc:case Lc:case Nc:case Vc:return e;default:switch(e=e&&e.$$typeof,e){case $c:case zc:case Hc:case Uc:case Ic:return e;default:return t}}case pg:return t}}}function iC(e){return Gt(e)===Bc}me.AsyncMode=hg;me.ConcurrentMode=Bc;me.ContextConsumer=$c;me.ContextProvider=Ic;me.Element=fg;me.ForwardRef=zc;me.Fragment=Fc;me.Lazy=Hc;me.Memo=Uc;me.Portal=pg;me.Profiler=Lc;me.StrictMode=Nc;me.Suspense=Vc;me.isAsyncMode=function(e){return iC(e)||Gt(e)===hg};me.isConcurrentMode=iC;me.isContextConsumer=function(e){return Gt(e)===$c};me.isContextProvider=function(e){return Gt(e)===Ic};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===fg};me.isForwardRef=function(e){return Gt(e)===zc};me.isFragment=function(e){return Gt(e)===Fc};me.isLazy=function(e){return Gt(e)===Hc};me.isMemo=function(e){return Gt(e)===Uc};me.isPortal=function(e){return Gt(e)===pg};me.isProfiler=function(e){return Gt(e)===Lc};me.isStrictMode=function(e){return Gt(e)===Nc};me.isSuspense=function(e){return Gt(e)===Vc};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fc||e===Bc||e===Lc||e===Nc||e===Vc||e===F4||typeof e=="object"&&e!==null&&(e.$$typeof===Hc||e.$$typeof===Uc||e.$$typeof===Ic||e.$$typeof===$c||e.$$typeof===zc||e.$$typeof===L4||e.$$typeof===I4||e.$$typeof===$4||e.$$typeof===N4)};me.typeOf=Gt;rC.exports=me;var B4=rC.exports,sC=B4,z4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},oC={};oC[sC.ForwardRef]=z4;oC[sC.Memo]=V4;function Ye(){return Ye=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},Ye.apply(this,arguments)}function aC(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 Wc=v.createContext(void 0);Wc.displayName="FormikContext";Wc.Provider;Wc.Consumer;function U4(){var e=v.useContext(Wc);return e}var mn=function(t){return typeof t=="function"},qc=function(t){return t!==null&&typeof t=="object"},H4=function(t){return String(Math.floor(Number(t)))===t},Yd=function(t){return Object.prototype.toString.call(t)==="[object String]"},Kd=function(t){return qc(t)&&mn(t.then)};function Lt(e,t,n,r){r===void 0&&(r=0);for(var i=nC(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Vi(e,t,n){for(var r=ix(e),i=r,s=0,o=nC(t);s<o.length-1;s++){var a=o[s],l=Lt(e,o.slice(0,s+1));if(l&&(qc(l)||Array.isArray(l)))i=i[a]=ix(l);else{var c=o[s+1];i=i[a]=H4(c)&&Number(c)>=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 lC(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];qc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},lC(a,t,n,r[o])):r[o]=t}return r}function W4(e,t){switch(t.type){case"SET_VALUES":return Ye({},e,{values:t.payload});case"SET_TOUCHED":return Ye({},e,{touched:t.payload});case"SET_ERRORS":return wi(e.errors,t.payload)?e:Ye({},e,{errors:t.payload});case"SET_STATUS":return Ye({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ye({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ye({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ye({},e,{values:Vi(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ye({},e,{touched:Vi(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ye({},e,{errors:Vi(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ye({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ye({},e,{touched:lC(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ye({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ye({},e,{isSubmitting:!1});default:return e}}var gi={},Ll={};function q4(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,c=l===void 0?!1:l,d=e.onSubmit,u=aC(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Ye({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:d},u),p=v.useRef(f.initialValues),h=v.useRef(f.initialErrors||gi),m=v.useRef(f.initialTouched||Ll),x=v.useRef(f.initialStatus),g=v.useRef(!1),w=v.useRef({});v.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var b=v.useState(0),k=b[1],T=v.useRef({values:Nl(f.initialValues),errors:Nl(f.initialErrors)||gi,touched:Nl(f.initialTouched)||Ll,status:Nl(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),E=T.current,_=v.useCallback(function(R){var z=T.current;T.current=W4(z,R),z!==T.current&&k(function(A){return A+1})},[]),j=v.useCallback(function(R,z){return new Promise(function(A,D){var G=f.validate(R,z);G==null?A(gi):Kd(G)?G.then(function(X){A(X||gi)},function(X){D(X)}):A(G)})},[f.validate]),M=v.useCallback(function(R,z){var A=f.validationSchema,D=mn(A)?A(z):A,G=z&&D.validateAt?D.validateAt(z,R):Q4(R,D);return new Promise(function(X,ae){G.then(function(){X(gi)},function(Ve){Ve.name==="ValidationError"?X(G4(Ve)):ae(Ve)})})},[f.validationSchema]),P=v.useCallback(function(R,z){return new Promise(function(A){return A(w.current[R].validate(z))})},[]),I=v.useCallback(function(R){var z=Object.keys(w.current).filter(function(D){return mn(w.current[D].validate)}),A=z.length>0?z.map(function(D){return P(D,Lt(R,D))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(A).then(function(D){return D.reduce(function(G,X,ae){return X==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||X&&(G=Vi(G,z[ae],X)),G},{})})},[P]),F=v.useCallback(function(R){return Promise.all([I(R),f.validationSchema?M(R):{},f.validate?j(R):{}]).then(function(z){var A=z[0],D=z[1],G=z[2],X=Qp.all([A,D,G],{arrayMerge:Y4});return X})},[f.validate,f.validationSchema,I,j,M]),B=Xt(function(R){return R===void 0&&(R=E.values),_({type:"SET_ISVALIDATING",payload:!0}),F(R).then(function(z){return g.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:z})),z})});v.useEffect(function(){o&&g.current===!0&&wi(p.current,f.initialValues)&&B(p.current)},[o,B]);var V=v.useCallback(function(R){var z=R&&R.values?R.values:p.current,A=R&&R.errors?R.errors:h.current?h.current:f.initialErrors||{},D=R&&R.touched?R.touched:m.current?m.current:f.initialTouched||{},G=R&&R.status?R.status:x.current?x.current:f.initialStatus;p.current=z,h.current=A,m.current=D,x.current=G;var X=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!R&&!!R.isSubmitting,errors:A,touched:D,status:G,values:z,isValidating:!!R&&!!R.isValidating,submitCount:R&&R.submitCount&&typeof R.submitCount=="number"?R.submitCount:0}})};if(f.onReset){var ae=f.onReset(E.values,di);Kd(ae)?ae.then(X):X()}else X()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);v.useEffect(function(){g.current===!0&&!wi(p.current,f.initialValues)&&c&&(p.current=f.initialValues,V(),o&&B(p.current))},[c,f.initialValues,V,o,B]),v.useEffect(function(){c&&g.current===!0&&!wi(h.current,f.initialErrors)&&(h.current=f.initialErrors||gi,_({type:"SET_ERRORS",payload:f.initialErrors||gi}))},[c,f.initialErrors]),v.useEffect(function(){c&&g.current===!0&&!wi(m.current,f.initialTouched)&&(m.current=f.initialTouched||Ll,_({type:"SET_TOUCHED",payload:f.initialTouched||Ll}))},[c,f.initialTouched]),v.useEffect(function(){c&&g.current===!0&&!wi(x.current,f.initialStatus)&&(x.current=f.initialStatus,_({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var re=Xt(function(R){if(w.current[R]&&mn(w.current[R].validate)){var z=Lt(E.values,R),A=w.current[R].validate(z);return Kd(A)?(_({type:"SET_ISVALIDATING",payload:!0}),A.then(function(D){return D}).then(function(D){_({type:"SET_FIELD_ERROR",payload:{field:R,value:D}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:R,value:A}}),Promise.resolve(A))}else if(f.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),M(E.values,R).then(function(D){return D}).then(function(D){_({type:"SET_FIELD_ERROR",payload:{field:R,value:Lt(D,R)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),J=v.useCallback(function(R,z){var A=z.validate;w.current[R]={validate:A}},[]),te=v.useCallback(function(R){delete w.current[R]},[]),O=Xt(function(R,z){_({type:"SET_TOUCHED",payload:R});var A=z===void 0?i:z;return A?B(E.values):Promise.resolve()}),$=v.useCallback(function(R){_({type:"SET_ERRORS",payload:R})},[]),H=Xt(function(R,z){var A=mn(R)?R(E.values):R;_({type:"SET_VALUES",payload:A});var D=z===void 0?n:z;return D?B(A):Promise.resolve()}),q=v.useCallback(function(R,z){_({type:"SET_FIELD_ERROR",payload:{field:R,value:z}})},[]),Q=Xt(function(R,z,A){_({type:"SET_FIELD_VALUE",payload:{field:R,value:z}});var D=A===void 0?n:A;return D?B(Vi(E.values,R,z)):Promise.resolve()}),ee=v.useCallback(function(R,z){var A=z,D=R,G;if(!Yd(R)){R.persist&&R.persist();var X=R.target?R.target:R.currentTarget,ae=X.type,Ve=X.name,tt=X.id,Pn=X.value,Qt=X.checked,ps=X.outerHTML,Xn=X.options,xr=X.multiple;A=z||Ve||tt,D=/number|range/.test(ae)?(G=parseFloat(Pn),isNaN(G)?"":G):/checkbox/.test(ae)?X4(Lt(E.values,A),Qt,Pn):Xn&&xr?K4(Xn):Pn}A&&Q(A,D)},[Q,E.values]),ce=Xt(function(R){if(Yd(R))return function(z){return ee(z,R)};ee(R)}),ve=Xt(function(R,z,A){z===void 0&&(z=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:R,value:z}});var D=A===void 0?i:A;return D?B(E.values):Promise.resolve()}),ne=v.useCallback(function(R,z){R.persist&&R.persist();var A=R.target,D=A.name,G=A.id,X=A.outerHTML,ae=z||D||G;ve(ae,!0)},[ve]),Ne=Xt(function(R){if(Yd(R))return function(z){return ne(z,R)};ne(R)}),Je=v.useCallback(function(R){mn(R)?_({type:"SET_FORMIK_STATE",payload:R}):_({type:"SET_FORMIK_STATE",payload:function(){return R}})},[]),et=v.useCallback(function(R){_({type:"SET_STATUS",payload:R})},[]),Ft=v.useCallback(function(R){_({type:"SET_ISSUBMITTING",payload:R})},[]),_n=Xt(function(){return _({type:"SUBMIT_ATTEMPT"}),B().then(function(R){var z=R instanceof Error,A=!z&&Object.keys(R).length===0;if(A){var D;try{if(D=gr(),D===void 0)return}catch(G){throw G}return Promise.resolve(D).then(function(G){return g.current&&_({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(g.current)throw _({type:"SUBMIT_FAILURE"}),G})}else if(g.current&&(_({type:"SUBMIT_FAILURE"}),z))throw R})}),dn=Xt(function(R){R&&R.preventDefault&&mn(R.preventDefault)&&R.preventDefault(),R&&R.stopPropagation&&mn(R.stopPropagation)&&R.stopPropagation(),_n().catch(function(z){console.warn("Warning: An unhandled error was caught from submitForm()",z)})}),di={resetForm:V,validateForm:B,validateField:re,setErrors:$,setFieldError:q,setFieldTouched:ve,setFieldValue:Q,setStatus:et,setSubmitting:Ft,setTouched:O,setValues:H,setFormikState:Je,submitForm:_n},gr=Xt(function(){return d(E.values,di)}),fs=Xt(function(R){R&&R.preventDefault&&mn(R.preventDefault)&&R.preventDefault(),R&&R.stopPropagation&&mn(R.stopPropagation)&&R.stopPropagation(),V()}),fi=v.useCallback(function(R){return{value:Lt(E.values,R),error:Lt(E.errors,R),touched:!!Lt(E.touched,R),initialValue:Lt(p.current,R),initialTouched:!!Lt(m.current,R),initialError:Lt(h.current,R)}},[E.errors,E.touched,E.values]),Ct=v.useCallback(function(R){return{setValue:function(A,D){return Q(R,A,D)},setTouched:function(A,D){return ve(R,A,D)},setError:function(A){return q(R,A)}}},[Q,ve,q]),vr=v.useCallback(function(R){var z=qc(R),A=z?R.name:R,D=Lt(E.values,A),G={name:A,value:D,onChange:ce,onBlur:Ne};if(z){var X=R.type,ae=R.value,Ve=R.as,tt=R.multiple;X==="checkbox"?ae===void 0?G.checked=!!D:(G.checked=!!(Array.isArray(D)&&~D.indexOf(ae)),G.value=ae):X==="radio"?(G.checked=D===ae,G.value=ae):Ve==="select"&&tt&&(G.value=G.value||[],G.multiple=!0)}return G},[Ne,ce,E.values]),Ge=v.useMemo(function(){return!wi(p.current,E.values)},[p.current,E.values]),yr=v.useMemo(function(){return typeof a<"u"?Ge?E.errors&&Object.keys(E.errors).length===0:a!==!1&&mn(a)?a(f):a:E.errors&&Object.keys(E.errors).length===0},[a,Ge,E.errors,f]),_o=Ye({},E,{initialValues:p.current,initialErrors:h.current,initialTouched:m.current,initialStatus:x.current,handleBlur:Ne,handleChange:ce,handleReset:fs,handleSubmit:dn,resetForm:V,setErrors:$,setFormikState:Je,setFieldTouched:ve,setFieldValue:Q,setFieldError:q,setStatus:et,setSubmitting:Ft,setTouched:O,setValues:H,submitForm:_n,validateForm:B,validateField:re,isValid:yr,dirty:Ge,unregisterField:te,registerField:J,getFieldProps:vr,getFieldMeta:fi,getFieldHelpers:Ct,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return _o}function G4(e){var t={};if(e.inner){if(e.inner.length===0)return Vi(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;Lt(t,o.path)||(t=Vi(t,o.path,o.message))}}return t}function Q4(e,t,n,r){n===void 0&&(n=!1);var i=eh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function eh(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||M0(i)?eh(i):i!==""?i:void 0}):M0(e[r])?t[r]=eh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function Y4(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?Qp(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=Qp(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function K4(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function X4(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 Z4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function Xt(e){var t=v.useRef(e);return Z4(function(){t.current=e}),v.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 J4=v.forwardRef(function(e,t){var n=e.action,r=aC(e,["action"]),i=n??"#",s=U4(),o=s.handleReset,a=s.handleSubmit;return v.createElement("form",Ye({onSubmit:a,ref:t,onReset:o,action:i},r))});J4.displayName="Form";const uC=({init:e,schema:t,action:n})=>q4({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function eL(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 tL=e=>{switch(e){case"success":return iL;case"info":return oL;case"warning":return sL;case"error":return aL;default:return null}},nL=Array(12).fill(0),rL=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},nL.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),iL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),sL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.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"})),oL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),aL=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),lL=N.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"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),uL=()=>{const[e,t]=N.useState(document.hidden);return N.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let th=1;class cL{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:th++,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 c=>{if(o=["resolve",c],N.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(fL(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,p=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...p})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,p=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:f,...p})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,p=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:f,...p})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,f=typeof d=="object"?d:{message:d};this.create({id:r,type:"error",description:u,...f})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>o[0]==="reject"?d(o[1]):c(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)||th++;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 Pt=new cL,dL=(e,t)=>{const n=(t==null?void 0:t.id)||th++;return Pt.addToast({title:e,...t,id:n}),n},fL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",pL=dL,hL=()=>Pt.toasts,mL=()=>Pt.getActiveToasts(),cC=Object.assign(pL,{success:Pt.success,info:Pt.info,warning:Pt.warning,error:Pt.error,custom:Pt.custom,message:Pt.message,promise:Pt.promise,dismiss:Pt.dismiss,loading:Pt.loading},{getHistory:hL,getToasts:mL});eL("[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 Il(e){return e.label!==void 0}const gL=3,vL="24px",yL="16px",ax=4e3,xL=356,wL=14,bL=45,SL=200;function An(...e){return e.filter(Boolean).join(" ")}function kL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const CL=e=>{var t,n,r,i,s,o,a,l,c;const{invert:d,toast:u,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:x,index:g,toasts:w,expanded:b,removeToast:k,defaultRichColors:T,closeButton:E,style:_,cancelButtonStyle:j,actionButtonStyle:M,className:P="",descriptionClassName:I="",duration:F,position:B,gap:V,expandByDefault:re,classNames:J,icons:te,closeButtonAriaLabel:O="Close toast"}=e,[$,H]=N.useState(null),[q,Q]=N.useState(null),[ee,ce]=N.useState(!1),[ve,ne]=N.useState(!1),[Ne,Je]=N.useState(!1),[et,Ft]=N.useState(!1),[_n,dn]=N.useState(!1),[di,gr]=N.useState(0),[fs,fi]=N.useState(0),Ct=N.useRef(u.duration||F||ax),vr=N.useRef(null),Ge=N.useRef(null),yr=g===0,_o=g+1<=m,R=u.type,z=u.dismissible!==!1,A=u.className||"",D=u.descriptionClassName||"",G=N.useMemo(()=>x.findIndex(ie=>ie.toastId===u.id)||0,[x,u.id]),X=N.useMemo(()=>{var ie;return(ie=u.closeButton)!=null?ie:E},[u.closeButton,E]),ae=N.useMemo(()=>u.duration||F||ax,[u.duration,F]),Ve=N.useRef(0),tt=N.useRef(0),Pn=N.useRef(0),Qt=N.useRef(null),[ps,Xn]=B.split("-"),xr=N.useMemo(()=>x.reduce((ie,Qe,lt)=>lt>=G?ie:ie+Qe.height,0),[x,G]),hs=uL(),Po=u.invert||d,pi=R==="loading";tt.current=N.useMemo(()=>G*V+xr,[G,xr]),N.useEffect(()=>{Ct.current=ae},[ae]),N.useEffect(()=>{ce(!0)},[]),N.useEffect(()=>{const ie=Ge.current;if(ie){const Qe=ie.getBoundingClientRect().height;return fi(Qe),h(lt=>[{toastId:u.id,height:Qe,position:u.position},...lt]),()=>h(lt=>lt.filter(Nt=>Nt.toastId!==u.id))}},[h,u.id]),N.useLayoutEffect(()=>{if(!ee)return;const ie=Ge.current,Qe=ie.style.height;ie.style.height="auto";const lt=ie.getBoundingClientRect().height;ie.style.height=Qe,fi(lt),h(Nt=>Nt.find(nt=>nt.toastId===u.id)?Nt.map(nt=>nt.toastId===u.id?{...nt,height:lt}:nt):[{toastId:u.id,height:lt,position:u.position},...Nt])},[ee,u.title,u.description,h,u.id]);const jn=N.useCallback(()=>{ne(!0),gr(tt.current),h(ie=>ie.filter(Qe=>Qe.toastId!==u.id)),setTimeout(()=>{k(u)},SL)},[u,k,h,tt]);N.useEffect(()=>{if(u.promise&&R==="loading"||u.duration===1/0||u.type==="loading")return;let ie;return b||p||hs?(()=>{if(Pn.current<Ve.current){const Nt=new Date().getTime()-Ve.current;Ct.current=Ct.current-Nt}Pn.current=new Date().getTime()})():(()=>{Ct.current!==1/0&&(Ve.current=new Date().getTime(),ie=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),jn()},Ct.current))})(),()=>clearTimeout(ie)},[b,p,u,R,hs,jn]),N.useEffect(()=>{u.delete&&jn()},[jn,u.delete]);function qC(){var ie;if(te!=null&&te.loading){var Qe;return N.createElement("div",{className:An(J==null?void 0:J.loader,u==null||(Qe=u.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":R==="loading"},te.loading)}return N.createElement(rL,{className:An(J==null?void 0:J.loader,u==null||(ie=u.classNames)==null?void 0:ie.loader),visible:R==="loading"})}var bg,Sg;return N.createElement("li",{tabIndex:0,ref:Ge,className:An(P,A,J==null?void 0:J.toast,u==null||(t=u.classNames)==null?void 0:t.toast,J==null?void 0:J.default,J==null?void 0:J[R],u==null||(n=u.classNames)==null?void 0:n[R]),"data-sonner-toast":"","data-rich-colors":(bg=u.richColors)!=null?bg:T,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":ee,"data-promise":!!u.promise,"data-swiped":_n,"data-removed":ve,"data-visible":_o,"data-y-position":ps,"data-x-position":Xn,"data-index":g,"data-front":yr,"data-swiping":Ne,"data-dismissible":z,"data-type":R,"data-invert":Po,"data-swipe-out":et,"data-swipe-direction":q,"data-expanded":!!(b||re&&ee),style:{"--index":g,"--toasts-before":g,"--z-index":w.length-g,"--offset":`${ve?di:tt.current}px`,"--initial-height":re?"auto":`${fs}px`,..._,...u.style},onDragEnd:()=>{Je(!1),H(null),Qt.current=null},onPointerDown:ie=>{pi||!z||(vr.current=new Date,gr(tt.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(Je(!0),Qt.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,Qe,lt;if(et||!z)return;Qt.current=null;const Nt=Number(((ie=Ge.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ll=Number(((Qe=Ge.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),nt=new Date().getTime()-((lt=vr.current)==null?void 0:lt.getTime()),Yt=$==="x"?Nt:ll,ul=Math.abs(Yt)/nt;if(Math.abs(Yt)>=bL||ul>.11){gr(tt.current),u.onDismiss==null||u.onDismiss.call(u,u),Q($==="x"?Nt>0?"right":"left":ll>0?"down":"up"),jn(),Ft(!0);return}else{var fn,pn;(fn=Ge.current)==null||fn.style.setProperty("--swipe-amount-x","0px"),(pn=Ge.current)==null||pn.style.setProperty("--swipe-amount-y","0px")}dn(!1),Je(!1),H(null)},onPointerMove:ie=>{var Qe,lt,Nt;if(!Qt.current||!z||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;const nt=ie.clientY-Qt.current.y,Yt=ie.clientX-Qt.current.x;var ul;const fn=(ul=e.swipeDirections)!=null?ul:kL(B);!$&&(Math.abs(Yt)>1||Math.abs(nt)>1)&&H(Math.abs(Yt)>Math.abs(nt)?"x":"y");let pn={x:0,y:0};const kg=hi=>1/(1.5+Math.abs(hi)/20);if($==="y"){if(fn.includes("top")||fn.includes("bottom"))if(fn.includes("top")&&nt<0||fn.includes("bottom")&&nt>0)pn.y=nt;else{const hi=nt*kg(nt);pn.y=Math.abs(hi)<Math.abs(nt)?hi:nt}}else if($==="x"&&(fn.includes("left")||fn.includes("right")))if(fn.includes("left")&&Yt<0||fn.includes("right")&&Yt>0)pn.x=Yt;else{const hi=Yt*kg(Yt);pn.x=Math.abs(hi)<Math.abs(Yt)?hi:Yt}(Math.abs(pn.x)>0||Math.abs(pn.y)>0)&&dn(!0),(lt=Ge.current)==null||lt.style.setProperty("--swipe-amount-x",`${pn.x}px`),(Nt=Ge.current)==null||Nt.style.setProperty("--swipe-amount-y",`${pn.y}px`)}},X&&!u.jsx&&R!=="loading"?N.createElement("button",{"aria-label":O,"data-disabled":pi,"data-close-button":!0,onClick:pi||!z?()=>{}:()=>{jn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:An(J==null?void 0:J.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Sg=te==null?void 0:te.close)!=null?Sg:lL):null,R||u.icon||u.promise?N.createElement("div",{"data-icon":"",className:An(J==null?void 0:J.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||qC():null,u.type!=="loading"?u.icon||(te==null?void 0:te[R])||tL(R):null):null,N.createElement("div",{"data-content":"",className:An(J==null?void 0:J.content,u==null||(s=u.classNames)==null?void 0:s.content)},N.createElement("div",{"data-title":"",className:An(J==null?void 0:J.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?N.createElement("div",{"data-description":"",className:An(I,D,J==null?void 0:J.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),N.isValidElement(u.cancel)?u.cancel:u.cancel&&Il(u.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||j,onClick:ie=>{Il(u.cancel)&&z&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,ie),jn())},className:An(J==null?void 0:J.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,N.isValidElement(u.action)?u.action:u.action&&Il(u.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||M,onClick:ie=>{Il(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,ie),!ie.defaultPrevented&&jn())},className:An(J==null?void 0:J.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function lx(){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 TL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?yL:vL;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const EL=N.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:p,style:h,visibleToasts:m=gL,toastOptions:x,dir:g=lx(),gap:w=wL,icons:b,containerAriaLabel:k="Notifications"}=t,[T,E]=N.useState([]),_=N.useMemo(()=>Array.from(new Set([i].concat(T.filter(q=>q.position).map(q=>q.position)))),[T,i]),[j,M]=N.useState([]),[P,I]=N.useState(!1),[F,B]=N.useState(!1),[V,re]=N.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=N.useRef(null),te=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=N.useRef(null),$=N.useRef(!1),H=N.useCallback(q=>{E(Q=>{var ee;return(ee=Q.find(ce=>ce.id===q.id))!=null&&ee.delete||Pt.dismiss(q.id),Q.filter(({id:ce})=>ce!==q.id)})},[]);return N.useEffect(()=>Pt.subscribe(q=>{if(q.dismiss){const Q=T.map(ee=>ee.id===q.id?{...ee,delete:!0}:ee);requestAnimationFrame(()=>{E(Q)});return}setTimeout(()=>{w_.flushSync(()=>{E(Q=>{const ee=Q.findIndex(ce=>ce.id===q.id);return ee!==-1?[...Q.slice(0,ee),{...Q[ee],...q},...Q.slice(ee+1)]:[q,...Q]})})})}),[T]),N.useEffect(()=>{if(u!=="system"){re(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:Q})=>{re(Q?"dark":"light")})}catch{q.addListener(({matches:ee})=>{try{re(ee?"dark":"light")}catch(ce){console.error(ce)}})}},[u]),N.useEffect(()=>{T.length<=1&&I(!1)},[T]),N.useEffect(()=>{const q=Q=>{var ee;if(s.every(ne=>Q[ne]||Q.code===ne)){var ve;I(!0),(ve=J.current)==null||ve.focus()}Q.code==="Escape"&&(document.activeElement===J.current||(ee=J.current)!=null&&ee.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[s]),N.useEffect(()=>{if(J.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,$.current=!1)}},[J.current]),N.createElement("section",{ref:n,"aria-label":`${k} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((q,Q)=>{var ee;const[ce,ve]=q.split("-");return T.length?N.createElement("ol",{key:q,dir:g==="auto"?lx():g,tabIndex:-1,ref:J,className:l,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":ce,"data-lifted":P&&T.length>1&&!o,"data-x-position":ve,style:{"--front-toast-height":`${((ee=j[0])==null?void 0:ee.height)||0}px`,"--width":`${xL}px`,"--gap":`${w}px`,...h,...TL(c,d)},onBlur:ne=>{$.current&&!ne.currentTarget.contains(ne.relatedTarget)&&($.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||$.current||($.current=!0,O.current=ne.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{F||I(!1)},onDragEnd:()=>I(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},T.filter(ne=>!ne.position&&Q===0||ne.position===q).map((ne,Ne)=>{var Je,et;return N.createElement(CL,{key:ne.id,icons:b,index:Ne,toast:ne,defaultRichColors:f,duration:(Je=x==null?void 0:x.duration)!=null?Je:p,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:r,visibleToasts:m,closeButton:(et=x==null?void 0:x.closeButton)!=null?et:a,interacting:F,position:q,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:H,toasts:T.filter(Ft=>Ft.position==ne.position),heights:j.filter(Ft=>Ft.position==ne.position),setHeights:M,expandByDefault:o,gap:w,expanded:P,swipeDirections:t.swipeDirections})})):null}))});function Us(e){return cC.custom(t=>y.jsx(_L,{id:t,title:e.title,description:e.description,variant:e.variant}))}const Xd={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 _L(e){const{title:t,description:n,button:r,id:i,variant:s}=e;return y.jsxs("div",{className:ge("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",Xd[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:ge("text-sm font-medium",Xd[s||"info"].text),children:t}),y.jsx("p",{className:ge("text-sm",Xd[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(),cC.dismiss(i)},children:r.label})})]})}function PL(e){return Array.isArray(e)&&e[0].field!==void 0}const dC=(e,t)=>{var n;if(PL(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||Us({description:e.message,variant:"error"});return}if(e&&e.error){t!=null&&t.noToast||Us({description:e.error,variant:"error"});return}};function jL(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 mg({id:e,text:t,className:n,required:r}){const i=Oe();return t?y.jsxs("label",{htmlFor:e,className:ge("mb-1 block text-sm font-medium",n),style:{color:i.getColor(C.InputText)},children:[t,r&&y.jsx("span",{className:"ml-1",style:{color:i.getColor(C.ErrorText)},children:"*"})]}):null}const Zd={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function RL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:d,ariaInvalid:u,ariaLabel:f,autoFocus:p,...h}){const m=Oe();return y.jsxs("div",{className:ge({"mb-2":!o},d),children:[y.jsx(mg,{id:e,text:t,required:a}),y.jsxs("div",{className:"flex items-center",children:[r&&y.jsx("span",{className:ge("inline-block border border-solid border-r-0 rounded-l-md",Zd[i]),style:{borderColor:l?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),backgroundColor:m.getColor(C.InputBackground),borderRadius:m.getRadius()},children:r}),y.jsx("input",{id:e,className:ge("border border-solid block text-base py-2 px-3 w-full focus:outline-hidden",Zd[i],{"rounded-l-none":!!r,"rounded-r-none":!!n}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":f,style:{color:l?m.getColor(C.ErrorText):m.getColor(C.InputText),backgroundColor:m.getColor(C.InputBackground),borderColor:l?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),borderRadius:m.getRadius()},...h}),n&&y.jsx("span",{className:ge("inline-block border border-solid border-l-0 rounded-r-md",Zd[i]),style:{borderColor:l?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),backgroundColor:m.getColor(C.InputBackground),borderRadius:m.getRadius()},children:n})]}),!!l&&y.jsx("p",{className:"mt-1 text-xs",style:{color:m.getColor(C.ErrorText)},children:l})]})}const AL=(e,t)=>{document.cookie=`${e}=${t}`},fC=v.createContext({}),OL=()=>`${window.location.pathname}_$$_${document.title}`,DL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},ML=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function FL({children:e}){const[t,n]=v.useState("/"),[r,i]=v.useState(ML());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(fC.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function gg(){return v.useContext(fC)}function NL({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(mg,{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 ux={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:""}},LL={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"},IL={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"},$L={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 BL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:d="ring",reversed:u=!1,variant:f="blue",error:p,...h}){return y.jsxs("div",{children:[y.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${ux[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 ${LL[f]} ${IL[c]} ${ux[d].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.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(fe.Check,{className:$L[c]})})]}),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 zL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return y.jsxs("label",{htmlFor:e,className:ge("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 VL({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 cx=Object.assign(zL,{Group:VL});function vg({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:d,inputRef:u,autoFocus:f=!0,style:p,...h}){const m=Oe();return y.jsxs("div",{className:ge({"mb-2":!s},i),children:[t&&y.jsx(mg,{id:e,text:t,required:l}),y.jsx("textarea",{className:ge("resize-none max-h-36 w-full py-2 px-3 border border-solid block focus:outline-hidden"),id:e,rows:o,"aria-invalid":d,...h,ref:u,autoFocus:f,style:{...p,color:c?m.getColor(C.ErrorText):m.getColor(C.InputText),backgroundColor:m.getColor(C.InputBackground),borderColor:c?m.getColor(C.ErrorBorder):m.getColor(C.InputBorder),borderRadius:m.getRadius()}}),!!c&&y.jsx("p",{className:"mt-1 text-xs",style:{color:m.getColor(C.ErrorText)},children:c})]})}function UL({onOk:e,clientId:t,widgetId:n,appearance:r}){var w,b,k,T,E,_,j,M;const i=Oe(),{defaultValues:s,widget:o,setIsHaveChat:a}=kt(),[l,c]=v.useState(!1),d=gg(),u=PD(),f=!!s&&"username"in s,p=(b=(w=r==null?void 0:r.body)==null?void 0:w.inputs)==null?void 0:b.reduce((P,I)=>{let F=I.remember?au(I.name):s==null?void 0:s[I.name];return I.options&&F&&!I.options.includes(F)&&(F=void 0),I.name==="username"&&f&&(F=s.username),P[I.name]=F||"",P},{}),h=(T=(k=r==null?void 0:r.body)==null?void 0:k.inputs)==null?void 0:T.reduce((P,I)=>(P[I.name]="",P),{}),m=ng((_=(E=r==null?void 0:r.body)==null?void 0:E.inputs)==null?void 0:_.reduce((P,I)=>(P[I.name]=I.required?Yu().required(`${I.label} alanı zorunludur`):Yu(),P),{})),x=uC({init:{...p},schema:m,action:async P=>{var I;if(!l){c(!0);try{f&&(P.username=s.username),s!=null&&s.secret_data&&(P.secret_data=s.secret_data);for(const V in P)typeof P[V]=="string"&&(P[V]=P[V].trim());const[F,B]=await u.mutateAsync({inputs:P,history:d.history,client_id:t,widget_id:n});if(vc(B)){_D(F)&&(Hd(Gn.CustomerToken,F.customer_token,(o==null?void 0:o.link_id)||""),Hd(Gn.CustomerRefreshToken,F.customer_refresh_token,(o==null?void 0:o.link_id)||""),Hd(Gn.DeviceId,F.device_id,(o==null?void 0:o.link_id)||"")),d.clearHistory();for(const V of((I=r==null?void 0:r.body)==null?void 0:I.inputs)||[])V.remember&&AL(V.name,P[V.name]);a(!0),e==null||e();return}dC(F,{form:x})}catch(F){console.error("Chat creation error:",F)}finally{c(!1)}}}}),g=!jL(h||{},(x==null?void 0:x.values)||{});return y.jsx("section",{className:"h-full overflow-y-auto px-4 py-3",style:{backgroundColor:i.getColor(C.GreeterBackground)},children:y.jsxs("form",{autoComplete:"off",className:"grid grid-cols-1 gap-2",onSubmit:P=>{P.preventDefault(),x.handleSubmit()},children:[(M=(j=r==null?void 0:r.body)==null?void 0:j.inputs)==null?void 0:M.map(P=>{var I,F;if(["text","email","phone"].includes(P.type))return y.jsx(RL,{id:P.name,name:P.name,type:P.type,label:P.label,value:x.values[P.name],onChange:x.handleChange,onBlur:x.handleBlur,disabled:P.name==="username"&&f,readOnly:P.name==="username"&&f,autoComplete:"off",placeholder:P.placeholder,error:x.errors[P.name],ariaInvalid:x.errors.name?!0:void 0,required:P.required,noMargin:!0},P.name);if(P.type==="select")return y.jsx(NL,{id:P.name,name:P.name,value:x.values[P.name],onChange:x.handleChange,label:P.label,error:x.errors[P.name],required:P.required,children:(I=P.options)==null?void 0:I.map(B=>y.jsx("option",{value:B,children:B},B))},P.name);if(P.type==="checkbox")return y.jsx(BL,{id:P.name,name:P.name,value:x.values[P.name],checked:x.values[P.name]==="true",onChange:x.handleChange,required:P.required,error:x.errors[P.name],children:P.label},P.name);if(P.type==="radio")return y.jsx(cx.Group,{id:P.name,label:P.label,required:P.required,error:x.errors[P.name],children:(F=P.options)==null?void 0:F.map(B=>y.jsx(cx,{onChange:V=>{V?x.setFieldValue(P.name,B):x.setFieldValue(P.name,"")},id:B,name:P.name,value:B===x.values[P.name],children:B},B))},P.name);if(P.type==="textarea")return y.jsx(vg,{id:P.name,name:P.name,value:x.values[P.name],onChange:x.handleChange,placeholder:P.placeholder,error:x.errors[P.name],required:P.required,label:P.label},P.name)}),y.jsx(on,{textKey:C.GreeterButtonText,bgKey:C.GreeterButtonBackground,type:"submit",disabled:!g||l,className:"mt-2 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:l?"Yükleniyor...":"Sohbet Oluştur"})]})})}function HL({onClose:e}){const t=Oe();return y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2 hover:opacity-80 transition-opacity",style:{backgroundColor:t.getColor(C.CloseButtonBackground),color:t.getColor(C.CloseButtonText)},withoutTheming:!0,children:y.jsx(fe.X,{className:"size-5",style:{color:t.getColor(C.CloseButtonText)}})})}function WL({image_url:e,name:t,size:n="size-9"}){const r=Oe();return e?y.jsx("img",{src:e,alt:t,className:ge("rounded-md",n)}):y.jsx("div",{className:"flex items-center justify-center gap-1",children:y.jsx(fe.Website,{className:ge(n),style:{color:r.getColor(C.IconColor)}})})}function qL(){const e=gg(),t=v.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return Km("popstate",t),null}function GL(){const e=ui(),t=gg(),n=v.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(En.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return Km("popstate",n),v.useEffect(()=>{if(!e)return;const r=DL(),i=OL();r!==i&&(e.emit(En.PageChange,{page:i}),t.setPage(i))},[e]),null}function QL({children:e}){const t=Oe(),{widget:n}=kt();if(!n)return null;const r=is();return y.jsx(Kr,{children:y.jsxs(be.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(be.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(C.GreeterTopBackground)},className:`h-44 absolute top-0 left-0 w-full ${r?"":"rounded-t-xl"} flex flex-col items-center justify-center shadow-sm`}),e]})})}function YL(){return qL(),null}const Jd=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function KL(){var f,p,h,m,x,g;const e=Oe(),{widget:t,setOpen:n}=kt(),r=il(),[i,s]=v.useState(!0),o=Pc(),a=is();if(!t)return null;const l=()=>{n(!1)};if(v.useEffect(()=>{if(!r||!r.accessToken){s(!1);return}jD(t.client_id,ho(r)).then(([w,b])=>{vc(b)?o.push("chat"):Vp(t.link_id||"")}).finally(()=>{s(!1)})},[]),i)return null;const c=Jd(((p=(f=t.appearance)==null?void 0:f.head)==null?void 0:p.elements)||[],"text"),d=Jd(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),u=Jd(((g=(x=t.appearance)==null?void 0:x.head)==null?void 0:g.elements)||[],"logo");return y.jsxs(QL,{children:[y.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[a&&y.jsx(HL,{onClose:l}),u&&y.jsx(be.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:y.jsx(WL,{name:t.name,image_url:u,size:"size-20"})}),d&&y.jsx(be.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(C.GreeterTopText)},className:"text-xl font-bold",children:d}),c&&y.jsx(be.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(C.GreeterTopText)},className:"text-sm opacity-90",children:c})]}),y.jsx(be.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:a?"calc(var(--app-height,100dvh) - 11rem)":"calc(100% - 11rem)"},children:y.jsx(UL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{o.push("chat")}})})]})}function XL(){return y.jsxs(y.Fragment,{children:[y.jsx(xk,{border:!0,children:y.jsx(KL,{})}),y.jsx(YL,{})]})}const ZL=[{path:"/",component:XL,name:"registration"}];var vs=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(vs||{}),Si=(e=>(e.AdminJoin="admin_join",e.ChatCreated="chat_created",e))(Si||{}),Le=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(Le||{});function JL({name:e,avatar:t,className:n="text-neutral-500",textColor:r}){return y.jsxs(be.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 flex items-center justify-center font-medium",style:{backgroundColor:"rgba(255, 255, 255, 0.2)",color:r||"white"},children:e.charAt(0).toUpperCase()})]})}),y.jsx("div",{className:"flex flex-col",children:y.jsx("span",{className:ge("line-clamp-1 font-medium",n),style:r?{color:r}:void 0,children:e})})]})}var eI=Object.defineProperty,tI=(e,t,n)=>t in e?eI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ef=(e,t,n)=>(tI(e,typeof t!="symbol"?t+"":t,n),n);let nI=class{constructor(){ef(this,"current",this.detect()),ef(this,"handoffState","pending"),ef(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"}},du=new nI;function rI(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Gc(){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 rI(()=>{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=Gc();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 pC(){let[e]=v.useState(Gc);return v.useEffect(()=>()=>e.dispose(),[e]),e}let Jr=(e,t)=>{du.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function hC(e){let t=v.useRef(e);return Jr(()=>{t.current=e},[e]),t}let or=function(e){let t=hC(e);return N.useCallback((...n)=>t.current(...n),[t])};function nh(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Qc(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,Qc),r}var mC=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(mC||{}),Br=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Br||{});function gC(){let e=sI();return v.useCallback(t=>iI({mergeRefs:e,...t}),[e])}function iI({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??oI;let l=vC(t,e);if(s)return $l(l,n,r,o,a);let c=i??0;if(c&2){let{static:d=!1,...u}=l;if(d)return $l(u,n,r,o,a)}if(c&1){let{unmount:d=!0,...u}=l;return Qc(d?0:1,{0(){return null},1(){return $l({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return $l(l,n,r,o,a)}function $l(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=tf(e,["unmount","static"]),c=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 u={};if(t){let f=!1,p=[];for(let[h,m]of Object.entries(t))typeof m=="boolean"&&(f=!0),m===!0&&p.push(h.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(f){u["data-headlessui-state"]=p.join(" ");for(let h of p)u[`data-${h}`]=""}}if(s===v.Fragment&&(Object.keys(bi(l)).length>0||Object.keys(bi(u)).length>0))if(!v.isValidElement(d)||Array.isArray(d)&&d.length>1){if(Object.keys(bi(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(bi(l)).concat(Object.keys(bi(u))).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
|
-
`))}else{let f=d.props,
|
|
109
|
-
`)),[]});var cI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(cI||{});function dI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function fI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=lI(e&&i?3:0),c=v.useRef(!1),d=v.useRef(!1),u=pC();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),pI(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.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 h;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,u]),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 pI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Gc();return mI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(hI(e,r))})}),s.dispose}function hI(e,t){var n,r;let i=Gc();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 mI(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 xg=v.createContext(null);xg.displayName="OpenClosedContext";var Ri=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ri||{});function xC(){return v.useContext(xg)}function gI({value:e,children:t}){return N.createElement(xg.Provider,{value:e},t)}function vI(){let e=typeof document>"u";return"useSyncExternalStore"in sf?(t=>t.useSyncExternalStore)(sf)(()=>()=>{},()=>!1,()=>!e):!1}function wC(){let e=vI(),[t,n]=v.useState(du.isHandoffComplete);return t&&du.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>du.handoff(),[]),e?!1:t}function yI(){let e=v.useRef(!1);return Jr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function bC(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:kC)!==v.Fragment||N.Children.count(e.children)===1}let Yc=v.createContext(null);Yc.displayName="TransitionContext";var xI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(xI||{});function wI(){let e=v.useContext(Yc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function bI(){let e=v.useContext(Kc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Kc=v.createContext(null);Kc.displayName="NestingContext";function Xc(e){return"children"in e?Xc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function SC(e,t){let n=hC(e),r=v.useRef([]),i=yI(),s=pC(),o=or((h,m=Br.Hidden)=>{let p=r.current.findIndex(({el:b})=>b===h);p!==-1&&(Qc(m,{[Br.Unmount](){r.current.splice(p,1)},[Br.Hidden](){r.current[p].state="hidden"}}),s.microTask(()=>{var b;!Xc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=or(h=>{let m=r.current.find(({el:p})=>p===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,Br.Unmount)}),l=v.useRef([]),c=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),u=or((h,m,p)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([b])=>b!==h)),t==null||t.chains.current[m].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[m].push([h,new Promise(b=>{Promise.all(d.current[m].map(([g,w])=>w)).then(()=>b())})]),m==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>p(m)):p(m)}),f=or((h,m,p)=>{Promise.all(d.current[m].splice(0).map(([b,g])=>g)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>p(m))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:f,wait:c,chains:d}),[a,o,r,u,f,d,c])}let kC=v.Fragment,CC=mC.RenderStrategy;function SI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:d,enterTo:u,entered:f,leave:h,leaveFrom:m,leaveTo:p,...b}=e,[g,w]=v.useState(null),x=v.useRef(null),k=bC(e),T=yC(...k?[x,t,w]:t===null?[]:[t]),E=(n=b.unmount)==null||n?Br.Unmount:Br.Hidden,{show:_,appear:j,initial:P}=wI(),[O,$]=v.useState(_?"visible":"hidden"),F=bI(),{register:z,unregister:G}=F;Jr(()=>z(x),[z,x]),Jr(()=>{if(E===Br.Hidden&&x.current){if(_&&O!=="visible"){$("visible");return}return Qc(O,{hidden:()=>G(x),visible:()=>z(x)})}},[O,x,z,G,_,E]);let re=wC();Jr(()=>{if(k&&re&&O==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,O,re,k]);let K=P&&!j,X=j&&_&&P,D=v.useRef(!1),I=SC(()=>{D.current||($("hidden"),G(x))},F),q=or(Ne=>{D.current=!0;let Je=Ne?"enter":"leave";I.onStart(x,Je,et=>{et==="enter"?s==null||s():et==="leave"&&(a==null||a())})}),H=or(Ne=>{let Je=Ne?"enter":"leave";D.current=!1,I.onStop(x,Je,et=>{et==="enter"?o==null||o():et==="leave"&&(l==null||l())}),Je==="leave"&&!Xc(I)&&($("hidden"),G(x))});v.useEffect(()=>{k&&i||(q(_),H(_))},[_,k,i]);let Y=!(!i||!k||!re||K),[,te]=fI(Y,g,_,{start:q,end:H}),ce=bi({ref:T,className:((r=nh(b.className,X&&c,X&&d,te.enter&&c,te.enter&&te.closed&&d,te.enter&&!te.closed&&u,te.leave&&h,te.leave&&!te.closed&&m,te.leave&&te.closed&&p,!te.transition&&_&&f))==null?void 0:r.trim())||void 0,...dI(te)}),ve=0;O==="visible"&&(ve|=Ri.Open),O==="hidden"&&(ve|=Ri.Closed),_&&O==="hidden"&&(ve|=Ri.Opening),!_&&O==="visible"&&(ve|=Ri.Closing);let ne=gC();return N.createElement(Kc.Provider,{value:I},N.createElement(gI,{value:ve},ne({ourProps:ce,theirProps:b,defaultTag:kC,features:CC,visible:O==="visible",name:"Transition.Child"})))}function kI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=bC(e),l=yC(...a?[o,t]:t===null?[]:[t]);wC();let c=xC();if(n===void 0&&c!==null&&(n=(c&Ri.Open)===Ri.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=v.useState(n?"visible":"hidden"),f=SC(()=>{n||u("hidden")}),[h,m]=v.useState(!0),p=v.useRef([n]);Jr(()=>{h!==!1&&p.current[p.current.length-1]!==n&&(p.current.push(n),m(!1))},[p,n]);let b=v.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);Jr(()=>{n?u("visible"):!Xc(f)&&o.current!==null&&u("hidden")},[n,f]);let g={unmount:i},w=or(()=>{var T;h&&m(!1),(T=e.beforeEnter)==null||T.call(e)}),x=or(()=>{var T;h&&m(!1),(T=e.beforeLeave)==null||T.call(e)}),k=gC();return N.createElement(Kc.Provider,{value:f},N.createElement(Yc.Provider,{value:b},k({ourProps:{...g,as:v.Fragment,children:N.createElement(TC,{ref:l,...g,...s,beforeEnter:w,beforeLeave:x})},theirProps:{},defaultTag:v.Fragment,features:CC,visible:d==="visible",name:"Transition"})))}function CI(e,t){let n=v.useContext(Yc)!==null,r=xC()!==null;return N.createElement(N.Fragment,null,!n&&r?N.createElement(rh,{ref:t,...e}):N.createElement(TC,{ref:t,...e}))}let rh=yg(kI),TC=yg(SI),TI=yg(CI),EI=Object.assign(rh,{Child:TI,Root:rh});const wg=v.createContext(void 0),ua=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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(wg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:y.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},_I=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(wg),c=Oe(),d=n||"font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return y.jsx("div",{children:e==="a"?y.jsx(vP,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:u+(o?" show":""),children:t}):y.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:c.getColor(C.ButtonBackground),color:c.getColor(C.ButtonText),borderRadius:c.getRadius(),...r},title:s,children:t})})},PI=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(wg),a=Oe(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[c,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const u=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),h=()=>{if(s&&c==="right-end"&&u.current){const m=u.current;m.style.position="absolute",f==="rtl"?m.style.inset="0px auto auto 0px":m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&c==="start-end"&&u.current){const m=u.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.transform="translate(0px, 20px)"}if(s&&c==="top-end"&&u.current){const m=u.current;m.style.position="absolute",m.style.inset="auto 0px 0px auto",m.style.margin="0px",m.style.transform="translate(-58px, -30px)"}if(s&&c==="bottom-start"&&u.current){const m=u.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 54px)"}if(s&&c==="bottom-end"&&u.current){const m=u.current;m.style.position="absolute",m.style.inset="0px 0px auto auto",m.style.margin="0px",m.style.transform="translate(0px, 39px)"}if(s&&c==="top-start"&&u.current){const m=u.current;m.style.position="absolute",m.style.inset="auto auto 0px 0px",m.style.margin="0px",m.style.transform="translate(0px, -95px)"}if(s&&c==="left-end"&&u.current){const m=u.current;m.style.position="absolute",m.style.inset="0px auto auto 0px",m.style.margin="0px",m.style.right="0px",m.style.transform="translate(0px, -20px)"}return{}};return y.jsx(EI,{as:N.Fragment,show:s,children:m=>y.jsx(e,{ref:u,onClick:()=>o(!1),className:`${l} ${m==="entered"?"transition-all":""}`,style:{...h(),backgroundColor:a.getColor(C.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(C.ShadowColor)}, 0 8px 10px -6px ${a.getColor(C.ShadowColor)}`,...n},children:r})})};ua.Trigger=_I;ua.Content=PI;function jI({onChatClose:e}){const[t,n]=v.useState(!1),r=Oe(),i=rl(),s=ui(),o=()=>{s==null||s.emit(En.ChatClose,{}),e()};return y.jsxs(y.Fragment,{children:[y.jsx(Kr,{children:t&&y.jsx(be.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(C.ModalOverlayColor)},children:y.jsxs(be.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},children:[y.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(C.ChatCloseConfirmText)},children:i(Q.ChatCloseConfirm)}),y.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(C.FooterText)},children:i(Q.ChatCloseWarning)}),y.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.GreeterBackground),color:r.getColor(C.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(Q.CancelAction)}),y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.ErrorBackground),color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(Q.CloseAction)})]})]})})}),y.jsxs(ua,{className:"relative flex items-center h-full",children:[y.jsx(ua.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(Q.ChatSettings),children:y.jsx(fe.Menu,{className:"size-5",style:{color:r.getColor(C.HeaderText)}})}),y.jsx(Kr,{children:!t&&y.jsx(be.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(ua.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[y.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(C.FooterText),borderBottomColor:r.getColor(C.DividerColor)},children:i(Q.ChatSettings)}),y.jsx("ul",{className:"py-2 px-2",children:y.jsx("li",{children:y.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[y.jsx(fe.X,{className:"w-4 h-4"}),y.jsx("span",{children:i(Q.ChatEndConversation)})]})})})]})})})]})]})}function RI({text:e}){const n=Oe().getColor(C.LinkColor),i=(s=>{const o=/(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,a=s.split(/(<[^>]*>)/g);let l="",c=!1;for(let d=0;d<a.length;d++){const u=a[d];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))l+=u;else{const f=u.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}c=!0}else u.match(/^<\/a>/i)?(l+=u,c=!1):l+=u;else if(!c&&u.trim()){const f=u.replace(o,h=>{const m=h.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(m)?m:`https://${m}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${m}</a>`});l+=f}else l+=u}return l})(e);return y.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const px="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function EC({files:e,className:t,onDelete:n,hideName:r}){const i=is(),[s,o]=v.useState(new Map);v.useEffect(()=>{const m=new Map;for(let p=0;p<e.length;p++){const b=e[p];if(b instanceof File){const g=URL.createObjectURL(b);m.set(p,g)}}return o(m),()=>{for(const p of m.values())URL.revokeObjectURL(p)}},[e]);const a=m=>{var b;return((b=(m instanceof File?m.name:m).split(".").pop())==null?void 0:b.toLowerCase())||""},l=m=>m instanceof File?m.name:m.split("/").pop()||m,c=m=>{const[p,b]=m.split(".");return p.length>10?`${p.slice(0,10)}...${b}`:m},d=m=>{const p=["jpg","jpeg","png","gif","bmp","webp","svg"],b=a(m);return p.includes(b)},u=(m,p)=>{if(m instanceof File){const b=s.get(p);b&&window.open(b,"_blank")}else window.open(m,"_blank")},f=(m,p)=>{m.stopPropagation(),n==null||n(p)},h=(m,p)=>m instanceof File?s.get(p)||"":m;return y.jsx("div",{className:ge("flex gap-2 w-full overflow-x-auto",t),children:e.map((m,p)=>{const b=l(m),g=a(m),w=d(m),x=h(m,p);return y.jsxs("div",{onClick:()=>u(m,p),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:k=>f(k,p),className:ge("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"})})}),w?y.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:y.jsx("img",{src:x,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:ge("text-[10px] font-medium text-gray-600 uppercase",{[px]:r}),children:g||"file"})]})}),y.jsx("div",{className:ge("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[px]:r}),title:b,children:c(b)})]},p)})})}const AI={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},OI={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function DI({buttons:e,className:t=""}){const n=Oe();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?y.jsx(fe.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?y.jsx(fe.Phone,{className:"size-4"}):s.startsWith("mailto:")?y.jsx(fe.Mail,{className:"size-4"}):null;return y.jsx(be.div,{className:ge(t,"mt-2"),initial:"hidden",animate:"visible",variants:AI,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:y.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(C.Background)}f0`},children:y.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>y.jsxs(be.button,{variants:OI,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(C.GreeterBackground),color:n.getColor(C.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(C.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(C.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.ButtonBackground),a.currentTarget.style.color=n.getColor(C.ButtonText),a.currentTarget.style.borderColor=n.getColor(C.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(C.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.GreeterBackground),a.currentTarget.style.color=n.getColor(C.GreeterText),a.currentTarget.style.borderColor=n.getColor(C.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(C.ShadowColor)}30`},children:[y.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),y.jsx("span",{className:"font-medium",children:s.label})]}),y.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(C.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const MI={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},hx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function FI({messages:e,isTyping:t}){var u,f,h,m;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=kt(),a=Oe(),l=is(),c=()=>{var p;(p=n.current)==null||p.scrollIntoView({behavior:"smooth"})},d=()=>{if(r.current){const{scrollTop:p,scrollHeight:b,clientHeight:g}=r.current,w=b-p<=g+10;s(w)}};return v.useEffect(()=>{(i||t)&&c()},[e,i,t]),y.jsxs("section",{onScroll:d,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.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 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:(m=(h=o==null?void 0:o.appearance)==null?void 0:h.design)==null?void 0:m.greeting_message})}),y.jsx(Kr,{children:e.filter(p=>{var b;return(!!p.content||((b=p.files)==null?void 0:b.length)>0)&&p.content!==`
|
|
110
|
-
`}).map((
|
|
108
|
+
`))}else{let f=d.props,p=f==null?void 0:f.className,h=typeof p=="function"?(...g)=>nh(p(...g),l.className):nh(p,l.className),m=h?{className:h}:{},x=vC(d.props,bi(tf(l,["ref"])));for(let g in u)g in x&&delete u[g];return v.cloneElement(d,Object.assign({},x,u,c,{ref:i(aI(d),c.ref)},m))}return v.createElement(s,Object.assign({},tf(l,["ref"]),s!==v.Fragment&&c,s!==v.Fragment&&u),d)}function sI(){let e=v.useRef([]),t=v.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 oI(...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 vC(...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 yg(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function bi(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function tf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function aI(e){return N.version.split(".")[0]>="19"?e.props.ref:e.ref}let lI=Symbol();function yC(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=or(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[lI]))?void 0:n}function uI(e=0){let[t,n]=v.useState(e),r=v.useCallback(l=>n(l),[t]),i=v.useCallback(l=>n(c=>c|l),[t]),s=v.useCallback(l=>(t&l)===l,[t]),o=v.useCallback(l=>n(c=>c&~l),[n]),a=v.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var cI={},dx,fx;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((dx=process==null?void 0:cI)==null?void 0:dx.NODE_ENV)==="test"&&typeof((fx=Element==null?void 0:Element.prototype)==null?void 0:fx.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 dI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(dI||{});function fI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function pI(e,t,n,r){let[i,s]=v.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=uI(e&&i?3:0),c=v.useRef(!1),d=v.useRef(!1),u=pC();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),hI(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.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||(c.current=!1,l(7),n||s(!1),(p=r==null?void 0:r.end)==null||p.call(r,n))}})}},[e,n,t,u]),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 hI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Gc();return gI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(mI(e,r))})}),s.dispose}function mI(e,t){var n,r;let i=Gc();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 gI(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 xg=v.createContext(null);xg.displayName="OpenClosedContext";var Ri=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ri||{});function xC(){return v.useContext(xg)}function vI({value:e,children:t}){return N.createElement(xg.Provider,{value:e},t)}function yI(){let e=typeof document>"u";return"useSyncExternalStore"in sf?(t=>t.useSyncExternalStore)(sf)(()=>()=>{},()=>!1,()=>!e):!1}function wC(){let e=yI(),[t,n]=v.useState(du.isHandoffComplete);return t&&du.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>du.handoff(),[]),e?!1:t}function xI(){let e=v.useRef(!1);return Jr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function bC(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:kC)!==v.Fragment||N.Children.count(e.children)===1}let Yc=v.createContext(null);Yc.displayName="TransitionContext";var wI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(wI||{});function bI(){let e=v.useContext(Yc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function SI(){let e=v.useContext(Kc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Kc=v.createContext(null);Kc.displayName="NestingContext";function Xc(e){return"children"in e?Xc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function SC(e,t){let n=hC(e),r=v.useRef([]),i=xI(),s=pC(),o=or((p,h=Br.Hidden)=>{let m=r.current.findIndex(({el:x})=>x===p);m!==-1&&(Qc(h,{[Br.Unmount](){r.current.splice(m,1)},[Br.Hidden](){r.current[m].state="hidden"}}),s.microTask(()=>{var x;!Xc(r)&&i.current&&((x=n.current)==null||x.call(n))}))}),a=or(p=>{let h=r.current.find(({el:m})=>m===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>o(p,Br.Unmount)}),l=v.useRef([]),c=v.useRef(Promise.resolve()),d=v.useRef({enter:[],leave:[]}),u=or((p,h,m)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([x])=>x!==p)),t==null||t.chains.current[h].push([p,new Promise(x=>{l.current.push(x)})]),t==null||t.chains.current[h].push([p,new Promise(x=>{Promise.all(d.current[h].map(([g,w])=>w)).then(()=>x())})]),h==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),f=or((p,h,m)=>{Promise.all(d.current[h].splice(0).map(([x,g])=>g)).then(()=>{var x;(x=l.current.shift())==null||x()}).then(()=>m(h))});return v.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:f,wait:c,chains:d}),[a,o,r,u,f,d,c])}let kC=v.Fragment,CC=mC.RenderStrategy;function kI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:d,enterTo:u,entered:f,leave:p,leaveFrom:h,leaveTo:m,...x}=e,[g,w]=v.useState(null),b=v.useRef(null),k=bC(e),T=yC(...k?[b,t,w]:t===null?[]:[t]),E=(n=x.unmount)==null||n?Br.Unmount:Br.Hidden,{show:_,appear:j,initial:M}=bI(),[P,I]=v.useState(_?"visible":"hidden"),F=SI(),{register:B,unregister:V}=F;Jr(()=>B(b),[B,b]),Jr(()=>{if(E===Br.Hidden&&b.current){if(_&&P!=="visible"){I("visible");return}return Qc(P,{hidden:()=>V(b),visible:()=>B(b)})}},[P,b,B,V,_,E]);let re=wC();Jr(()=>{if(k&&re&&P==="visible"&&b.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,P,re,k]);let J=M&&!j,te=j&&_&&M,O=v.useRef(!1),$=SC(()=>{O.current||(I("hidden"),V(b))},F),H=or(Ne=>{O.current=!0;let Je=Ne?"enter":"leave";$.onStart(b,Je,et=>{et==="enter"?s==null||s():et==="leave"&&(a==null||a())})}),q=or(Ne=>{let Je=Ne?"enter":"leave";O.current=!1,$.onStop(b,Je,et=>{et==="enter"?o==null||o():et==="leave"&&(l==null||l())}),Je==="leave"&&!Xc($)&&(I("hidden"),V(b))});v.useEffect(()=>{k&&i||(H(_),q(_))},[_,k,i]);let Q=!(!i||!k||!re||J),[,ee]=pI(Q,g,_,{start:H,end:q}),ce=bi({ref:T,className:((r=nh(x.className,te&&c,te&&d,ee.enter&&c,ee.enter&&ee.closed&&d,ee.enter&&!ee.closed&&u,ee.leave&&p,ee.leave&&!ee.closed&&h,ee.leave&&ee.closed&&m,!ee.transition&&_&&f))==null?void 0:r.trim())||void 0,...fI(ee)}),ve=0;P==="visible"&&(ve|=Ri.Open),P==="hidden"&&(ve|=Ri.Closed),_&&P==="hidden"&&(ve|=Ri.Opening),!_&&P==="visible"&&(ve|=Ri.Closing);let ne=gC();return N.createElement(Kc.Provider,{value:$},N.createElement(vI,{value:ve},ne({ourProps:ce,theirProps:x,defaultTag:kC,features:CC,visible:P==="visible",name:"Transition.Child"})))}function CI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=v.useRef(null),a=bC(e),l=yC(...a?[o,t]:t===null?[]:[t]);wC();let c=xC();if(n===void 0&&c!==null&&(n=(c&Ri.Open)===Ri.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=v.useState(n?"visible":"hidden"),f=SC(()=>{n||u("hidden")}),[p,h]=v.useState(!0),m=v.useRef([n]);Jr(()=>{p!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),h(!1))},[m,n]);let x=v.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);Jr(()=>{n?u("visible"):!Xc(f)&&o.current!==null&&u("hidden")},[n,f]);let g={unmount:i},w=or(()=>{var T;p&&h(!1),(T=e.beforeEnter)==null||T.call(e)}),b=or(()=>{var T;p&&h(!1),(T=e.beforeLeave)==null||T.call(e)}),k=gC();return N.createElement(Kc.Provider,{value:f},N.createElement(Yc.Provider,{value:x},k({ourProps:{...g,as:v.Fragment,children:N.createElement(TC,{ref:l,...g,...s,beforeEnter:w,beforeLeave:b})},theirProps:{},defaultTag:v.Fragment,features:CC,visible:d==="visible",name:"Transition"})))}function TI(e,t){let n=v.useContext(Yc)!==null,r=xC()!==null;return N.createElement(N.Fragment,null,!n&&r?N.createElement(rh,{ref:t,...e}):N.createElement(TC,{ref:t,...e}))}let rh=yg(CI),TC=yg(kI),EI=yg(TI),_I=Object.assign(rh,{Child:EI,Root:rh});const wg=v.createContext(void 0),ua=({as:e="div",children:t,className:n})=>{const[r,i]=v.useState(!1),s=v.useCallback(()=>{i(a=>!a)},[]),o=v.useRef(null);return v.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(wg.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:y.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},PI=({type:e,children:t,className:n,style:r,id:i,title:s})=>{const{open:o,toggleOpen:a,setOpen:l}=v.useContext(wg),c=Oe(),d=n||"font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear border-dashed dropdown-toggle btn";return y.jsx("div",{children:e==="a"?y.jsx(vP,{id:i,to:"/#",onClick:f=>{f.preventDefault(),a()},className:u+(o?" show":""),children:t}):y.jsx("button",{id:i,onClick:f=>{f.stopPropagation(),f.preventDefault(),l(!o)},type:"button",className:d,style:{backgroundColor:c.getColor(C.ButtonBackground),color:c.getColor(C.ButtonText),borderRadius:c.getRadius(),...r},title:s,children:t})})},jI=({as:e="div",className:t,style:n,children:r,placement:i})=>{const{open:s,setOpen:o}=v.useContext(wg),a=Oe(),l=t||"absolute z-50 py-2 mt-1 text-left list-none rounded-md shadow-md dropdown-menu min-w-max",[c,d]=v.useState("right-end");v.useEffect(()=>{i&&d(i)},[i]);const u=v.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),p=()=>{if(s&&c==="right-end"&&u.current){const h=u.current;h.style.position="absolute",f==="rtl"?h.style.inset="0px auto auto 0px":h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="start-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.transform="translate(0px, 20px)"}if(s&&c==="top-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto 0px 0px auto",h.style.margin="0px",h.style.transform="translate(-58px, -30px)"}if(s&&c==="bottom-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 54px)"}if(s&&c==="bottom-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px 0px auto auto",h.style.margin="0px",h.style.transform="translate(0px, 39px)"}if(s&&c==="top-start"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="auto auto 0px 0px",h.style.margin="0px",h.style.transform="translate(0px, -95px)"}if(s&&c==="left-end"&&u.current){const h=u.current;h.style.position="absolute",h.style.inset="0px auto auto 0px",h.style.margin="0px",h.style.right="0px",h.style.transform="translate(0px, -20px)"}return{}};return y.jsx(_I,{as:N.Fragment,show:s,children:h=>y.jsx(e,{ref:u,onClick:()=>o(!1),className:`${l} ${h==="entered"?"transition-all":""}`,style:{...p(),backgroundColor:a.getColor(C.Background),borderRadius:a.getRadius(),boxShadow:`0 10px 25px -5px ${a.getColor(C.ShadowColor)}, 0 8px 10px -6px ${a.getColor(C.ShadowColor)}`,...n},children:r})})};ua.Trigger=PI;ua.Content=jI;function RI({onChatClose:e}){const[t,n]=v.useState(!1),r=Oe(),i=rl(),s=ui(),o=()=>{s==null||s.emit(En.ChatClose,{}),e()};return y.jsxs(y.Fragment,{children:[y.jsx(Kr,{children:t&&y.jsx(be.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:r.getColor(C.ModalOverlayColor)},children:y.jsxs(be.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"p-5 rounded-xl shadow-lg max-w-xs w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},children:[y.jsx("div",{className:"text-lg font-semibold mb-2",style:{color:r.getColor(C.ChatCloseConfirmText)},children:i(Y.ChatCloseConfirm)}),y.jsx("div",{className:"text-sm mb-4",style:{color:r.getColor(C.FooterText)},children:i(Y.ChatCloseWarning)}),y.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.GreeterBackground),color:r.getColor(C.GreeterText),borderRadius:r.getRadius()},onClick:()=>n(!1),children:i(Y.CancelAction)}),y.jsx("button",{type:"button",className:"px-4 py-2 rounded-lg font-medium transition-all",style:{backgroundColor:r.getColor(C.ErrorBackground),color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:o,children:i(Y.CloseAction)})]})]})})}),y.jsxs(ua,{className:"relative flex items-center h-full",children:[y.jsx(ua.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 transition-colors",style:{borderRadius:r.getRadius()},id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:i(Y.ChatSettings),children:y.jsx(fe.Menu,{className:"size-5",style:{color:r.getColor(C.HeaderText)}})}),y.jsx(Kr,{children:!t&&y.jsx(be.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(ua.Content,{placement:"left-end",className:"text-left rounded-lg shadow-xl dropdown-menu w-full",style:{backgroundColor:r.getColor(C.Background),borderRadius:r.getRadius()},"aria-labelledby":"dropdownMenuButton",children:[y.jsx("h5",{className:"text-sm font-semibold px-3 py-2 border-b",style:{color:r.getColor(C.FooterText),borderBottomColor:r.getColor(C.DividerColor)},children:i(Y.ChatSettings)}),y.jsx("ul",{className:"py-2 px-2",children:y.jsx("li",{children:y.jsxs("button",{className:"p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",style:{color:r.getColor(C.ErrorText),borderRadius:r.getRadius()},onClick:a=>{a.stopPropagation(),a.preventDefault(),n(!0)},children:[y.jsx(fe.X,{className:"w-4 h-4"}),y.jsx("span",{children:i(Y.ChatEndConversation)})]})})})]})})})]})]})}function AI({text:e}){const n=Oe().getColor(C.LinkColor),i=(s=>{const o=/(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,a=s.split(/(<[^>]*>)/g);let l="",c=!1;for(let d=0;d<a.length;d++){const u=a[d];if(u.startsWith("<")&&u.endsWith(">"))if(u.match(/^<a\s/i)){if(u.includes("style="))l+=u;else{const f=u.replace(/^(<a\s[^>]*)(>)$/i,`$1 style="color: ${n}; text-decoration: underline;"$2`);l+=f}c=!0}else u.match(/^<\/a>/i)?(l+=u,c=!1):l+=u;else if(!c&&u.trim()){const f=u.replace(o,p=>{const h=p.replace(/[">]+$/,"");return`<a href="${/^https?:\/\//i.test(h)?h:`https://${h}`}" target="_blank" rel="noopener noreferrer" style="color: ${n}; text-decoration: underline;">${h}</a>`});l+=f}else l+=u}return l})(e);return y.jsx("span",{className:"linkified",dangerouslySetInnerHTML:{__html:i}})}const px="opacity-0 group-hover/item:opacity-100 transition-opacity duration-200";function EC({files:e,className:t,onDelete:n,hideName:r}){const i=is(),[s,o]=v.useState(new Map);v.useEffect(()=>{const h=new Map;for(let m=0;m<e.length;m++){const x=e[m];if(x instanceof File){const g=URL.createObjectURL(x);h.set(m,g)}}return o(h),()=>{for(const m of h.values())URL.revokeObjectURL(m)}},[e]);const a=h=>{var x;return((x=(h instanceof File?h.name:h).split(".").pop())==null?void 0:x.toLowerCase())||""},l=h=>h instanceof File?h.name:h.split("/").pop()||h,c=h=>{const[m,x]=h.split(".");return m.length>10?`${m.slice(0,10)}...${x}`:h},d=h=>{const m=["jpg","jpeg","png","gif","bmp","webp","svg"],x=a(h);return m.includes(x)},u=(h,m)=>{if(h instanceof File){const x=s.get(m);x&&window.open(x,"_blank")}else window.open(h,"_blank")},f=(h,m)=>{h.stopPropagation(),n==null||n(m)},p=(h,m)=>h instanceof File?s.get(m)||"":h;return y.jsx("div",{className:ge("flex gap-2 w-full overflow-x-auto",t),children:e.map((h,m)=>{const x=l(h),g=a(h),w=d(h),b=p(h,m);return y.jsxs("div",{onClick:()=>u(h,m),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:k=>f(k,m),className:ge("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"})})}),w?y.jsx("div",{className:"aspect-square w-fit mb-1 overflow-hidden rounded",children:y.jsx("img",{src:b,alt:x,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:ge("text-[10px] font-medium text-gray-600 uppercase",{[px]:r}),children:g||"file"})]})}),y.jsx("div",{className:ge("max-w-24 text-xs text-gray-700 font-medium truncate text-ellipsis overflow-hidden",{[px]:r}),title:x,children:c(x)})]},m)})})}const OI={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},DI={hidden:{opacity:0,y:8,scale:.95},visible:{opacity:1,y:0,scale:1}};function MI({buttons:e,className:t=""}){const n=Oe();if(!e||e.length===0)return null;const r=s=>{s.startsWith("http://")||s.startsWith("https://")?window.open(s,"_blank","noopener,noreferrer"):s.startsWith("tel:")||s.startsWith("mailto:")?window.location.href=s:console.log("Custom action:",s)},i=s=>s.startsWith("http://")||s.startsWith("https://")?y.jsx(fe.ExternalLink,{className:"size-4"}):s.startsWith("tel:")?y.jsx(fe.Phone,{className:"size-4"}):s.startsWith("mailto:")?y.jsx(fe.Mail,{className:"size-4"}):null;return y.jsx(be.div,{className:ge(t,"mt-2"),initial:"hidden",animate:"visible",variants:OI,transition:{duration:.3,ease:"easeOut",staggerChildren:.08},children:y.jsx("div",{className:"rounded-lg ",style:{backgroundColor:`${n.getColor(C.Background)}f0`},children:y.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>y.jsxs(be.button,{variants:DI,transition:{duration:.25,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.15}},whileTap:{scale:.98,transition:{duration:.1}},onClick:()=>r(s.url),className:"group inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden cursor-pointer",style:{backgroundColor:n.getColor(C.GreeterBackground),color:n.getColor(C.GreeterText),borderRadius:n.getRadius(),border:`1px solid ${n.getColor(C.DividerColor)}`,boxShadow:`0 1px 3px ${n.getColor(C.ShadowColor)}30`},onMouseEnter:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.ButtonBackground),a.currentTarget.style.color=n.getColor(C.ButtonText),a.currentTarget.style.borderColor=n.getColor(C.ButtonBackground),a.currentTarget.style.boxShadow=`0 4px 12px ${n.getColor(C.ShadowColor)}40`},onMouseLeave:a=>{a.currentTarget.style.backgroundColor=n.getColor(C.GreeterBackground),a.currentTarget.style.color=n.getColor(C.GreeterText),a.currentTarget.style.borderColor=n.getColor(C.DividerColor),a.currentTarget.style.boxShadow=`0 1px 3px ${n.getColor(C.ShadowColor)}30`},children:[y.jsxs("span",{className:"flex items-center gap-2",children:[i(s.url),y.jsx("span",{className:"font-medium",children:s.label})]}),y.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`linear-gradient(45deg, transparent 30%, ${n.getColor(C.ButtonText)}10 50%, transparent 70%)`,borderRadius:n.getRadius()}})]},`${s.label}-${o}`))})})})}const FI={hidden:{opacity:0,y:8},visible:()=>({opacity:1,y:0})},hx=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function NI({messages:e,isTyping:t}){var u,f,p,h;const n=v.useRef(null),r=v.useRef(null),[i,s]=v.useState(!0),{widget:o}=kt(),a=Oe(),l=is(),c=()=>{var m;(m=n.current)==null||m.scrollIntoView({behavior:"smooth"})},d=()=>{if(r.current){const{scrollTop:m,scrollHeight:x,clientHeight:g}=r.current,w=x-m<=g+10;s(w)}};return v.useEffect(()=>{(i||t)&&c()},[e,i,t]),y.jsxs("section",{onScroll:d,ref:r,className:"flex flex-col gap-3 w-full grow pt-4 px-4 overflow-y-auto",children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.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 px-3 py-2 shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:(h=(p=o==null?void 0:o.appearance)==null?void 0:p.design)==null?void 0:h.greeting_message})}),y.jsx(Kr,{children:e.filter(m=>{var x;return(!!m.content||((x=m.files)==null?void 0:x.length)>0)&&m.content!==`
|
|
110
|
+
`}).map((m,x)=>y.jsxs(be.div,{custom:x,initial:"hidden",animate:"visible",variants:FI,transition:{delay:x*.03,duration:.15,ease:"easeOut"},className:ge("flex flex-col w-full justify-center break-words",{"items-end":m.sender_type===Le.Customer||m.activity_type===Si.ChatCreated,"items-start":m.sender_type===Le.User,"items-center":m.sender_type===Le.System||m.sender_type===Le.Activity}),children:[m.sender_type===Le.System&&y.jsx("div",{className:"whitespace-pre-wrap px-3 py-1.5 text-sm shadow-sm",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText),borderRadius:a.getRadius()},children:m.content}),([Le.Customer,Le.User].includes(m.sender_type)||m.activity_type===Si.ChatCreated)&&y.jsxs(be.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:"max-w-[85%] whitespace-pre-wrap border-0 px-3 py-2 shadow-sm",style:{backgroundColor:m.sender_type===Le.User?a.getColor(C.MessageAdminBackground):a.getColor(C.MessageVisitorBackground),color:m.sender_type===Le.User?a.getColor(C.MessageAdminText):a.getColor(C.MessageVisitorText),borderRadius:a.getRadius()},children:[m.files&&m.files.length>0&&y.jsx(EC,{files:m.files,className:"mb-1",hideName:!0}),m.sender_type===Le.User?y.jsx(AI,{text:m.content}):m.content,m.created_at&&y.jsx("div",{className:"text-[0.5rem] text-right opacity-70",style:{color:m.sender_type===Le.User?a.getColor(C.MessageAdminText):a.getColor(C.MessageVisitorText)},children:hx(m.created_at)})]}),([Le.Customer,Le.User].includes(m.sender_type)||m.activity_type===Si.ChatCreated)&&m.buttons&&m.buttons.length>0&&y.jsx("div",{className:ge("w-full",{"flex justify-end":m.sender_type===Le.Customer||m.activity_type===Si.ChatCreated,"flex justify-start":m.sender_type===Le.User}),children:y.jsx("div",{className:"max-w-[85%]",children:y.jsx(MI,{buttons:m.buttons})})}),m.sender_type===Le.Activity&&m.activity_type!==Si.ChatCreated&&(m.content.split("_").length===3?y.jsxs("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText)},children:[m.content.split("_")[2]," odaya katıldı"]}):y.jsx("div",{className:"whitespace-pre-wrap border-0 rounded-full px-3 py-1 text-xs shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground),color:a.getColor(C.MessageAdminText)},children:m.content})),Le.System===m.sender_type&&y.jsx("div",{className:"text-xs",style:{color:a.getColor(C.MessageAdminText)},children:m.created_at&&hx(m.created_at)})]},m.id||x))}),t&&y.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:y.jsx("div",{className:"flex items-center rounded-full px-3 py-1.5 shadow-none",style:{backgroundColor:a.getColor(C.MessageAdminBackground)},children:y.jsxs("div",{className:"flex space-x-1",children:[y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"0ms"}}),y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"150ms"}}),y.jsx("div",{className:"size-2 rounded-full animate-bounce",style:{backgroundColor:a.getColor(C.MessageAdminText),animationDelay:"300ms"}})]})})}),!i&&y.jsx("div",{className:ge("fixed",{"bottom-40 right-14":!l,"bottom-28 right-4":l}),children:y.jsx(on,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var m,x;(x=r.current)==null||x.scrollTo({top:(m=r.current)==null?void 0:m.scrollHeight,behavior:"smooth"})},children:y.jsx(fe.ArrowDown,{className:"size-4"})})}),y.jsx("div",{ref:n})]})}/**
|
|
111
111
|
* @license lucide-react v0.511.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const
|
|
115
|
+
*/const LI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),II=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),mx=e=>{const t=II(e);return t.charAt(0).toUpperCase()+t.slice(1)},_C=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),$I=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
116
116
|
* @license lucide-react v0.511.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/var
|
|
120
|
+
*/var BI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
121
121
|
* @license lucide-react v0.511.0 - ISC
|
|
122
122
|
*
|
|
123
123
|
* This source code is licensed under the ISC license.
|
|
124
124
|
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const
|
|
125
|
+
*/const zI=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...BI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_C("lucide",i),...!s&&!$I(a)&&{"aria-hidden":"true"},...a},[...o.map(([c,d])=>v.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
|
|
126
126
|
* @license lucide-react v0.511.0 - ISC
|
|
127
127
|
*
|
|
128
128
|
* This source code is licensed under the ISC license.
|
|
129
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const
|
|
130
|
+
*/const VI=(e,t)=>{const n=v.forwardRef(({className:r,...i},s)=>v.createElement(zI,{ref:s,iconNode:t,className:_C(`lucide-${LI(mx(e))}`,`lucide-${e}`,r),...i}));return n.displayName=mx(e),n};/**
|
|
131
131
|
* @license lucide-react v0.511.0 - ISC
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const VI=[["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"}]],PC=zI("cloud-upload",VI);var jC={exports:{}},UI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",HI=UI,WI=HI;function RC(){}function AC(){}AC.resetWarningCache=RC;var qI=function(){function e(r,i,s,o,a,l){if(l!==WI){var c=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 c.name="Invariant Violation",c}}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:AC,resetWarningCache:RC};return n.PropTypes=n,n};jC.exports=qI();var GI=jC.exports;const ye=Xi(GI);function ds(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{c(r.next(d))}catch(u){o(u)}}function l(d){try{c(r.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const QI=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 go(e,t,n){const r=YI(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&gx(r,"path",s),gx(r,"relativePath",s),r}function YI(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=QI.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function gx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const KI=[".DS_Store","Thumbs.db"];function XI(e){return ds(this,void 0,void 0,function*(){return Xu(e)&&ZI(e.dataTransfer)?n$(e.dataTransfer,e.type):JI(e)?e$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?t$(e):[]})}function ZI(e){return Xu(e)}function JI(e){return Xu(e)&&Xu(e.target)}function Xu(e){return typeof e=="object"&&e!==null}function e$(e){return ih(e.target.files).map(t=>go(t))}function t$(e){return ds(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>go(n))})}function n$(e,t){return ds(this,void 0,void 0,function*(){if(e.items){const n=ih(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(r$));return vx(OC(r))}return vx(ih(e.files).map(n=>go(n)))})}function vx(e){return e.filter(t=>KI.indexOf(t.name)===-1)}function ih(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 r$(e){if(typeof e.webkitGetAsEntry!="function")return yx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?DC(t):yx(e,t)}function OC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?OC(n):[n]],[])}function yx(e,t){return ds(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,go(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return go(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function i$(e){return ds(this,void 0,void 0,function*(){return e.isDirectory?DC(e):s$(e)})}function DC(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>ds(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(i$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function s$(e){return ds(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=go(r,e.fullPath);t(i)},r=>{n(r)})})})}var nf=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 xx(e){return l$(e)||a$(e)||FC(e)||o$()}function o$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
136
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
137
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FC(e,t){if(e){if(typeof e=="string")return sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sh(e,t)}}function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function
|
|
138
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
139
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BC(e,t){if(e){if(typeof e=="string")return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L$(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 I$(e){if(Array.isArray(e))return e}function Tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ju(e,t){if(e==null)return{};var n=$$(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 al=v.forwardRef(function(e,t){var n=e.children,r=Ju(e,P$),i=B$(r),s=i.open,o=Ju(i,j$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),N.createElement(v.Fragment,null,n(_e(_e({},o),{},{open:s})))});al.displayName="Dropzone";var zC={disabled:!1,getFilesFromEvent:XI,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};al.defaultProps=zC;al.propTypes={children:ye.func,accept:ye.objectOf(ye.arrayOf(ye.string)),multiple:ye.bool,preventDropOnDocument:ye.bool,noClick:ye.bool,noKeyboard:ye.bool,noDrag:ye.bool,noDragEventsBubbling:ye.bool,minSize:ye.number,maxSize:ye.number,maxFiles:ye.number,disabled:ye.bool,getFilesFromEvent:ye.func,onFileDialogCancel:ye.func,onFileDialogOpen:ye.func,useFsAccessApi:ye.bool,autoFocus:ye.bool,onDragEnter:ye.func,onDragLeave:ye.func,onDragOver:ye.func,onDrop:ye.func,onDropAccepted:ye.func,onDropRejected:ye.func,onError:ye.func,validator:ye.func};var lh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function B$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_e(_e({},zC),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,u=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,p=t.onFileDialogCancel,b=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,x=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,j=t.onError,P=t.validator,O=v.useMemo(function(){return T$(n)},[n]),$=v.useMemo(function(){return C$(n)},[n]),F=v.useMemo(function(){return typeof b=="function"?b:Ex},[b]),z=v.useMemo(function(){return typeof p=="function"?p:Ex},[p]),G=v.useRef(null),re=v.useRef(null),K=v.useReducer(z$,lh),X=rf(K,2),D=X[0],I=X[1],q=D.isFocused,H=D.isFileDialogActive,Y=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&k$()),te=function(){!Y.current&&H&&setTimeout(function(){if(re.current){var M=re.current.files;M.length||(I({type:"closeDialog"}),z())}},300)};v.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[re,H,z,Y]);var ce=v.useRef([]),ve=function(M){G.current&&G.current.contains(M.target)||(M.preventDefault(),ce.current=[])};v.useEffect(function(){return x&&(document.addEventListener("dragover",Cx,!1),document.addEventListener("drop",ve,!1)),function(){x&&(document.removeEventListener("dragover",Cx),document.removeEventListener("drop",ve))}},[G,x]),v.useEffect(function(){return!r&&w&&G.current&&G.current.focus(),function(){}},[G,w,r]);var ne=v.useCallback(function(A){j?j(A):console.error(A)},[j]),Ne=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[].concat(O$(ce.current),[A.target]),Bl(A)&&Promise.resolve(i(A)).then(function(M){if(!(Zu(A)&&!_)){var W=M.length,J=W>0&&x$({files:M,accept:O,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:P}),ae=W>0&&!J;I({isDragAccept:J,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),c&&c(A)}}).catch(function(M){return ne(M)})},[i,c,ne,_,O,o,s,a,l,P]),Je=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var M=Bl(A);if(M&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return M&&u&&u(A),!1},[u,_]),et=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var M=ce.current.filter(function(J){return G.current&&G.current.contains(J)}),W=M.indexOf(A.target);W!==-1&&M.splice(W,1),ce.current=M,!(M.length>0)&&(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bl(A)&&d&&d(A))},[G,d,_]),Ft=v.useCallback(function(A,M){var W=[],J=[];A.forEach(function(ae){var Ve=NC(ae,O),tt=rf(Ve,2),Pn=tt[0],Qt=tt[1],ps=LC(ae,o,s),Xn=rf(ps,2),xr=Xn[0],hs=Xn[1],Po=P?P(ae):null;if(Pn&&xr&&!Po)W.push(ae);else{var pi=[Qt,hs];Po&&(pi=pi.concat(Po)),J.push({file:ae,errors:pi.filter(function(jn){return jn})})}}),(!a&&W.length>1||a&&l>=1&&W.length>l)&&(W.forEach(function(ae){J.push({file:ae,errors:[y$]})}),W.splice(0)),I({acceptedFiles:W,fileRejections:J,isDragReject:J.length>0,type:"setFiles"}),f&&f(W,J,M),J.length>0&&m&&m(J,M),W.length>0&&h&&h(W,M)},[I,a,O,o,s,l,f,h,m,P]),_n=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[],Bl(A)&&Promise.resolve(i(A)).then(function(M){Zu(A)&&!_||Ft(M,A)}).catch(function(M){return ne(M)}),I({type:"reset"})},[i,Ft,ne,_]),dn=v.useCallback(function(){if(Y.current){I({type:"openDialog"}),F();var A={multiple:a,types:$};window.showOpenFilePicker(A).then(function(M){return i(M)}).then(function(M){Ft(M,null),I({type:"closeDialog"})}).catch(function(M){E$(M)?(z(M),I({type:"closeDialog"})):_$(M)?(Y.current=!1,re.current?(re.current.value=null,re.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ne(M)});return}re.current&&(I({type:"openDialog"}),F(),re.current.value=null,re.current.click())},[I,F,z,g,Ft,ne,$,a]),di=v.useCallback(function(A){!G.current||!G.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),dn())},[G,dn]),gr=v.useCallback(function(){I({type:"focus"})},[]),fs=v.useCallback(function(){I({type:"blur"})},[]),fi=v.useCallback(function(){k||(S$()?setTimeout(dn,0):dn())},[k,dn]),Ct=function(M){return r?null:M},vr=function(M){return T?null:Ct(M)},Ge=function(M){return E?null:Ct(M)},yr=function(M){_&&M.stopPropagation()},_o=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=A.refKey,W=M===void 0?"ref":M,J=A.role,ae=A.onKeyDown,Ve=A.onFocus,tt=A.onBlur,Pn=A.onClick,Qt=A.onDragEnter,ps=A.onDragOver,Xn=A.onDragLeave,xr=A.onDrop,hs=Ju(A,R$);return _e(_e(ah({onKeyDown:vr(On(ae,di)),onFocus:vr(On(Ve,gr)),onBlur:vr(On(tt,fs)),onClick:Ct(On(Pn,fi)),onDragEnter:Ge(On(Qt,Ne)),onDragOver:Ge(On(ps,Je)),onDragLeave:Ge(On(Xn,et)),onDrop:Ge(On(xr,_n)),role:typeof J=="string"&&J!==""?J:"presentation"},W,G),!r&&!T?{tabIndex:0}:{}),hs)}},[G,di,gr,fs,fi,Ne,Je,et,_n,T,E,r]),R=v.useCallback(function(A){A.stopPropagation()},[]),B=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=A.refKey,W=M===void 0?"ref":M,J=A.onChange,ae=A.onClick,Ve=Ju(A,A$),tt=ah({accept:O,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ct(On(J,_n)),onClick:Ct(On(ae,R)),tabIndex:-1},W,re);return _e(_e({},tt),Ve)}},[re,n,a,_n,r]);return _e(_e({},D),{},{isFocused:q&&!r,getRootProps:_o,getInputProps:B,rootRef:G,inputRef:re,open:Ct(dn)})}function z$(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},lh),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _e(_e({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _e({},lh);default:return e}}function Ex(){}const VC=5*1024*1024,vo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},_x=Object.values(vo).flat();function V$(e){var r;if(e.size>VC)return{isValid:!1,error:`Dosya boyutu 1MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(vo).includes(e.type)||_x.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${_x.join(", ")}`}}function ec(e){for(const t of e){const n=V$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function UC({onDrop:e}){const t=n=>{const r=ec(n);if(!r.isValid){alert(r.error);return}e(n)};return y.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),maxSize:VC,children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[y.jsx("input",{...r()}),y.jsx("div",{className:"mb-3",children:y.jsx(PC,{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"})]})]})})})}UC.Button=({onDrop:e})=>{const t=n=>{const r=ec(n);if(!r.isValid){Us({description:r.error,variant:"error"});return}e(n)};return y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[y.jsx("input",{...r()}),y.jsx(PC,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function U$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=ui(),o=OD(t),a=Oe(),l=rl(),{setIsInputFocused:c}=kt(),[d,u]=v.useState(""),[f,h]=v.useState("3rem"),[m,p]=v.useState(!1),[b,g]=v.useState([]),[w,x]=v.useState(0),[k,T]=v.useState(!1),[E,_]=v.useState(0),[j,P]=v.useState(null);v.useEffect(()=>{if(r.length>0){const F=r[r.length-1];F.id!==j&&(P(F.id),F.sender_type===Le.User&&(x(0),T(!1)))}},[r,j]),v.useEffect(()=>{let F;return k&&E>0&&(F=window.setTimeout(()=>{_(z=>z<=1?(T(!1),x(0),0):z-1)},1e3)),()=>clearTimeout(F)},[k,E]),v.useEffect(()=>{const F=i.current;if(F){const z=()=>c(!0),G=()=>c(!1);return F.addEventListener("focus",z),F.addEventListener("blur",G),()=>{F.removeEventListener("focus",z),F.removeEventListener("blur",G)}}},[c]),Km("paste",F=>{const z=F.clipboardData.items,G=[];for(const re of z){const K=re.getAsFile();K&&G.push(K)}if(G.length>0&&!n){Us({description:l(Q.FileUploadDisabled),variant:"error"});return}if(G.length>0){const re=ec(G);if(!re.isValid){Us({description:re.error,variant:"error"});return}g([...b,...G])}});const O=async()=>{if(!d.trim()&&(!n||b.length===0))return;if(w>5&&!k){T(!0),_(3);return}if(k)return;p(!0);let F;if(n&&b.length>0){const[z,G]=await o.mutateAsync(b);vc(G)&&DD(z)&&(F=z.file_urls)}s==null||s.emit(En.MessageCreate,{content:d,files:F},z=>{u(""),e(z),p(!1),g([]),x(G=>G+1),i.current&&(i.current.style.height="3rem",h("3rem"))})},$=F=>{s==null||s.emit(En.MessageTyping,{content:F})};return y.jsxs(y.Fragment,{children:[k&&y.jsxs(be.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:a.getColor(C.ErrorBackground),borderColor:a.getColor(C.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:a.getRadius()},children:[y.jsx(fe.XCircle,{className:"size-4 mr-2",style:{color:a.getColor(C.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:a.getColor(C.ErrorText)},children:l(Q.RateLimitMessage).replace("{seconds}",E.toString())})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:a.getColor(C.FooterBackground),borderRadius:a.getRadius()},onSubmit:F=>{F.preventDefault(),O(),F.currentTarget.reset()},children:[n&&b&&b.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(EC,{files:b,onDelete:F=>{g(b.filter((z,G)=>G!==F))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(vg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:f,maxHeight:"6rem"},placeholder:l(Q.MessagePlaceholder),value:d,maxLength:2e3,onChange:F=>{const z=F.target.value;if(z.length<=2e3&&(u(z),$(z)),z.length>0&&F.currentTarget.scrollHeight>F.currentTarget.clientHeight){const G=`${F.currentTarget.scrollHeight}px`;F.currentTarget.style.height=G,h(G)}else F.currentTarget.style.height="3rem",h("3rem")},onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),F.stopPropagation(),O())}}),d.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:d.length>=2e3?a.getColor(C.ErrorText):a.getColor(C.FooterText),fontWeight:d.length>=2e3?"600":"normal"},children:2e3-d.length})]}),y.jsxs(be.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(UC.Button,{onDrop:F=>{if(F.length){const z=ec(F);if(!z.isValid){console.log("val",z),Us({description:z.error,variant:"error"});return}g([...b,...F])}}}),y.jsx(on,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:m||!d.trim()&&b.length===0||k,children:m?y.jsx(fe.Spin,{className:"size-6 animate-spin"}):k?y.jsx("span",{className:"text-xs font-bold",children:E}):y.jsx(fe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function H$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var g,w;const{widget:o,setOpen:a,open:l,isHaveChat:c,isInputFocused:d}=kt(),u=Oe(),f=is(),h=ui(),m=v.useRef(new Set),p=v.useRef(!1),b=v.useCallback(()=>{if(!h||!l||!c)return;const x=r.filter(k=>k.sender_type===Le.User&&!m.current.has(k.id)).map(k=>k.id);x.length!==0&&h.emit(En.MessageRead,{message_ids:x},k=>{if(k&&k.success===!0)for(const T of x)m.current.add(T)})},[h,r,l,c]);return v.useEffect(()=>{l&&(p.current=!0),l&&c&&(d||p.current)&&(b(),p.current=!1)},[l,c,d,b]),y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:u.getColor(C.HeaderBackground),color:u.getColor(C.HeaderText),borderBottom:`1px solid ${u.getColor(C.HeaderBorder)}`,borderTopLeftRadius:f?"":u.getRadius(),borderTopRightRadius:f?"":u.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(ZL,{name:e.agent_name,avatar:e.agent_avatar,textColor:u.getColor(C.HeaderText)}):y.jsx("div",{style:{color:u.getColor(C.HeaderText)},className:"font-medium",children:((w=(g=o==null?void 0:o.appearance)==null?void 0:g.design)==null?void 0:w.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(jI,{onChatClose:s}),f&&y.jsx("button",{type:"button",style:{color:u.getColor(C.HeaderText)},onClick:()=>a(!1),children:y.jsx(fe.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx(FI,{messages:r,isTyping:t||n.length>0}),y.jsx(U$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:x=>{i(x)}}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:u.getColor(C.FooterText),borderTop:`1px solid ${u.getColor(C.FooterBorder)}`,backgroundColor:u.getColor(C.FooterBackground)},children:[y.jsx("span",{children:"Powered by"}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function W$({rating:e,onChange:t}){const n=Oe();return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarInactiveColor),fill:n.getColor(C.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),s&&y.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),i&&y.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),y.jsxs("div",{className:"absolute inset-0 flex",children:[y.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function q$({onOk:e}){const t=Oe(),n=rl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=AD(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const p=setInterval(()=>{l(b=>b<=1?(clearInterval(p),e(!0),0):b-1)},1e3);return()=>clearInterval(p)}},[s]);const f=ng({comment:Yu()}),h=uC({init:{comment:""},schema:f,action:async p=>{const[b,g]=await c.mutateAsync({rating:r,comment:p.comment});if(vc(g)){o(!0);return}dC(b,{form:h})}}),m=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(C.RatingSuccessBackground):t.getColor(C.RatingHeaderBackground),color:s?t.getColor(C.RatingSuccessText):t.getColor(C.RatingHeaderText),borderBottom:`1px solid ${t.getColor(C.HeaderBorder)}`},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?Q.RatingHeaderThanks:Q.RatingHeaderEvaluate)}),y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(fe.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?y.jsxs(be.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"mb-4",style:{color:t.getColor(C.SuccessText)},children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(C.HeaderText)},children:n(Q.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(C.FooterText)},children:n(Q.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(C.FooterText)},children:n(Q.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(on,{onClick:m,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Q.RatingNewConversation)})]}):y.jsxs(be.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[y.jsx("div",{className:"text-center mb-6",children:y.jsx("p",{className:"text-base",style:{color:t.getColor(C.FooterText)},children:n(Q.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(C.RatingRateConversationText)},children:n(Q.RatingRateConversation)}),y.jsx(W$,{rating:r,onChange:p=>{i(p),p>=1&&u(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.FooterText)},children:n(Q.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.ErrorText)},children:n(Q.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:h.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(C.InputText)},children:n(Q.RatingComment)}),y.jsx(vg,{id:"comment",onChange:h.handleChange,onBlur:h.handleBlur,value:h.values.comment,placeholder:n(Q.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(C.InputBorder),backgroundColor:t.getColor(C.InputBackground),color:t.getColor(C.InputText),borderRadius:t.getRadius()},error:h.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(on,{type:"submit",onClick:p=>{r<1&&(p.preventDefault(),p.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Q.RatingSubmit)}),y.jsx(on,{onClick:m,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.GreeterBackground),color:t.getColor(C.GreeterText),borderRadius:t.getRadius()},children:n(Q.RatingNewConversation)})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(C.FooterText),borderTop:`1px solid ${t.getColor(C.FooterBorder)}`,backgroundColor:t.getColor(C.FooterBackground)},children:[y.jsx("span",{children:n(Q.PoweredBy)}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function G$({children:e}){const{widget:t}=kt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function Q$({children:e}){const t=ui(),n=Pc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function Y$(){const{widget:e,setOpen:t,setIsHaveChat:n}=kt(),r=Oe(),i=ui(),s=il(),o=Pc(),a=is(),[l,c]=v.useState(null),[d,u]=v.useState([]),[f,h]=v.useState(!1),[m,p]=v.useState([]),b=()=>{if(l){c({...l,status:vs.Closed});return}g()},g=x=>{x||t(!1),Vp((e==null?void 0:e.link_id)||""),n(!1),c(null),u([]),p([]),Up(e.client_id,ho(s)).then(()=>{i==null||i.disconnect(),o.push("registration")})};v.useEffect(()=>{i==null||i.emit(En.ChatView,{},x=>{if(x===null){t(!1),n(!1),Up(e.client_id,ho(s)),u([]),p([]),Vp((e==null?void 0:e.link_id)||""),o.push("registration");return}c(x),n(!0)})},[]);const w=v.useCallback(x=>{l&&![vs.Closed,vs.Deleted].includes(l.status)&&u([...d,x])},[d,l]);return v.useEffect(()=>{if(!i)return;const x=j=>{const P={content:j.content,created_at:j.created_at,files:j.files,id:j._id,sender_type:j.sender_type,answers:j.answers,reply_id:j.reply_id,buttons:j.buttons};if(m.length>0){p(O=>[...O,P]);return}j.is_shortcut?p([P]):w(P),h(!1)},k=j=>{c({...l,agent_name:j.name,agent_avatar:j.avatar,is_customer_uploadable:(l==null?void 0:l.is_customer_uploadable)??!1,status:(l==null?void 0:l.status)??vs.Open}),w({content:` _ _${j.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:Le.Activity,activity_type:Si.AdminJoin,sender_name:j.name})},T=()=>{h(!0)},E=()=>{b()},_=({is_customer_uploadable:j})=>{c(l?{...l,is_customer_uploadable:j}:null)};return i.on(st.MessageAgentCreate,x),i.on(st.ChatUserAssignee,k),i.on(st.MessageAgentTyping,T),i.on(st.ChatUserClose,E),i.on(st.ChatToggleUpload,_),()=>{i.off(st.MessageAgentCreate,x),i.off(st.ChatUserAssignee,k),i.off(st.MessageAgentTyping,T),i.off(st.ChatUserClose,E),i.off(st.ChatToggleUpload,_)}},[w]),v.useEffect(()=>{!i||!l||i.emit(En.MessageList,{},x=>{u(x)})},[i,l]),v.useEffect(()=>{const x=setTimeout(()=>{h(!1)},2e3);return()=>clearTimeout(x)},[f]),v.useEffect(()=>{if(!e||m.length===0)return;let x=0;e.writing_timeout&&(x=[...m[0].content].length/e.writing_timeout,x<0&&(x=0));const k=setTimeout(()=>{w(m[0]),p(m.slice(1))},x*1e3);return()=>clearTimeout(k)},[m,e]),l?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Kr,{children:y.jsx(be.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:`h-full w-full ${a?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:a?"100%":"",minHeight:a?"var(--app-height, 100dvh)":"",maxHeight:a?"var(--app-height, 100dvh)":"",backgroundColor:r.getColor(C.Background),borderRadius:a?"":r.getRadius()},children:l.status===vs.Closed?y.jsx(q$,{onOk:g}):y.jsx(H$,{chat:l,isTyping:f,messages:d,shortcutMessages:m,onNewMessage:w,onChatClose:b})})})]}):null}function K$(){return qL(),null}function X$(){return y.jsxs(Q$,{children:[y.jsx(xk,{defaultOpen:!0,children:y.jsx(G$,{children:y.jsx(Y$,{})})}),y.jsx(K$,{})]})}const Z$=[{path:"/chat",component:X$,name:"chat"}],HC=[...Z$],WC=[...XL],J$=[...HC,...WC];function eB(){return y.jsx(aP,{future:{v7_startTransition:!0},children:y.jsxs(uP,{children:[HC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t)),WC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}const tB=v.forwardRef((e,t)=>{const{data:n,isLoading:r}=m2(e.link_id),{widget:i,setWidget:s,setSoundPath:o,setDefaultValues:a,setOpen:l,setOnTooltipClose:c,setIsTooltipVisible:d,setOnOpen:u,setOnClose:f,onOpen:h,onClose:m}=kt();return v.useImperativeHandle(t,()=>({open:()=>{l(!0),h&&h()},close:()=>{l(!1),m&&m()}})),v.useEffect(()=>{n&&Array.isArray(n)&&v2(n[0])&&s(n[0]),e.soundPath&&o(e.soundPath),e.defaultValues&&a(e.defaultValues),e.onTooltipClose&&c(e.onTooltipClose),e.showTooltip===!1&&d(!1),e.onOpen&&u(e.onOpen),e.onClose&&f(e.onClose)},[n,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),r?y.jsx("div",{children:"Loading..."}):i?y.jsx(ML,{children:y.jsx(TD,{children:y.jsx(eB,{})})}):y.jsx("div",{children:"Widget not found"})}),nB=new X_;let Px=null;function rB(e){if(!e.container)return;const t=N.createRef();return Px=Zw(e.container),Px.render(y.jsxs(n2,{client:nB,children:[y.jsx(tB,{...e,ref:t}),y.jsx(TL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()}}}window.widget=rB});export default iB();
|
|
135
|
+
*/const UI=[["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"}]],PC=VI("cloud-upload",UI);var jC={exports:{}},HI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",WI=HI,qI=WI;function RC(){}function AC(){}AC.resetWarningCache=RC;var GI=function(){function e(r,i,s,o,a,l){if(l!==qI){var c=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 c.name="Invariant Violation",c}}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:AC,resetWarningCache:RC};return n.PropTypes=n,n};jC.exports=GI();var QI=jC.exports;const ye=Xi(QI);function ds(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{c(r.next(d))}catch(u){o(u)}}function l(d){try{c(r.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const YI=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 go(e,t,n){const r=KI(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&gx(r,"path",s),gx(r,"relativePath",s),r}function KI(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=YI.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function gx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const XI=[".DS_Store","Thumbs.db"];function ZI(e){return ds(this,void 0,void 0,function*(){return Xu(e)&&JI(e.dataTransfer)?r$(e.dataTransfer,e.type):e$(e)?t$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?n$(e):[]})}function JI(e){return Xu(e)}function e$(e){return Xu(e)&&Xu(e.target)}function Xu(e){return typeof e=="object"&&e!==null}function t$(e){return ih(e.target.files).map(t=>go(t))}function n$(e){return ds(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>go(n))})}function r$(e,t){return ds(this,void 0,void 0,function*(){if(e.items){const n=ih(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(i$));return vx(OC(r))}return vx(ih(e.files).map(n=>go(n)))})}function vx(e){return e.filter(t=>XI.indexOf(t.name)===-1)}function ih(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 i$(e){if(typeof e.webkitGetAsEntry!="function")return yx(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?DC(t):yx(e,t)}function OC(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?OC(n):[n]],[])}function yx(e,t){return ds(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,go(o)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return go(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function s$(e){return ds(this,void 0,void 0,function*(){return e.isDirectory?DC(e):o$(e)})}function DC(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(o=>ds(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(s$));i.push(a),s()}else try{const a=yield Promise.all(i);n(a)}catch(a){r(a)}}),o=>{r(o)})}s()})}function o$(e){return ds(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=go(r,e.fullPath);t(i)},r=>{n(r)})})})}var nf=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 xx(e){return u$(e)||l$(e)||FC(e)||a$()}function a$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
136
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u$(e){if(Array.isArray(e))return sh(e)}function wx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wx(Object(n),!0).forEach(function(r){MC(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 MC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function za(e,t){return f$(e)||d$(e,t)||FC(e,t)||c$()}function c$(){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 FC(e,t){if(e){if(typeof e=="string")return sh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sh(e,t)}}function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function f$(e){if(Array.isArray(e))return e}var p$=typeof nf=="function"?nf:nf.default,h$="file-invalid-type",m$="file-too-large",g$="file-too-small",v$="too-many-files",y$=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:h$,message:"File type must be ".concat(r)}},Sx=function(t){return{code:m$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},kx=function(t){return{code:g$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},x$={code:v$,message:"Too many files"};function NC(e,t){var n=e.type==="application/x-moz-file"||p$(e,t);return[n,n?null:y$(t)]}function LC(e,t,n){if(ki(e.size))if(ki(t)&&ki(n)){if(e.size>n)return[!1,Sx(n)];if(e.size<t)return[!1,kx(t)]}else{if(ki(t)&&e.size<t)return[!1,kx(t)];if(ki(n)&&e.size>n)return[!1,Sx(n)]}return[!0,null]}function ki(e){return e!=null}function w$(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,o=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&o>=1&&t.length>o?!1:t.every(function(l){var c=NC(l,n),d=za(c,1),u=d[0],f=LC(l,r,i),p=za(f,1),h=p[0],m=a?a(l):null;return u&&h&&!m})}function Zu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Bl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Cx(e){e.preventDefault()}function b$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function S$(e){return e.indexOf("Edge/")!==-1}function k$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return b$(e)||S$(e)}function On(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return t.some(function(a){return!Zu(r)&&a&&a.apply(void 0,[r].concat(s)),Zu(r)})}}function C$(){return"showOpenFilePicker"in window}function T$(e){if(ki(e)){var t=Object.entries(e).filter(function(n){var r=za(n,2),i=r[0],s=r[1],o=!0;return IC(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($C))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=za(r,2),s=i[0],o=i[1];return bx(bx({},n),{},MC({},s,o))},{});return[{description:"Files",accept:t}]}return e}function E$(e){if(ki(e))return Object.entries(e).reduce(function(t,n){var r=za(n,2),i=r[0],s=r[1];return[].concat(xx(t),[i],xx(s))},[]).filter(function(t){return IC(t)||$C(t)}).join(",")}function _$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function P$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function IC(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function $C(e){return/^.*\.[\w]+$/.test(e)}var j$=["children"],R$=["open"],A$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],O$=["refKey","onChange","onClick"];function D$(e){return N$(e)||F$(e)||BC(e)||M$()}function M$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N$(e){if(Array.isArray(e))return oh(e)}function rf(e,t){return $$(e)||I$(e,t)||BC(e,t)||L$()}function L$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BC(e,t){if(e){if(typeof e=="string")return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function $$(e){if(Array.isArray(e))return e}function Tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(n),!0).forEach(function(r){ah(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ju(e,t){if(e==null)return{};var n=B$(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var al=v.forwardRef(function(e,t){var n=e.children,r=Ju(e,j$),i=z$(r),s=i.open,o=Ju(i,R$);return v.useImperativeHandle(t,function(){return{open:s}},[s]),N.createElement(v.Fragment,null,n(_e(_e({},o),{},{open:s})))});al.displayName="Dropzone";var zC={disabled:!1,getFilesFromEvent:ZI,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};al.defaultProps=zC;al.propTypes={children:ye.func,accept:ye.objectOf(ye.arrayOf(ye.string)),multiple:ye.bool,preventDropOnDocument:ye.bool,noClick:ye.bool,noKeyboard:ye.bool,noDrag:ye.bool,noDragEventsBubbling:ye.bool,minSize:ye.number,maxSize:ye.number,maxFiles:ye.number,disabled:ye.bool,getFilesFromEvent:ye.func,onFileDialogCancel:ye.func,onFileDialogOpen:ye.func,useFsAccessApi:ye.bool,autoFocus:ye.bool,onDragEnter:ye.func,onDragLeave:ye.func,onDragOver:ye.func,onDrop:ye.func,onDropAccepted:ye.func,onDropRejected:ye.func,onError:ye.func,validator:ye.func};var lh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function z$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_e(_e({},zC),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,o=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,u=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,x=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,b=t.preventDropOnDocument,k=t.noClick,T=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,j=t.onError,M=t.validator,P=v.useMemo(function(){return E$(n)},[n]),I=v.useMemo(function(){return T$(n)},[n]),F=v.useMemo(function(){return typeof x=="function"?x:Ex},[x]),B=v.useMemo(function(){return typeof m=="function"?m:Ex},[m]),V=v.useRef(null),re=v.useRef(null),J=v.useReducer(V$,lh),te=rf(J,2),O=te[0],$=te[1],H=O.isFocused,q=O.isFileDialogActive,Q=v.useRef(typeof window<"u"&&window.isSecureContext&&g&&C$()),ee=function(){!Q.current&&q&&setTimeout(function(){if(re.current){var D=re.current.files;D.length||($({type:"closeDialog"}),B())}},300)};v.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[re,q,B,Q]);var ce=v.useRef([]),ve=function(D){V.current&&V.current.contains(D.target)||(D.preventDefault(),ce.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",Cx,!1),document.addEventListener("drop",ve,!1)),function(){b&&(document.removeEventListener("dragover",Cx),document.removeEventListener("drop",ve))}},[V,b]),v.useEffect(function(){return!r&&w&&V.current&&V.current.focus(),function(){}},[V,w,r]);var ne=v.useCallback(function(A){j?j(A):console.error(A)},[j]),Ne=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[].concat(D$(ce.current),[A.target]),Bl(A)&&Promise.resolve(i(A)).then(function(D){if(!(Zu(A)&&!_)){var G=D.length,X=G>0&&w$({files:D,accept:P,minSize:o,maxSize:s,multiple:a,maxFiles:l,validator:M}),ae=G>0&&!X;$({isDragAccept:X,isDragReject:ae,isDragActive:!0,type:"setDraggedFiles"}),c&&c(A)}}).catch(function(D){return ne(D)})},[i,c,ne,_,P,o,s,a,l,M]),Je=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=Bl(A);if(D&&A.dataTransfer)try{A.dataTransfer.dropEffect="copy"}catch{}return D&&u&&u(A),!1},[u,_]),et=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A);var D=ce.current.filter(function(X){return V.current&&V.current.contains(X)}),G=D.indexOf(A.target);G!==-1&&D.splice(G,1),ce.current=D,!(D.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bl(A)&&d&&d(A))},[V,d,_]),Ft=v.useCallback(function(A,D){var G=[],X=[];A.forEach(function(ae){var Ve=NC(ae,P),tt=rf(Ve,2),Pn=tt[0],Qt=tt[1],ps=LC(ae,o,s),Xn=rf(ps,2),xr=Xn[0],hs=Xn[1],Po=M?M(ae):null;if(Pn&&xr&&!Po)G.push(ae);else{var pi=[Qt,hs];Po&&(pi=pi.concat(Po)),X.push({file:ae,errors:pi.filter(function(jn){return jn})})}}),(!a&&G.length>1||a&&l>=1&&G.length>l)&&(G.forEach(function(ae){X.push({file:ae,errors:[x$]})}),G.splice(0)),$({acceptedFiles:G,fileRejections:X,isDragReject:X.length>0,type:"setFiles"}),f&&f(G,X,D),X.length>0&&h&&h(X,D),G.length>0&&p&&p(G,D)},[$,a,P,o,s,l,f,p,h,M]),_n=v.useCallback(function(A){A.preventDefault(),A.persist(),yr(A),ce.current=[],Bl(A)&&Promise.resolve(i(A)).then(function(D){Zu(A)&&!_||Ft(D,A)}).catch(function(D){return ne(D)}),$({type:"reset"})},[i,Ft,ne,_]),dn=v.useCallback(function(){if(Q.current){$({type:"openDialog"}),F();var A={multiple:a,types:I};window.showOpenFilePicker(A).then(function(D){return i(D)}).then(function(D){Ft(D,null),$({type:"closeDialog"})}).catch(function(D){_$(D)?(B(D),$({type:"closeDialog"})):P$(D)?(Q.current=!1,re.current?(re.current.value=null,re.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ne(D)});return}re.current&&($({type:"openDialog"}),F(),re.current.value=null,re.current.click())},[$,F,B,g,Ft,ne,I,a]),di=v.useCallback(function(A){!V.current||!V.current.isEqualNode(A.target)||(A.key===" "||A.key==="Enter"||A.keyCode===32||A.keyCode===13)&&(A.preventDefault(),dn())},[V,dn]),gr=v.useCallback(function(){$({type:"focus"})},[]),fs=v.useCallback(function(){$({type:"blur"})},[]),fi=v.useCallback(function(){k||(k$()?setTimeout(dn,0):dn())},[k,dn]),Ct=function(D){return r?null:D},vr=function(D){return T?null:Ct(D)},Ge=function(D){return E?null:Ct(D)},yr=function(D){_&&D.stopPropagation()},_o=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,X=A.role,ae=A.onKeyDown,Ve=A.onFocus,tt=A.onBlur,Pn=A.onClick,Qt=A.onDragEnter,ps=A.onDragOver,Xn=A.onDragLeave,xr=A.onDrop,hs=Ju(A,A$);return _e(_e(ah({onKeyDown:vr(On(ae,di)),onFocus:vr(On(Ve,gr)),onBlur:vr(On(tt,fs)),onClick:Ct(On(Pn,fi)),onDragEnter:Ge(On(Qt,Ne)),onDragOver:Ge(On(ps,Je)),onDragLeave:Ge(On(Xn,et)),onDrop:Ge(On(xr,_n)),role:typeof X=="string"&&X!==""?X:"presentation"},G,V),!r&&!T?{tabIndex:0}:{}),hs)}},[V,di,gr,fs,fi,Ne,Je,et,_n,T,E,r]),R=v.useCallback(function(A){A.stopPropagation()},[]),z=v.useMemo(function(){return function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=A.refKey,G=D===void 0?"ref":D,X=A.onChange,ae=A.onClick,Ve=Ju(A,O$),tt=ah({accept:P,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ct(On(X,_n)),onClick:Ct(On(ae,R)),tabIndex:-1},G,re);return _e(_e({},tt),Ve)}},[re,n,a,_n,r]);return _e(_e({},O),{},{isFocused:H&&!r,getRootProps:_o,getInputProps:z,rootRef:V,inputRef:re,open:Ct(dn)})}function V$(e,t){switch(t.type){case"focus":return _e(_e({},e),{},{isFocused:!0});case"blur":return _e(_e({},e),{},{isFocused:!1});case"openDialog":return _e(_e({},lh),{},{isFileDialogActive:!0});case"closeDialog":return _e(_e({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _e(_e({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _e(_e({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _e({},lh);default:return e}}function Ex(){}const VC=5*1024*1024,vo={"text/plain":[".txt"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"],"image/svg+xml":[".svg"]},_x=Object.values(vo).flat();function U$(e){var r;if(e.size>VC)return{isValid:!1,error:`Dosya boyutu 1MB'dan büyük olamaz. Seçilen dosya: ${(e.size/1024/1024).toFixed(2)}MB`};const t=`.${(r=e.name.split(".").pop())==null?void 0:r.toLowerCase()}`;return Object.keys(vo).includes(e.type)||_x.includes(t)?{isValid:!0,error:""}:{isValid:!1,error:`Desteklenmeyen dosya tipi. Kabul edilen tipler: ${_x.join(", ")}`}}function ec(e){for(const t of e){const n=U$(t);if(!n.isValid)return n}return{isValid:!0,error:""}}function UC({onDrop:e}){const t=n=>{const r=ec(n);if(!r.isValid){alert(r.error);return}e(n)};return y.jsx("div",{className:"flex items-center justify-center border rounded-md cursor-pointer bg-slate-100 dropzone border-slate-200 dz-clickable",children:y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),maxSize:VC,children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-full py-5 text-lg text-center dz-message needsclick",...n(),children:[y.jsx("input",{...r()}),y.jsx("div",{className:"mb-3",children:y.jsx(PC,{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"})]})]})})})}UC.Button=({onDrop:e})=>{const t=n=>{const r=ec(n);if(!r.isValid){Us({description:r.error,variant:"error"});return}e(n)};return y.jsx(al,{onDrop:t,accept:Object.keys(vo).reduce((n,r)=>(n[r]=vo[r],n),{}),children:({getRootProps:n,getInputProps:r})=>y.jsxs("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center hover:bg-slate-100 text-center dz-message needsclick cursor-pointer",...n(),children:[y.jsx("input",{...r()}),y.jsx(PC,{className:"size-6 text-slate-500 fill-slate-200"})]})})};function H$({onNewMessage:e,client_id:t,is_uploadable:n,messages:r}){const i=v.useRef(null),s=ui(),o=OD(t),a=Oe(),l=rl(),{setIsInputFocused:c}=kt(),[d,u]=v.useState(""),[f,p]=v.useState("3rem"),[h,m]=v.useState(!1),[x,g]=v.useState([]),[w,b]=v.useState(0),[k,T]=v.useState(!1),[E,_]=v.useState(0),[j,M]=v.useState(null);v.useEffect(()=>{if(r.length>0){const F=r[r.length-1];F.id!==j&&(M(F.id),F.sender_type===Le.User&&(b(0),T(!1)))}},[r,j]),v.useEffect(()=>{let F;return k&&E>0&&(F=window.setTimeout(()=>{_(B=>B<=1?(T(!1),b(0),0):B-1)},1e3)),()=>clearTimeout(F)},[k,E]),v.useEffect(()=>{const F=i.current;if(F){const B=()=>c(!0),V=()=>c(!1);return F.addEventListener("focus",B),F.addEventListener("blur",V),()=>{F.removeEventListener("focus",B),F.removeEventListener("blur",V)}}},[c]),Km("paste",F=>{const B=F.clipboardData.items,V=[];for(const re of B){const J=re.getAsFile();J&&V.push(J)}if(V.length>0&&!n){Us({description:l(Y.FileUploadDisabled),variant:"error"});return}if(V.length>0){const re=ec(V);if(!re.isValid){Us({description:re.error,variant:"error"});return}g([...x,...V])}});const P=async()=>{if(!d.trim()&&(!n||x.length===0))return;if(w>5&&!k){T(!0),_(3);return}if(k)return;m(!0);let F;if(n&&x.length>0){const[B,V]=await o.mutateAsync(x);vc(V)&&DD(B)&&(F=B.file_urls)}s==null||s.emit(En.MessageCreate,{content:d,files:F},B=>{u(""),e(B),m(!1),g([]),b(V=>V+1),i.current&&(i.current.style.height="3rem",p("3rem"))})},I=F=>{s==null||s.emit(En.MessageTyping,{content:F})};return y.jsxs(y.Fragment,{children:[k&&y.jsxs(be.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-2 mx-3 rounded-lg z-[100] p-2 flex items-center justify-center",style:{backgroundColor:a.getColor(C.ErrorBackground),borderColor:a.getColor(C.ErrorBorder),borderWidth:"1px",borderStyle:"solid",borderRadius:a.getRadius()},children:[y.jsx(fe.XCircle,{className:"size-4 mr-2",style:{color:a.getColor(C.ErrorText)}}),y.jsx("span",{className:"text-sm font-medium",style:{color:a.getColor(C.ErrorText)},children:l(Y.RateLimitMessage).replace("{seconds}",E.toString())})]}),y.jsxs("form",{className:"p-3 flex items-start gap-3 rounded-b-xl relative",style:{backgroundColor:a.getColor(C.FooterBackground),borderRadius:a.getRadius()},onSubmit:F=>{F.preventDefault(),P(),F.currentTarget.reset()},children:[n&&x&&x.length>0&&y.jsx("div",{className:"absolute bottom-18 w-full overflow-x-auto",children:y.jsx(EC,{files:x,onDelete:F=>{g(x.filter((B,V)=>V!==F))}})}),y.jsxs("div",{className:"grow relative",children:[y.jsx(vg,{id:"message",inputRef:i,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:f,maxHeight:"6rem"},placeholder:l(Y.MessagePlaceholder),value:d,maxLength:2e3,onChange:F=>{const B=F.target.value;if(B.length<=2e3&&(u(B),I(B)),B.length>0&&F.currentTarget.scrollHeight>F.currentTarget.clientHeight){const V=`${F.currentTarget.scrollHeight}px`;F.currentTarget.style.height=V,p(V)}else F.currentTarget.style.height="3rem",p("3rem")},onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),F.stopPropagation(),P())}}),d.length>=500&&y.jsx("div",{className:"absolute bottom-1 right-2 text-xs",style:{color:d.length>=2e3?a.getColor(C.ErrorText):a.getColor(C.FooterText),fontWeight:d.length>=2e3?"600":"normal"},children:2e3-d.length})]}),y.jsxs(be.div,{whileTap:{scale:.95},className:"flex items-center gap-2 justify-center",children:[n&&y.jsx(UC.Button,{onDrop:F=>{if(F.length){const B=ec(F);if(!B.isValid){console.log("val",B),Us({description:B.error,variant:"error"});return}g([...x,...F])}}}),y.jsx(on,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:h||!d.trim()&&x.length===0||k,children:h?y.jsx(fe.Spin,{className:"size-6 animate-spin"}):k?y.jsx("span",{className:"text-xs font-bold",children:E}):y.jsx(fe.PaperAirplane,{className:"size-6 -rotate-12"})})]})]})]})}function W$({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var g,w;const{widget:o,setOpen:a,open:l,isHaveChat:c,isInputFocused:d}=kt(),u=Oe(),f=is(),p=ui(),h=v.useRef(new Set),m=v.useRef(!1),x=v.useCallback(()=>{if(!p||!l||!c)return;const b=r.filter(k=>k.sender_type===Le.User&&!h.current.has(k.id)).map(k=>k.id);b.length!==0&&p.emit(En.MessageRead,{message_ids:b},k=>{if(k&&k.success===!0)for(const T of b)h.current.add(T)})},[p,r,l,c]);return v.useEffect(()=>{l&&(m.current=!0),l&&c&&(d||m.current)&&(x(),m.current=!1)},[l,c,d,x]),y.jsxs(y.Fragment,{children:[y.jsxs("header",{style:{backgroundColor:u.getColor(C.HeaderBackground),color:u.getColor(C.HeaderText),borderBottom:`1px solid ${u.getColor(C.HeaderBorder)}`,borderTopLeftRadius:f?"":u.getRadius(),borderTopRightRadius:f?"":u.getRadius()},className:"p-4 flex justify-between items-center z-10",children:[e!=null&&e.agent_name?y.jsx(JL,{name:e.agent_name,avatar:e.agent_avatar,textColor:u.getColor(C.HeaderText)}):y.jsx("div",{style:{color:u.getColor(C.HeaderText)},className:"font-medium",children:((w=(g=o==null?void 0:o.appearance)==null?void 0:g.design)==null?void 0:w.greeting_header)||"Bizimle Sohbet Edin"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(RI,{onChatClose:s}),f&&y.jsx("button",{type:"button",style:{color:u.getColor(C.HeaderText)},onClick:()=>a(!1),children:y.jsx(fe.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),y.jsx(NI,{messages:r,isTyping:t||n.length>0}),y.jsx(H$,{client_id:(o==null?void 0:o.client_id)||"",is_uploadable:e.is_customer_uploadable,messages:r,onNewMessage:b=>{i(b)}}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:u.getColor(C.FooterText),borderTop:`1px solid ${u.getColor(C.FooterBorder)}`,backgroundColor:u.getColor(C.FooterBackground)},children:[y.jsx("span",{children:"Powered by"}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function q$({rating:e,onChange:t}){const n=Oe();return y.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(r=>{const i=r<=e,s=!i&&r-.5<=e;return y.jsxs("div",{className:"relative w-10 h-10",children:[y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarInactiveColor),fill:n.getColor(C.StarInactiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),s&&y.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:y.jsx("svg",{className:"w-10 h-10",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),i&&y.jsx("svg",{className:"w-10 h-10 absolute top-0 left-0",style:{color:n.getColor(C.StarActiveColor),fill:n.getColor(C.StarActiveColor)},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),y.jsxs("div",{className:"absolute inset-0 flex",children:[y.jsx("button",{type:"button",onClick:()=>t(r-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r-.5} stars`}),y.jsx("button",{type:"button",onClick:()=>t(r),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${r} stars`})]})]},r)})})}function G$({onOk:e}){const t=Oe(),n=rl(),[r,i]=v.useState(0),[s,o]=v.useState(!1),[a,l]=v.useState(10),c=AD(),[d,u]=v.useState(!1);v.useEffect(()=>{if(s){const m=setInterval(()=>{l(x=>x<=1?(clearInterval(m),e(!0),0):x-1)},1e3);return()=>clearInterval(m)}},[s]);const f=ng({comment:Yu()}),p=uC({init:{comment:""},schema:f,action:async m=>{const[x,g]=await c.mutateAsync({rating:r,comment:m.comment});if(vc(g)){o(!0);return}dC(x,{form:p})}}),h=()=>{e(!0)};return y.jsxs("div",{className:"flex flex-col h-full",children:[y.jsxs("header",{style:{backgroundColor:s?t.getColor(C.RatingSuccessBackground):t.getColor(C.RatingHeaderBackground),color:s?t.getColor(C.RatingSuccessText):t.getColor(C.RatingHeaderText),borderBottom:`1px solid ${t.getColor(C.HeaderBorder)}`},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[y.jsx("div",{className:"font-medium",children:n(s?Y.RatingHeaderThanks:Y.RatingHeaderEvaluate)}),y.jsx(on,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"sm",rounded:!0,onClick:()=>e(!1),className:"text-inherit cursor-pointer",children:y.jsx(fe.X,{className:"size-4"})})]}),y.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:s?y.jsxs(be.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[y.jsx("div",{className:"mb-4",style:{color:t.getColor(C.SuccessText)},children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h2",{className:"text-xl font-semibold mb-2",style:{color:t.getColor(C.HeaderText)},children:n(Y.RatingThankYouTitle)}),y.jsx("p",{className:"mb-8",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingThankYouDescription)}),y.jsx("p",{className:"mb-4",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingCountdown).replace("{seconds}",a.toString())}),y.jsx(on,{onClick:h,className:"w-full max-w-xs rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]}):y.jsxs(be.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[y.jsx("div",{className:"text-center mb-6",children:y.jsx("p",{className:"text-base",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingDescription)})}),y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-center font-medium mb-2 text-lg",style:{color:t.getColor(C.RatingRateConversationText)},children:n(Y.RatingRateConversation)}),y.jsx(q$,{rating:r,onChange:m=>{i(m),m>=1&&u(!1)}}),r>0&&y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.FooterText)},children:n(Y.RatingYourScore).replace("{score}",Number.isInteger(r)?r.toString():r.toFixed(1))}),r>0&&r<1||d?y.jsx("p",{className:"text-center text-sm mt-1",style:{color:t.getColor(C.ErrorText)},children:n(Y.RatingMinimumError)}):null]}),y.jsxs("form",{onSubmit:p.handleSubmit,className:"space-y-5",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium mb-1",style:{color:t.getColor(C.InputText)},children:n(Y.RatingComment)}),y.jsx(vg,{id:"comment",onChange:p.handleChange,onBlur:p.handleBlur,value:p.values.comment,placeholder:n(Y.RatingCommentPlaceholder),className:"rounded-lg shadow-sm",style:{borderColor:t.getColor(C.InputBorder),backgroundColor:t.getColor(C.InputBackground),color:t.getColor(C.InputText),borderRadius:t.getRadius()},error:p.errors.comment})]}),y.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[y.jsx(on,{type:"submit",onClick:m=>{r<1&&(m.preventDefault(),m.stopPropagation(),u(!0))},className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.ButtonBackground),color:t.getColor(C.ButtonText),borderRadius:t.getRadius()},children:n(Y.RatingSubmit)}),y.jsx(on,{onClick:h,className:"w-full rounded-lg py-2.5 font-medium transition-colors",style:{backgroundColor:t.getColor(C.GreeterBackground),color:t.getColor(C.GreeterText),borderRadius:t.getRadius()},children:n(Y.RatingNewConversation)})]})]})]})}),y.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center flex items-center justify-center gap-1 transition-colors",style:{color:t.getColor(C.FooterText),borderTop:`1px solid ${t.getColor(C.FooterBorder)}`,backgroundColor:t.getColor(C.FooterBackground)},children:[y.jsx("span",{children:n(Y.PoweredBy)}),y.jsx("span",{className:"font-medium",children:"Alfatek"}),y.jsx("img",{src:"https://alfatekyazilim.com.tr/images/favicon.png",alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function Q$({children:e}){const{widget:t}=kt();return t?y.jsx("section",{className:"h-full w-full relative",children:e}):null}function Y$({children:e}){const t=ui(),n=Pc();return v.useEffect(()=>{t&&t.connect()},[]),t?t.connected?e:(n.push("registration"),null):null}function K$(){const{widget:e,setOpen:t,setIsHaveChat:n}=kt(),r=Oe(),i=ui(),s=il(),o=Pc(),a=is(),[l,c]=v.useState(null),[d,u]=v.useState([]),[f,p]=v.useState(!1),[h,m]=v.useState([]),x=()=>{if(l){c({...l,status:vs.Closed});return}g()},g=b=>{b||t(!1),Vp((e==null?void 0:e.link_id)||""),n(!1),c(null),u([]),m([]),Up(e.client_id,ho(s)).then(()=>{i==null||i.disconnect(),o.push("registration")})};v.useEffect(()=>{i==null||i.emit(En.ChatView,{},b=>{if(b===null){t(!1),n(!1),Up(e.client_id,ho(s)),u([]),m([]),Vp((e==null?void 0:e.link_id)||""),o.push("registration");return}c(b),n(!0)})},[]);const w=v.useCallback(b=>{l&&![vs.Closed,vs.Deleted].includes(l.status)&&u([...d,b])},[d,l]);return v.useEffect(()=>{if(!i)return;const b=j=>{const M={content:j.content,created_at:j.created_at,files:j.files,id:j._id,sender_type:j.sender_type,answers:j.answers,reply_id:j.reply_id,buttons:j.buttons};if(h.length>0){m(P=>[...P,M]);return}j.is_shortcut?m([M]):w(M),p(!1)},k=j=>{c({...l,agent_name:j.name,agent_avatar:j.avatar,is_customer_uploadable:(l==null?void 0:l.is_customer_uploadable)??!1,status:(l==null?void 0:l.status)??vs.Open}),w({content:` _ _${j.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:Le.Activity,activity_type:Si.AdminJoin,sender_name:j.name})},T=()=>{p(!0)},E=()=>{x()},_=({is_customer_uploadable:j})=>{c(l?{...l,is_customer_uploadable:j}:null)};return i.on(st.MessageAgentCreate,b),i.on(st.ChatUserAssignee,k),i.on(st.MessageAgentTyping,T),i.on(st.ChatUserClose,E),i.on(st.ChatToggleUpload,_),()=>{i.off(st.MessageAgentCreate,b),i.off(st.ChatUserAssignee,k),i.off(st.MessageAgentTyping,T),i.off(st.ChatUserClose,E),i.off(st.ChatToggleUpload,_)}},[w]),v.useEffect(()=>{!i||!l||i.emit(En.MessageList,{},b=>{u(b)})},[i,l]),v.useEffect(()=>{const b=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(b)},[f]),v.useEffect(()=>{if(!e||h.length===0)return;let b=0;e.writing_timeout&&(b=[...h[0].content].length/e.writing_timeout,b<0&&(b=0));const k=setTimeout(()=>{w(h[0]),m(h.slice(1))},b*1e3);return()=>clearTimeout(k)},[h,e]),l?y.jsxs(y.Fragment,{children:[y.jsx("div",{id:"chat-alert-portal"}),y.jsx(Kr,{children:y.jsx(be.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:`h-full w-full ${a?"":"rounded-xl"} shadow-sm flex flex-col overflow-hidden`,style:{height:a?"100%":"",minHeight:a?"var(--app-height, 100dvh)":"",maxHeight:a?"var(--app-height, 100dvh)":"",backgroundColor:r.getColor(C.Background)},children:l.status===vs.Closed?y.jsx(G$,{onOk:g}):y.jsx(W$,{chat:l,isTyping:f,messages:d,shortcutMessages:h,onNewMessage:w,onChatClose:x})})})]}):null}function X$(){return GL(),null}function Z$(){return y.jsxs(Y$,{children:[y.jsx(xk,{defaultOpen:!0,children:y.jsx(Q$,{children:y.jsx(K$,{})})}),y.jsx(X$,{})]})}const J$=[{path:"/chat",component:Z$,name:"chat"}],HC=[...J$],WC=[...ZL],eB=[...HC,...WC];function tB(){return y.jsx(aP,{future:{v7_startTransition:!0},children:y.jsxs(uP,{children:[HC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t)),WC.map((e,t)=>y.jsx(pp,{path:e.path,element:y.jsx(e.component,{})},t))]})})}const nB=v.forwardRef((e,t)=>{const{data:n,isLoading:r}=m2(e.link_id),{widget:i,setWidget:s,setSoundPath:o,setDefaultValues:a,setOpen:l,setOnTooltipClose:c,setIsTooltipVisible:d,setOnOpen:u,setOnClose:f,onOpen:p,onClose:h}=kt();return v.useImperativeHandle(t,()=>({open:()=>{l(!0),p&&p()},close:()=>{l(!1),h&&h()}})),v.useEffect(()=>{n&&Array.isArray(n)&&v2(n[0])&&s(n[0]),e.soundPath&&o(e.soundPath),e.defaultValues&&a(e.defaultValues),e.onTooltipClose&&c(e.onTooltipClose),e.showTooltip===!1&&d(!1),e.onOpen&&u(e.onOpen),e.onClose&&f(e.onClose)},[n,e.soundPath,e.defaultValues,e.onTooltipClose,e.showTooltip,e.onOpen,e.onClose]),r?y.jsx("div",{children:"Loading..."}):i?y.jsx(FL,{children:y.jsx(TD,{children:y.jsx(tB,{})})}):y.jsx("div",{children:"Widget not found"})}),rB=new X_;let Px=null;function iB(e){if(!e.container)return;const t=N.createRef();return Px=Zw(e.container),Px.render(y.jsxs(n2,{client:rB,children:[y.jsx(nB,{...e,ref:t}),y.jsx(EL,{richColors:!0,style:{zIndex:999999,position:"fixed",bottom:"20px",right:"20px"},position:"bottom-right"})]})),{open:()=>{var n;return(n=t.current)==null?void 0:n.open()},close:()=>{var n;return(n=t.current)==null?void 0:n.close()}}}window.widget=iB});export default sB();
|