@opencx/widget 3.0.48 → 3.0.49
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/README.md +3 -2
- package/dist/designs.cjs +1 -1
- package/dist/designs.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/headless/core/__tests__/test-utils.d.ts +3 -0
- package/dist/src/headless/core/api/api-caller.d.ts +3 -0
- package/dist/src/headless/core/api/schema.d.ts +3 -0
- package/dist/src/headless/core/types/widget-config.d.ts +5 -0
- package/dist/{useUploadFiles-CUl6z4mJ.js → useUploadFiles-Dp5D34Dp.js} +3 -3
- package/dist/{useUploadFiles-CUl6z4mJ.js.map → useUploadFiles-Dp5D34Dp.js.map} +1 -1
- package/dist/{useUploadFiles-CHAAYfU0.cjs → useUploadFiles-DqC2xlX8.cjs} +2 -2
- package/dist/{useUploadFiles-CHAAYfU0.cjs.map → useUploadFiles-DqC2xlX8.cjs.map} +1 -1
- package/dist/{widget.ctx-BZXHyH9V.cjs → widget.ctx-DYom-6yC.cjs} +2 -2
- package/dist/{widget.ctx-BZXHyH9V.cjs.map → widget.ctx-DYom-6yC.cjs.map} +1 -1
- package/dist/{widget.ctx-CaItHAmP.js → widget.ctx-QcHsFXpb.js} +3 -2
- package/dist/{widget.ctx-CaItHAmP.js.map → widget.ctx-QcHsFXpb.js.map} +1 -1
- package/dist-embed/script.js +2 -2
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
package/dist-embed/script.js
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{Th=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nu(e):""}function iD(e){switch(e.tag){case 5:return nu(e.type);case 16:return nu("Lazy");case 13:return nu("Suspense");case 19:return nu("SuspenseList");case 0:case 2:case 15:return e=_h(e.type,!1),e;case 11:return e=_h(e.type.render,!1),e;case 1:return e=_h(e.type,!0),e;default:return""}}function Ch(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 Sa:return"Fragment";case Ca:return"Portal";case yh:return"Profiler";case gh:return"StrictMode";case xh:return"Suspense";case wh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vx:return(e.displayName||"Context")+".Consumer";case yx: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 bh:return t=e.displayName||null,t!==null?t:Ch(e.type)||"Memo";case Ri:t=e._payload,e=e._init;try{return Ch(e(t))}catch{}}return null}function oD(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 Ch(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 Ni(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aD(e){var t=bx(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tc(e){e._valueTracker||(e._valueTracker=aD(e))}function Ex(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _c(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 Sh(e,t){var n=t.checked;return ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ni(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 _x(e,t){t=t.checked,t!=null&&mh(e,"checked",t,!1)}function Ah(e,t){_x(e,t);var n=Ni(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")?kh(e,t.type,n):t.hasOwnProperty("defaultValue")&&kh(e,t.type,Ni(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cx(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 kh(e,t,n){(t!=="number"||_c(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ru=Array.isArray;function Aa(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=""+Ni(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 Rh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return ut({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Sx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(ru(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ni(n)}}function Ax(e,t){var n=Ni(t.value),r=Ni(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 kx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Rx(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 Nh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Rx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cc,Nx=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(Cc=Cc||document.createElement("div"),Cc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function iu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ou={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},sD=["Webkit","ms","Moz","O"];Object.keys(ou).forEach(function(e){sD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ou[t]=ou[e]})});function Px(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ou.hasOwnProperty(e)&&ou[e]?(""+t).trim():t+"px"}function Ix(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Px(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var uD=ut({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 Ph(e,t){if(t){if(uD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Ih(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 Oh=null;function Dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lh=null,ka=null,Ra=null;function Ox(e){if(e=Au(e)){if(typeof Lh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Gc(t),Lh(e.stateNode,e.type,t))}}function Dx(e){ka?Ra?Ra.push(e):Ra=[e]:ka=e}function Lx(){if(ka){var e=ka,t=Ra;if(Ra=ka=null,Ox(e),t)for(e=0;e<t.length;e++)Ox(t[e])}}function Mx(e,t){return e(t)}function Fx(){}var Mh=!1;function Bx(e,t,n){if(Mh)return e(t,n);Mh=!0;try{return Mx(e,t,n)}finally{Mh=!1,(ka!==null||Ra!==null)&&(Fx(),Lx())}}function au(e,t){var n=e.stateNode;if(n===null)return null;var r=Gc(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(Q(231,t,typeof n));return n}var Fh=!1;if(Qr)try{var su={};Object.defineProperty(su,"passive",{get:function(){Fh=!0}}),window.addEventListener("test",su,su),window.removeEventListener("test",su,su)}catch{Fh=!1}function lD(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var uu=!1,Sc=null,Ac=!1,Bh=null,cD={onError:function(e){uu=!0,Sc=e}};function dD(e,t,n,r,i,o,a,s,u){uu=!1,Sc=null,lD.apply(cD,arguments)}function fD(e,t,n,r,i,o,a,s,u){if(dD.apply(this,arguments),uu){if(uu){var l=Sc;uu=!1,Sc=null}else throw Error(Q(198));Ac||(Ac=!0,Bh=l)}}function Lo(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 jx(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 Ux(e){if(Lo(e)!==e)throw Error(Q(188))}function pD(e){var t=e.alternate;if(!t){if(t=Lo(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ux(i),e;if(o===r)return Ux(i),t;o=o.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function zx(e){return e=pD(e),e!==null?Hx(e):null}function Hx(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Hx(e);if(t!==null)return t;e=e.sibling}return null}var Vx=Nn.unstable_scheduleCallback,$x=Nn.unstable_cancelCallback,hD=Nn.unstable_shouldYield,mD=Nn.unstable_requestPaint,xt=Nn.unstable_now,gD=Nn.unstable_getCurrentPriorityLevel,jh=Nn.unstable_ImmediatePriority,Wx=Nn.unstable_UserBlockingPriority,kc=Nn.unstable_NormalPriority,yD=Nn.unstable_LowPriority,Yx=Nn.unstable_IdlePriority,Rc=null,Nr=null;function vD(e){if(Nr&&typeof Nr.onCommitFiberRoot=="function")try{Nr.onCommitFiberRoot(Rc,e,void 0,(e.current.flags&128)===128)}catch{}}var dr=Math.clz32?Math.clz32:bD,xD=Math.log,wD=Math.LN2;function bD(e){return e>>>=0,e===0?32:31-(xD(e)/wD|0)|0}var Nc=64,Pc=4194304;function lu(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 Ic(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=lu(s):(o&=a,o!==0&&(r=lu(o)))}else a=n&~i,a!==0?r=lu(a):o!==0&&(r=lu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&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-dr(t),i=1<<n,r|=e[n],t&=~i;return r}function ED(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 TD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-dr(o),s=1<<a,u=i[a];u===-1?(!(s&n)||s&r)&&(i[a]=ED(s,t)):u<=t&&(e.expiredLanes|=s),o&=~s}}function Uh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qx(){var e=Nc;return Nc<<=1,!(Nc&4194240)&&(Nc=64),e}function zh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function cu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dr(t),e[t]=n}function _D(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-dr(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Hh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ye=0;function Gx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Kx,Vh,Xx,Qx,Zx,$h=!1,Oc=[],Pi=null,Ii=null,Oi=null,du=new Map,fu=new Map,Di=[],CD="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 Jx(e,t){switch(e){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":du.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fu.delete(t.pointerId)}}function pu(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Au(t),t!==null&&Vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function SD(e,t,n,r,i){switch(t){case"focusin":return Pi=pu(Pi,e,t,n,r,i),!0;case"dragenter":return Ii=pu(Ii,e,t,n,r,i),!0;case"mouseover":return Oi=pu(Oi,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return du.set(o,pu(du.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,fu.set(o,pu(fu.get(o)||null,e,t,n,r,i)),!0}return!1}function ew(e){var t=Mo(e.target);if(t!==null){var n=Lo(t);if(n!==null){if(t=n.tag,t===13){if(t=jx(n),t!==null){e.blockedOn=t,Zx(e.priority,function(){Xx(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 Dc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Oh=r,n.target.dispatchEvent(r),Oh=null}else return t=Au(n),t!==null&&Vh(t),e.blockedOn=n,!1;t.shift()}return!0}function tw(e,t,n){Dc(e)&&n.delete(t)}function AD(){$h=!1,Pi!==null&&Dc(Pi)&&(Pi=null),Ii!==null&&Dc(Ii)&&(Ii=null),Oi!==null&&Dc(Oi)&&(Oi=null),du.forEach(tw),fu.forEach(tw)}function hu(e,t){e.blockedOn===t&&(e.blockedOn=null,$h||($h=!0,Nn.unstable_scheduleCallback(Nn.unstable_NormalPriority,AD)))}function mu(e){function t(i){return hu(i,e)}if(0<Oc.length){hu(Oc[0],e);for(var n=1;n<Oc.length;n++){var r=Oc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pi!==null&&hu(Pi,e),Ii!==null&&hu(Ii,e),Oi!==null&&hu(Oi,e),du.forEach(t),fu.forEach(t),n=0;n<Di.length;n++)r=Di[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Di.length&&(n=Di[0],n.blockedOn===null);)ew(n),n.blockedOn===null&&Di.shift()}var Na=Zr.ReactCurrentBatchConfig,Lc=!0;function kD(e,t,n,r){var i=Ye,o=Na.transition;Na.transition=null;try{Ye=1,Wh(e,t,n,r)}finally{Ye=i,Na.transition=o}}function RD(e,t,n,r){var i=Ye,o=Na.transition;Na.transition=null;try{Ye=4,Wh(e,t,n,r)}finally{Ye=i,Na.transition=o}}function Wh(e,t,n,r){if(Lc){var i=Yh(e,t,n,r);if(i===null)lm(e,t,r,Mc,n),Jx(e,r);else if(SD(i,e,t,n,r))r.stopPropagation();else if(Jx(e,r),t&4&&-1<CD.indexOf(e)){for(;i!==null;){var o=Au(i);if(o!==null&&Kx(o),o=Yh(e,t,n,r),o===null&&lm(e,t,r,Mc,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else lm(e,t,r,null,n)}}var Mc=null;function Yh(e,t,n,r){if(Mc=null,e=Dh(r),e=Mo(e),e!==null)if(t=Lo(e),t===null)e=null;else if(n=t.tag,n===13){if(e=jx(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 Mc=e,null}function nw(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(gD()){case jh:return 1;case Wx:return 4;case kc:case yD:return 16;case Yx:return 536870912;default:return 16}default:return 16}}var Li=null,qh=null,Fc=null;function rw(){if(Fc)return Fc;var e,t=qh,n=t.length,r,i="value"in Li?Li.value:Li.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Fc=i.slice(e,1<r?1-r:void 0)}function Bc(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 jc(){return!0}function iw(){return!1}function Pn(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?jc:iw,this.isPropagationStopped=iw,this}return ut(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=jc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=jc)},persist:function(){},isPersistent:jc}),t}var Pa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gh=Pn(Pa),gu=ut({},Pa,{view:0,detail:0}),ND=Pn(gu),Kh,Xh,yu,Uc=ut({},gu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zh,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!==yu&&(yu&&e.type==="mousemove"?(Kh=e.screenX-yu.screenX,Xh=e.screenY-yu.screenY):Xh=Kh=0,yu=e),Kh)},movementY:function(e){return"movementY"in e?e.movementY:Xh}}),ow=Pn(Uc),PD=ut({},Uc,{dataTransfer:0}),ID=Pn(PD),OD=ut({},gu,{relatedTarget:0}),Qh=Pn(OD),DD=ut({},Pa,{animationName:0,elapsedTime:0,pseudoElement:0}),LD=Pn(DD),MD=ut({},Pa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),FD=Pn(MD),BD=ut({},Pa,{data:0}),aw=Pn(BD),jD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UD={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"},zD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zD[e])?!!t[e]:!1}function Zh(){return HD}var VD=ut({},gu,{key:function(e){if(e.key){var t=jD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?UD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zh,charCode:function(e){return e.type==="keypress"?Bc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$D=Pn(VD),WD=ut({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sw=Pn(WD),YD=ut({},gu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zh}),qD=Pn(YD),GD=ut({},Pa,{propertyName:0,elapsedTime:0,pseudoElement:0}),KD=Pn(GD),XD=ut({},Uc,{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}),QD=Pn(XD),ZD=[9,13,27,32],Jh=Qr&&"CompositionEvent"in window,vu=null;Qr&&"documentMode"in document&&(vu=document.documentMode);var JD=Qr&&"TextEvent"in window&&!vu,uw=Qr&&(!Jh||vu&&8<vu&&11>=vu),lw=" ",cw=!1;function dw(e,t){switch(e){case"keyup":return ZD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ia=!1;function e6(e,t){switch(e){case"compositionend":return fw(t);case"keypress":return t.which!==32?null:(cw=!0,lw);case"textInput":return e=t.data,e===lw&&cw?null:e;default:return null}}function t6(e,t){if(Ia)return e==="compositionend"||!Jh&&dw(e,t)?(e=rw(),Fc=qh=Li=null,Ia=!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 uw&&t.locale!=="ko"?null:t.data;default:return null}}var n6={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 pw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!n6[e.type]:t==="textarea"}function hw(e,t,n,r){Dx(r),t=Wc(t,"onChange"),0<t.length&&(n=new Gh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var xu=null,wu=null;function r6(e){Iw(e,0)}function zc(e){var t=Fa(e);if(Ex(t))return e}function i6(e,t){if(e==="change")return t}var mw=!1;if(Qr){var em;if(Qr){var tm="oninput"in document;if(!tm){var gw=document.createElement("div");gw.setAttribute("oninput","return;"),tm=typeof gw.oninput=="function"}em=tm}else em=!1;mw=em&&(!document.documentMode||9<document.documentMode)}function yw(){xu&&(xu.detachEvent("onpropertychange",vw),wu=xu=null)}function vw(e){if(e.propertyName==="value"&&zc(wu)){var t=[];hw(t,wu,e,Dh(e)),Bx(r6,t)}}function o6(e,t,n){e==="focusin"?(yw(),xu=t,wu=n,xu.attachEvent("onpropertychange",vw)):e==="focusout"&&yw()}function a6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zc(wu)}function s6(e,t){if(e==="click")return zc(t)}function u6(e,t){if(e==="input"||e==="change")return zc(t)}function l6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fr=typeof Object.is=="function"?Object.is:l6;function bu(e,t){if(fr(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(!fh.call(t,i)||!fr(e[i],t[i]))return!1}return!0}function xw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ww(e,t){var n=xw(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=xw(n)}}function bw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ew(){for(var e=window,t=_c();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_c(e.document)}return t}function nm(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 c6(e){var t=Ew(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bw(n.ownerDocument.documentElement,n)){if(r!==null&&nm(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,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ww(n,o);var a=ww(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 d6=Qr&&"documentMode"in document&&11>=document.documentMode,Oa=null,rm=null,Eu=null,im=!1;function Tw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;im||Oa==null||Oa!==_c(r)||(r=Oa,"selectionStart"in r&&nm(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}),Eu&&bu(Eu,r)||(Eu=r,r=Wc(rm,"onSelect"),0<r.length&&(t=new Gh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oa)))}function Hc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Da={animationend:Hc("Animation","AnimationEnd"),animationiteration:Hc("Animation","AnimationIteration"),animationstart:Hc("Animation","AnimationStart"),transitionend:Hc("Transition","TransitionEnd")},om={},_w={};Qr&&(_w=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function Vc(e){if(om[e])return om[e];if(!Da[e])return e;var t=Da[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _w)return om[e]=t[n];return e}var Cw=Vc("animationend"),Sw=Vc("animationiteration"),Aw=Vc("animationstart"),kw=Vc("transitionend"),Rw=new Map,Nw="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 Mi(e,t){Rw.set(e,t),Do(t,[e])}for(var am=0;am<Nw.length;am++){var sm=Nw[am],f6=sm.toLowerCase(),p6=sm[0].toUpperCase()+sm.slice(1);Mi(f6,"on"+p6)}Mi(Cw,"onAnimationEnd"),Mi(Sw,"onAnimationIteration"),Mi(Aw,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(kw,"onTransitionEnd"),_a("onMouseEnter",["mouseout","mouseover"]),_a("onMouseLeave",["mouseout","mouseover"]),_a("onPointerEnter",["pointerout","pointerover"]),_a("onPointerLeave",["pointerout","pointerover"]),Do("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Do("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Do("onBeforeInput",["compositionend","keypress","textInput","paste"]),Do("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Do("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Do("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tu="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(" "),h6=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tu));function Pw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,fD(r,t,void 0,e),e.currentTarget=null}function Iw(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 o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;Pw(i,s,l),o=u}else for(a=0;a<r.length;a++){if(s=r[a],u=s.instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;Pw(i,s,l),o=u}}}if(Ac)throw e=Bh,Ac=!1,Bh=null,e}function et(e,t){var n=t[mm];n===void 0&&(n=t[mm]=new Set);var r=e+"__bubble";n.has(r)||(Ow(t,e,2,!1),n.add(r))}function um(e,t,n){var r=0;t&&(r|=4),Ow(n,e,r,t)}var $c="_reactListening"+Math.random().toString(36).slice(2);function _u(e){if(!e[$c]){e[$c]=!0,hx.forEach(function(n){n!=="selectionchange"&&(h6.has(n)||um(n,!1,e),um(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$c]||(t[$c]=!0,um("selectionchange",!1,t))}}function Ow(e,t,n,r){switch(nw(t)){case 1:var i=kD;break;case 4:i=RD;break;default:i=Wh}n=i.bind(null,t,n,e),i=void 0,!Fh||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 lm(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Mo(s),a===null)return;if(u=a.tag,u===5||u===6){r=o=a;continue e}s=s.parentNode}}r=r.return}Bx(function(){var l=o,c=Dh(n),d=[];e:{var f=Rw.get(e);if(f!==void 0){var p=Gh,m=e;switch(e){case"keypress":if(Bc(n)===0)break e;case"keydown":case"keyup":p=$D;break;case"focusin":m="focus",p=Qh;break;case"focusout":m="blur",p=Qh;break;case"beforeblur":case"afterblur":p=Qh;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=ow;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=ID;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=qD;break;case Cw:case Sw:case Aw:p=LD;break;case kw:p=KD;break;case"scroll":p=ND;break;case"wheel":p=QD;break;case"copy":case"cut":case"paste":p=FD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=sw}var y=(t&4)!==0,b=!y&&e==="scroll",g=y?f!==null?f+"Capture":null:f;y=[];for(var x=l,w;x!==null;){w=x;var T=w.stateNode;if(w.tag===5&&T!==null&&(w=T,g!==null&&(T=au(x,g),T!=null&&y.push(Cu(x,T,w)))),b)break;x=x.return}0<y.length&&(f=new p(f,m,null,n,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Oh&&(m=n.relatedTarget||n.fromElement)&&(Mo(m)||m[Jr]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=l,m=m?Mo(m):null,m!==null&&(b=Lo(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=l),p!==m)){if(y=ow,T="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=sw,T="onPointerLeave",g="onPointerEnter",x="pointer"),b=p==null?f:Fa(p),w=m==null?f:Fa(m),f=new y(T,x+"leave",p,n,c),f.target=b,f.relatedTarget=w,T=null,Mo(c)===l&&(y=new y(g,x+"enter",m,n,c),y.target=w,y.relatedTarget=b,T=y),b=T,p&&m)t:{for(y=p,g=m,x=0,w=y;w;w=La(w))x++;for(w=0,T=g;T;T=La(T))w++;for(;0<x-w;)y=La(y),x--;for(;0<w-x;)g=La(g),w--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=La(y),g=La(g)}y=null}else y=null;p!==null&&Dw(d,f,p,y,!1),m!==null&&b!==null&&Dw(d,b,m,y,!0)}}e:{if(f=l?Fa(l):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=i6;else if(pw(f))if(mw)C=u6;else{C=a6;var _=o6}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=s6);if(C&&(C=C(e,l))){hw(d,C,n,c);break e}_&&_(e,f,l),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&kh(f,"number",f.value)}switch(_=l?Fa(l):window,e){case"focusin":(pw(_)||_.contentEditable==="true")&&(Oa=_,rm=l,Eu=null);break;case"focusout":Eu=rm=Oa=null;break;case"mousedown":im=!0;break;case"contextmenu":case"mouseup":case"dragend":im=!1,Tw(d,n,c);break;case"selectionchange":if(d6)break;case"keydown":case"keyup":Tw(d,n,c)}var A;if(Jh)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else Ia?dw(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(uw&&n.locale!=="ko"&&(Ia||I!=="onCompositionStart"?I==="onCompositionEnd"&&Ia&&(A=rw()):(Li=c,qh="value"in Li?Li.value:Li.textContent,Ia=!0)),_=Wc(l,I),0<_.length&&(I=new aw(I,e,null,n,c),d.push({event:I,listeners:_}),A?I.data=A:(A=fw(n),A!==null&&(I.data=A)))),(A=JD?e6(e,n):t6(e,n))&&(l=Wc(l,"onBeforeInput"),0<l.length&&(c=new aw("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:l}),c.data=A))}Iw(d,t)})}function Cu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=au(e,n),o!=null&&r.unshift(Cu(e,o,i)),o=au(e,t),o!=null&&r.push(Cu(e,o,i))),e=e.return}return r}function La(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Dw(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&l!==null&&(s=l,i?(u=au(n,o),u!=null&&a.unshift(Cu(n,u,s))):i||(u=au(n,o),u!=null&&a.push(Cu(n,u,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var m6=/\r\n?/g,g6=/\u0000|\uFFFD/g;function Lw(e){return(typeof e=="string"?e:""+e).replace(m6,`
|
|
38
38
|
`).replace(g6,"")}function Yc(e,t,n){if(t=Lw(t),Lw(e)!==t&&n)throw Error(Q(425))}function qc(){}var cm=null,dm=null;function fm(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 pm=typeof setTimeout=="function"?setTimeout:void 0,y6=typeof clearTimeout=="function"?clearTimeout:void 0,Mw=typeof Promise=="function"?Promise:void 0,v6=typeof queueMicrotask=="function"?queueMicrotask:typeof Mw<"u"?function(e){return Mw.resolve(null).then(e).catch(x6)}:pm;function x6(e){setTimeout(function(){throw e})}function hm(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),mu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);mu(t)}function Fi(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 Fw(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 Ma=Math.random().toString(36).slice(2),Pr="__reactFiber$"+Ma,Su="__reactProps$"+Ma,Jr="__reactContainer$"+Ma,mm="__reactEvents$"+Ma,w6="__reactListeners$"+Ma,b6="__reactHandles$"+Ma;function Mo(e){var t=e[Pr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jr]||n[Pr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fw(e);e!==null;){if(n=e[Pr])return n;e=Fw(e)}return t}e=n,n=e.parentNode}return null}function Au(e){return e=e[Pr]||e[Jr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function Gc(e){return e[Su]||null}var gm=[],Ba=-1;function Bi(e){return{current:e}}function tt(e){0>Ba||(e.current=gm[Ba],gm[Ba]=null,Ba--)}function Ze(e,t){Ba++,gm[Ba]=e.current,e.current=t}var ji={},qt=Bi(ji),gn=Bi(!1),Fo=ji;function ja(e,t){var n=e.type.contextTypes;if(!n)return ji;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yn(e){return e=e.childContextTypes,e!=null}function Kc(){tt(gn),tt(qt)}function Bw(e,t,n){if(qt.current!==ji)throw Error(Q(168));Ze(qt,t),Ze(gn,n)}function jw(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(Q(108,oD(e)||"Unknown",i));return ut({},n,r)}function Xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ji,Fo=qt.current,Ze(qt,e),Ze(gn,gn.current),!0}function Uw(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=jw(e,t,Fo),r.__reactInternalMemoizedMergedChildContext=e,tt(gn),tt(qt),Ze(qt,e)):tt(gn),Ze(gn,n)}var ei=null,Qc=!1,ym=!1;function zw(e){ei===null?ei=[e]:ei.push(e)}function E6(e){Qc=!0,zw(e)}function Ui(){if(!ym&&ei!==null){ym=!0;var e=0,t=Ye;try{var n=ei;for(Ye=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ei=null,Qc=!1}catch(i){throw ei!==null&&(ei=ei.slice(e+1)),Vx(jh,Ui),i}finally{Ye=t,ym=!1}}return null}var Ua=[],za=0,Zc=null,Jc=0,Gn=[],Kn=0,Bo=null,ti=1,ni="";function jo(e,t){Ua[za++]=Jc,Ua[za++]=Zc,Zc=e,Jc=t}function Hw(e,t,n){Gn[Kn++]=ti,Gn[Kn++]=ni,Gn[Kn++]=Bo,Bo=e;var r=ti;e=ni;var i=32-dr(r)-1;r&=~(1<<i),n+=1;var o=32-dr(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ti=1<<32-dr(t)+i|n<<i|r,ni=o+e}else ti=1<<o|n<<i|r,ni=e}function vm(e){e.return!==null&&(jo(e,1),Hw(e,1,0))}function xm(e){for(;e===Zc;)Zc=Ua[--za],Ua[za]=null,Jc=Ua[--za],Ua[za]=null;for(;e===Bo;)Bo=Gn[--Kn],Gn[Kn]=null,ni=Gn[--Kn],Gn[Kn]=null,ti=Gn[--Kn],Gn[Kn]=null}var In=null,On=null,it=!1,pr=null;function Vw(e,t){var n=Jn(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 $w(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,In=e,On=Fi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,In=e,On=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Bo!==null?{id:ti,overflow:ni}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Jn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,In=e,On=null,!0):!1;default:return!1}}function wm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function bm(e){if(it){var t=On;if(t){var n=t;if(!$w(e,t)){if(wm(e))throw Error(Q(418));t=Fi(n.nextSibling);var r=In;t&&$w(e,t)?Vw(r,n):(e.flags=e.flags&-4097|2,it=!1,In=e)}}else{if(wm(e))throw Error(Q(418));e.flags=e.flags&-4097|2,it=!1,In=e}}}function Ww(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;In=e}function ed(e){if(e!==In)return!1;if(!it)return Ww(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!fm(e.type,e.memoizedProps)),t&&(t=On)){if(wm(e))throw Yw(),Error(Q(418));for(;t;)Vw(e,t),t=Fi(t.nextSibling)}if(Ww(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){On=Fi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}On=null}}else On=In?Fi(e.stateNode.nextSibling):null;return!0}function Yw(){for(var e=On;e;)e=Fi(e.nextSibling)}function Ha(){On=In=null,it=!1}function Em(e){pr===null?pr=[e]:pr.push(e)}var T6=Zr.ReactCurrentBatchConfig;function ku(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(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function td(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qw(e){var t=e._init;return t(e._payload)}function Gw(e){function t(g,x){if(e){var w=g.deletions;w===null?(g.deletions=[x],g.flags|=16):w.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=Gi(g,x),g.index=0,g.sibling=null,g}function o(g,x,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<x?(g.flags|=2,x):w):(g.flags|=2,x)):(g.flags|=1048576,x)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,x,w,T){return x===null||x.tag!==6?(x=pg(w,g.mode,T),x.return=g,x):(x=i(x,w),x.return=g,x)}function u(g,x,w,T){var C=w.type;return C===Sa?c(g,x,w.props.children,T,w.key):x!==null&&(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ri&&qw(C)===x.type)?(T=i(x,w.props),T.ref=ku(g,x,w),T.return=g,T):(T=Cd(w.type,w.key,w.props,null,g.mode,T),T.ref=ku(g,x,w),T.return=g,T)}function l(g,x,w,T){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=hg(w,g.mode,T),x.return=g,x):(x=i(x,w.children||[]),x.return=g,x)}function c(g,x,w,T,C){return x===null||x.tag!==7?(x=qo(w,g.mode,T,C),x.return=g,x):(x=i(x,w),x.return=g,x)}function d(g,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=pg(""+x,g.mode,w),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ec:return w=Cd(x.type,x.key,x.props,null,g.mode,w),w.ref=ku(g,null,x),w.return=g,w;case Ca:return x=hg(x,g.mode,w),x.return=g,x;case Ri:var T=x._init;return d(g,T(x._payload),w)}if(ru(x)||tu(x))return x=qo(x,g.mode,w,null),x.return=g,x;td(g,x)}return null}function f(g,x,w,T){var C=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:s(g,x,""+w,T);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ec:return w.key===C?u(g,x,w,T):null;case Ca:return w.key===C?l(g,x,w,T):null;case Ri:return C=w._init,f(g,x,C(w._payload),T)}if(ru(w)||tu(w))return C!==null?null:c(g,x,w,T,null);td(g,w)}return null}function p(g,x,w,T,C){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(w)||null,s(x,g,""+T,C);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Ec:return g=g.get(T.key===null?w:T.key)||null,u(x,g,T,C);case Ca:return g=g.get(T.key===null?w:T.key)||null,l(x,g,T,C);case Ri:var _=T._init;return p(g,x,w,_(T._payload),C)}if(ru(T)||tu(T))return g=g.get(w)||null,c(x,g,T,C,null);td(x,T)}return null}function m(g,x,w,T){for(var C=null,_=null,A=x,I=x=0,U=null;A!==null&&I<w.length;I++){A.index>I?(U=A,A=null):U=A.sibling;var P=f(g,A,w[I],T);if(P===null){A===null&&(A=U);break}e&&A&&P.alternate===null&&t(g,A),x=o(P,x,I),_===null?C=P:_.sibling=P,_=P,A=U}if(I===w.length)return n(g,A),it&&jo(g,I),C;if(A===null){for(;I<w.length;I++)A=d(g,w[I],T),A!==null&&(x=o(A,x,I),_===null?C=A:_.sibling=A,_=A);return it&&jo(g,I),C}for(A=r(g,A);I<w.length;I++)U=p(A,g,I,w[I],T),U!==null&&(e&&U.alternate!==null&&A.delete(U.key===null?I:U.key),x=o(U,x,I),_===null?C=U:_.sibling=U,_=U);return e&&A.forEach(function($){return t(g,$)}),it&&jo(g,I),C}function y(g,x,w,T){var C=tu(w);if(typeof C!="function")throw Error(Q(150));if(w=C.call(w),w==null)throw Error(Q(151));for(var _=C=null,A=x,I=x=0,U=null,P=w.next();A!==null&&!P.done;I++,P=w.next()){A.index>I?(U=A,A=null):U=A.sibling;var $=f(g,A,P.value,T);if($===null){A===null&&(A=U);break}e&&A&&$.alternate===null&&t(g,A),x=o($,x,I),_===null?C=$:_.sibling=$,_=$,A=U}if(P.done)return n(g,A),it&&jo(g,I),C;if(A===null){for(;!P.done;I++,P=w.next())P=d(g,P.value,T),P!==null&&(x=o(P,x,I),_===null?C=P:_.sibling=P,_=P);return it&&jo(g,I),C}for(A=r(g,A);!P.done;I++,P=w.next())P=p(A,g,I,P.value,T),P!==null&&(e&&P.alternate!==null&&A.delete(P.key===null?I:P.key),x=o(P,x,I),_===null?C=P:_.sibling=P,_=P);return e&&A.forEach(function(H){return t(g,H)}),it&&jo(g,I),C}function b(g,x,w,T){if(typeof w=="object"&&w!==null&&w.type===Sa&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ec:e:{for(var C=w.key,_=x;_!==null;){if(_.key===C){if(C=w.type,C===Sa){if(_.tag===7){n(g,_.sibling),x=i(_,w.props.children),x.return=g,g=x;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ri&&qw(C)===_.type){n(g,_.sibling),x=i(_,w.props),x.ref=ku(g,_,w),x.return=g,g=x;break e}n(g,_);break}else t(g,_);_=_.sibling}w.type===Sa?(x=qo(w.props.children,g.mode,T,w.key),x.return=g,g=x):(T=Cd(w.type,w.key,w.props,null,g.mode,T),T.ref=ku(g,x,w),T.return=g,g=T)}return a(g);case Ca:e:{for(_=w.key;x!==null;){if(x.key===_)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(g,x.sibling),x=i(x,w.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=hg(w,g.mode,T),x.return=g,g=x}return a(g);case Ri:return _=w._init,b(g,x,_(w._payload),T)}if(ru(w))return m(g,x,w,T);if(tu(w))return y(g,x,w,T);td(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,w),x.return=g,g=x):(n(g,x),x=pg(w,g.mode,T),x.return=g,g=x),a(g)):n(g,x)}return b}var Va=Gw(!0),Kw=Gw(!1),nd=Bi(null),rd=null,$a=null,Tm=null;function _m(){Tm=$a=rd=null}function Cm(e){var t=nd.current;tt(nd),e._currentValue=t}function Sm(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 Wa(e,t){rd=e,Tm=$a=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(vn=!0),e.firstContext=null)}function Xn(e){var t=e._currentValue;if(Tm!==e)if(e={context:e,memoizedValue:t,next:null},$a===null){if(rd===null)throw Error(Q(308));$a=e,rd.dependencies={lanes:0,firstContext:e}}else $a=$a.next=e;return t}var Uo=null;function Am(e){Uo===null?Uo=[e]:Uo.push(e)}function Xw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Am(t)):(n.next=i.next,i.next=n),t.interleaved=n,ri(e,r)}function ri(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 zi=!1;function km(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qw(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 ii(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,je&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ri(e,n)}return i=r.interleaved,i===null?(t.next=t,Am(r)):(t.next=i.next,i.next=t),r.interleaved=t,ri(e,n)}function id(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,Hh(e,n)}}function Zw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 od(e,t,n,r){var i=e.updateQueue;zi=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;a=0,c=l=u=null,s=o;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,y=s;switch(f=t,p=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=ut({},d,f);break e;case 2:zi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(l=c=p,u=d):c=c.next=p,a|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Vo|=a,e.lanes=a,e.memoizedState=d}}function Jw(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(Q(191,i));i.call(r)}}}var Ru={},Ir=Bi(Ru),Nu=Bi(Ru),Pu=Bi(Ru);function zo(e){if(e===Ru)throw Error(Q(174));return e}function Rm(e,t){switch(Ze(Pu,t),Ze(Nu,e),Ze(Ir,Ru),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nh(t,e)}tt(Ir),Ze(Ir,t)}function Ya(){tt(Ir),tt(Nu),tt(Pu)}function eb(e){zo(Pu.current);var t=zo(Ir.current),n=Nh(t,e.type);t!==n&&(Ze(Nu,e),Ze(Ir,n))}function Nm(e){Nu.current===e&&(tt(Ir),tt(Nu))}var lt=Bi(0);function ad(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 Pm=[];function Im(){for(var e=0;e<Pm.length;e++)Pm[e]._workInProgressVersionPrimary=null;Pm.length=0}var sd=Zr.ReactCurrentDispatcher,Om=Zr.ReactCurrentBatchConfig,Ho=0,ct=null,kt=null,Ot=null,ud=!1,Iu=!1,Ou=0,_6=0;function Gt(){throw Error(Q(321))}function Dm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fr(e[n],t[n]))return!1;return!0}function Lm(e,t,n,r,i,o){if(Ho=o,ct=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,sd.current=e===null||e.memoizedState===null?k6:R6,e=n(r,i),Iu){o=0;do{if(Iu=!1,Ou=0,25<=o)throw Error(Q(301));o+=1,Ot=kt=null,t.updateQueue=null,sd.current=N6,e=n(r,i)}while(Iu)}if(sd.current=dd,t=kt!==null&&kt.next!==null,Ho=0,Ot=kt=ct=null,ud=!1,t)throw Error(Q(300));return e}function Mm(){var e=Ou!==0;return Ou=0,e}function Or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?ct.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function Qn(){if(kt===null){var e=ct.alternate;e=e!==null?e.memoizedState:null}else e=kt.next;var t=Ot===null?ct.memoizedState:Ot.next;if(t!==null)Ot=t,kt=e;else{if(e===null)throw Error(Q(310));kt=e,e={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},Ot===null?ct.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}function Du(e,t){return typeof t=="function"?t(e):t}function Fm(e){var t=Qn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=kt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,u=null,l=o;do{var c=l.lane;if((Ho&c)===c)u!==null&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};u===null?(s=u=d,a=r):u=u.next=d,ct.lanes|=c,Vo|=c}l=l.next}while(l!==null&&l!==o);u===null?a=r:u.next=s,fr(r,t.memoizedState)||(vn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,ct.lanes|=o,Vo|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bm(e){var t=Qn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);fr(o,t.memoizedState)||(vn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function tb(){}function nb(e,t){var n=ct,r=Qn(),i=t(),o=!fr(r.memoizedState,i);if(o&&(r.memoizedState=i,vn=!0),r=r.queue,jm(ob.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ot!==null&&Ot.memoizedState.tag&1){if(n.flags|=2048,Lu(9,ib.bind(null,n,r,i,t),void 0,null),Dt===null)throw Error(Q(349));Ho&30||rb(n,t,i)}return i}function rb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ct.updateQueue,t===null?(t={lastEffect:null,stores:null},ct.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ib(e,t,n,r){t.value=n,t.getSnapshot=r,ab(t)&&sb(e)}function ob(e,t,n){return n(function(){ab(t)&&sb(e)})}function ab(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fr(e,n)}catch{return!0}}function sb(e){var t=ri(e,1);t!==null&&yr(t,e,1,-1)}function ub(e){var t=Or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Du,lastRenderedState:e},t.queue=e,e=e.dispatch=A6.bind(null,ct,e),[t.memoizedState,e]}function Lu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ct.updateQueue,t===null?(t={lastEffect:null,stores:null},ct.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 lb(){return Qn().memoizedState}function ld(e,t,n,r){var i=Or();ct.flags|=e,i.memoizedState=Lu(1|t,n,void 0,r===void 0?null:r)}function cd(e,t,n,r){var i=Qn();r=r===void 0?null:r;var o=void 0;if(kt!==null){var a=kt.memoizedState;if(o=a.destroy,r!==null&&Dm(r,a.deps)){i.memoizedState=Lu(t,n,o,r);return}}ct.flags|=e,i.memoizedState=Lu(1|t,n,o,r)}function cb(e,t){return ld(8390656,8,e,t)}function jm(e,t){return cd(2048,8,e,t)}function db(e,t){return cd(4,2,e,t)}function fb(e,t){return cd(4,4,e,t)}function pb(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 hb(e,t,n){return n=n!=null?n.concat([e]):null,cd(4,4,pb.bind(null,t,e),n)}function Um(){}function mb(e,t){var n=Qn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Dm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gb(e,t){var n=Qn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Dm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yb(e,t,n){return Ho&21?(fr(n,t)||(n=qx(),ct.lanes|=n,Vo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,vn=!0),e.memoizedState=n)}function C6(e,t){var n=Ye;Ye=n!==0&&4>n?n:4,e(!0);var r=Om.transition;Om.transition={};try{e(!1),t()}finally{Ye=n,Om.transition=r}}function vb(){return Qn().memoizedState}function S6(e,t,n){var r=Yi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xb(e))wb(t,n);else if(n=Xw(e,t,n,r),n!==null){var i=dn();yr(n,e,r,i),bb(n,t,r)}}function A6(e,t,n){var r=Yi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xb(e))wb(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,fr(s,a)){var u=t.interleaved;u===null?(i.next=i,Am(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Xw(e,t,i,r),n!==null&&(i=dn(),yr(n,e,r,i),bb(n,t,r))}}function xb(e){var t=e.alternate;return e===ct||t!==null&&t===ct}function wb(e,t){Iu=ud=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hh(e,n)}}var dd={readContext:Xn,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useInsertionEffect:Gt,useLayoutEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useMutableSource:Gt,useSyncExternalStore:Gt,useId:Gt,unstable_isNewReconciler:!1},k6={readContext:Xn,useCallback:function(e,t){return Or().memoizedState=[e,t===void 0?null:t],e},useContext:Xn,useEffect:cb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ld(4194308,4,pb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ld(4194308,4,e,t)},useInsertionEffect:function(e,t){return ld(4,2,e,t)},useMemo:function(e,t){var n=Or();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Or();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=S6.bind(null,ct,e),[r.memoizedState,e]},useRef:function(e){var t=Or();return e={current:e},t.memoizedState=e},useState:ub,useDebugValue:Um,useDeferredValue:function(e){return Or().memoizedState=e},useTransition:function(){var e=ub(!1),t=e[0];return e=C6.bind(null,e[1]),Or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ct,i=Or();if(it){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Dt===null)throw Error(Q(349));Ho&30||rb(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,cb(ob.bind(null,r,o,e),[e]),r.flags|=2048,Lu(9,ib.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Or(),t=Dt.identifierPrefix;if(it){var n=ni,r=ti;n=(r&~(1<<32-dr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ou++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=_6++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},R6={readContext:Xn,useCallback:mb,useContext:Xn,useEffect:jm,useImperativeHandle:hb,useInsertionEffect:db,useLayoutEffect:fb,useMemo:gb,useReducer:Fm,useRef:lb,useState:function(){return Fm(Du)},useDebugValue:Um,useDeferredValue:function(e){var t=Qn();return yb(t,kt.memoizedState,e)},useTransition:function(){var e=Fm(Du)[0],t=Qn().memoizedState;return[e,t]},useMutableSource:tb,useSyncExternalStore:nb,useId:vb,unstable_isNewReconciler:!1},N6={readContext:Xn,useCallback:mb,useContext:Xn,useEffect:jm,useImperativeHandle:hb,useInsertionEffect:db,useLayoutEffect:fb,useMemo:gb,useReducer:Bm,useRef:lb,useState:function(){return Bm(Du)},useDebugValue:Um,useDeferredValue:function(e){var t=Qn();return kt===null?t.memoizedState=e:yb(t,kt.memoizedState,e)},useTransition:function(){var e=Bm(Du)[0],t=Qn().memoizedState;return[e,t]},useMutableSource:tb,useSyncExternalStore:nb,useId:vb,unstable_isNewReconciler:!1};function hr(e,t){if(e&&e.defaultProps){t=ut({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ut({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fd={isMounted:function(e){return(e=e._reactInternals)?Lo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=dn(),i=Yi(e),o=ii(r,i);o.payload=t,n!=null&&(o.callback=n),t=Hi(e,o,i),t!==null&&(yr(t,e,i,r),id(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=dn(),i=Yi(e),o=ii(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Hi(e,o,i),t!==null&&(yr(t,e,i,r),id(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=dn(),r=Yi(e),i=ii(n,r);i.tag=2,t!=null&&(i.callback=t),t=Hi(e,i,r),t!==null&&(yr(t,e,r,n),id(t,e,r))}};function Eb(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!bu(n,r)||!bu(i,o):!0}function Tb(e,t,n){var r=!1,i=ji,o=t.contextType;return typeof o=="object"&&o!==null?o=Xn(o):(i=yn(t)?Fo:qt.current,r=t.contextTypes,o=(r=r!=null)?ja(e,i):ji),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function _b(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&&fd.enqueueReplaceState(t,t.state,null)}function Hm(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},km(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Xn(o):(o=yn(t)?Fo:qt.current,i.context=ja(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(zm(e,t,o,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&&fd.enqueueReplaceState(i,i.state,null),od(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function qa(e,t){try{var n="",r=t;do n+=iD(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
39
39
|
Error generating stack: `+o.message+`
|
|
40
|
-
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Vm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $m(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var P6=typeof WeakMap=="function"?WeakMap:Map;function Cb(e,t,n){n=ii(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xd||(xd=!0,og=r),$m(e,t)},n}function Sb(e,t,n){n=ii(-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(){$m(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){$m(e,t),typeof r!="function"&&($i===null?$i=new Set([this]):$i.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Ab(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new P6;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=W6.bind(null,e,t,n),t.then(e,e))}function kb(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 Rb(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=ii(-1,1),t.tag=2,Hi(n,t,1))),n.lanes|=1),e)}var I6=Zr.ReactCurrentOwner,vn=!1;function cn(e,t,n,r){t.child=e===null?Kw(t,null,n,r):Va(t,e.child,n,r)}function Nb(e,t,n,r,i){n=n.render;var o=t.ref;return Wa(t,i),r=Lm(e,t,n,r,o,i),n=Mm(),e!==null&&!vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oi(e,t,i)):(it&&n&&vm(t),t.flags|=1,cn(e,t,r,i),t.child)}function Pb(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!fg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ib(e,t,o,r,i)):(e=Cd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:bu,n(a,r)&&e.ref===t.ref)return oi(e,t,i)}return t.flags|=1,e=Gi(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ib(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(bu(o,r)&&e.ref===t.ref)if(vn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(vn=!0);else return t.lanes=e.lanes,oi(e,t,i)}return Wm(e,t,n,r,i)}function Ob(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ze(Ka,Dn),Dn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ze(Ka,Dn),Dn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ze(Ka,Dn),Dn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ze(Ka,Dn),Dn|=r;return cn(e,t,i,n),t.child}function Db(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wm(e,t,n,r,i){var o=yn(n)?Fo:qt.current;return o=ja(t,o),Wa(t,i),n=Lm(e,t,n,r,o,i),r=Mm(),e!==null&&!vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oi(e,t,i)):(it&&r&&vm(t),t.flags|=1,cn(e,t,n,i),t.child)}function Lb(e,t,n,r,i){if(yn(n)){var o=!0;Xc(t)}else o=!1;if(Wa(t,i),t.stateNode===null)hd(e,t),Tb(t,n,r),Hm(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=Xn(l):(l=yn(n)?Fo:qt.current,l=ja(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&_b(t,a,r,l),zi=!1;var f=t.memoizedState;a.state=f,od(t,r,a,i),u=t.memoizedState,s!==r||f!==u||gn.current||zi?(typeof c=="function"&&(zm(t,n,c,r),u=t.memoizedState),(s=zi||Eb(t,n,s,r,f,u,l))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Qw(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:hr(t.type,s),a.props=l,d=t.pendingProps,f=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=Xn(u):(u=yn(n)?Fo:qt.current,u=ja(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==u)&&_b(t,a,r,u),zi=!1,f=t.memoizedState,a.state=f,od(t,r,a,i);var m=t.memoizedState;s!==d||f!==m||gn.current||zi?(typeof p=="function"&&(zm(t,n,p,r),m=t.memoizedState),(l=zi||Eb(t,n,l,r,f,m,u)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ym(e,t,n,r,o,i)}function Ym(e,t,n,r,i,o){Db(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Uw(t,n,!1),oi(e,t,o);r=t.stateNode,I6.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Va(t,e.child,null,o),t.child=Va(t,null,s,o)):cn(e,t,s,o),t.memoizedState=r.state,i&&Uw(t,n,!0),t.child}function Mb(e){var t=e.stateNode;t.pendingContext?Bw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bw(e,t.context,!1),Rm(e,t.containerInfo)}function Fb(e,t,n,r,i){return Ha(),Em(i),t.flags|=256,cn(e,t,n,r),t.child}var qm={dehydrated:null,treeContext:null,retryLane:0};function Gm(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bb(e,t,n){var r=t.pendingProps,i=lt.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ze(lt,i&1),e===null)return bm(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):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Sd(a,r,0,null),e=qo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Gm(n),t.memoizedState=qm,e):Km(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return O6(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Gi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Gi(s,o):(o=qo(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?Gm(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=qm,r}return o=e.child,e=o.sibling,r=Gi(o,{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 Km(e,t){return t=Sd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function pd(e,t,n,r){return r!==null&&Em(r),Va(t,e.child,null,n),e=Km(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function O6(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Vm(Error(Q(422))),pd(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Sd({mode:"visible",children:r.children},i,0,null),o=qo(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Va(t,e.child,null,a),t.child.memoizedState=Gm(a),t.memoizedState=qm,o);if(!(t.mode&1))return pd(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Q(419)),r=Vm(o,r,void 0),pd(e,t,a,r)}if(s=(a&e.childLanes)!==0,vn||s){if(r=Dt,r!==null){switch(a&-a){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|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ri(e,i),yr(r,e,i,-1))}return dg(),r=Vm(Error(Q(421))),pd(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Y6.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,On=Fi(i.nextSibling),In=t,it=!0,pr=null,e!==null&&(Gn[Kn++]=ti,Gn[Kn++]=ni,Gn[Kn++]=Bo,ti=e.id,ni=e.overflow,Bo=t),t=Km(t,r.children),t.flags|=4096,t)}function jb(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sm(e.return,t,n)}function Xm(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ub(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(cn(e,t,r.children,n),r=lt.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&&jb(e,n,t);else if(e.tag===19)jb(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(Ze(lt,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&&ad(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Xm(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ad(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Xm(t,!0,n,null,o);break;case"together":Xm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function oi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Vo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function D6(e,t,n){switch(t.tag){case 3:Mb(t),Ha();break;case 5:eb(t);break;case 1:yn(t.type)&&Xc(t);break;case 4:Rm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ze(nd,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ze(lt,lt.current&1),t.flags|=128,null):n&t.child.childLanes?Bb(e,t,n):(Ze(lt,lt.current&1),e=oi(e,t,n),e!==null?e.sibling:null);Ze(lt,lt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ub(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ze(lt,lt.current),r)break;return null;case 22:case 23:return t.lanes=0,Ob(e,t,n)}return oi(e,t,n)}var zb,Qm,Hb,Vb;zb=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}},Qm=function(){},Hb=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,zo(Ir.current);var o=null;switch(n){case"input":i=Sh(e,i),r=Sh(e,r),o=[];break;case"select":i=ut({},i,{value:void 0}),r=ut({},r,{value:void 0}),o=[];break;case"textarea":i=Rh(e,i),r=Rh(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=qc)}Ph(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(eu.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(eu.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&et("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Vb=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mu(e,t){if(!it)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 Kt(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 L6(e,t,n){var r=t.pendingProps;switch(xm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(t),null;case 1:return yn(t.type)&&Kc(),Kt(t),null;case 3:return r=t.stateNode,Ya(),tt(gn),tt(qt),Im(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ed(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pr!==null&&(ug(pr),pr=null))),Qm(e,t),Kt(t),null;case 5:Nm(t);var i=zo(Pu.current);if(n=t.type,e!==null&&t.stateNode!=null)Hb(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Kt(t),null}if(e=zo(Ir.current),ed(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Pr]=t,r[Su]=o,e=(t.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(i=0;i<Tu.length;i++)et(Tu[i],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":Tx(r,o),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},et("invalid",r);break;case"textarea":Sx(r,o),et("invalid",r)}Ph(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&Yc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Yc(r.textContent,s,e),i=["children",""+s]):eu.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&et("scroll",r)}switch(n){case"input":Tc(r),Cx(r,o,!0);break;case"textarea":Tc(r),kx(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=qc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Rx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Pr]=t,e[Su]=r,zb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ih(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;i<Tu.length;i++)et(Tu[i],e);i=r;break;case"source":et("error",e),i=r;break;case"img":case"image":case"link":et("error",e),et("load",e),i=r;break;case"details":et("toggle",e),i=r;break;case"input":Tx(e,r),i=Sh(e,r),et("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ut({},r,{value:void 0}),et("invalid",e);break;case"textarea":Sx(e,r),i=Rh(e,r),et("invalid",e);break;default:i=r}Ph(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var u=s[o];o==="style"?Ix(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Nx(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&iu(e,u):typeof u=="number"&&iu(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(eu.hasOwnProperty(o)?u!=null&&o==="onScroll"&&et("scroll",e):u!=null&&mh(e,o,u,a))}switch(n){case"input":Tc(e),Cx(e,r,!1);break;case"textarea":Tc(e),kx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ni(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Aa(e,!!r.multiple,o,!1):r.defaultValue!=null&&Aa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=qc)}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 Kt(t),null;case 6:if(e&&t.stateNode!=null)Vb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=zo(Pu.current),zo(Ir.current),ed(t)){if(r=t.stateNode,n=t.memoizedProps,r[Pr]=t,(o=r.nodeValue!==n)&&(e=In,e!==null))switch(e.tag){case 3:Yc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Pr]=t,t.stateNode=r}return Kt(t),null;case 13:if(tt(lt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&On!==null&&t.mode&1&&!(t.flags&128))Yw(),Ha(),t.flags|=98560,o=!1;else if(o=ed(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Q(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Q(317));o[Pr]=t}else Ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kt(t),o=!1}else pr!==null&&(ug(pr),pr=null),o=!0;if(!o)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||lt.current&1?Rt===0&&(Rt=3):dg())),t.updateQueue!==null&&(t.flags|=4),Kt(t),null);case 4:return Ya(),Qm(e,t),e===null&&_u(t.stateNode.containerInfo),Kt(t),null;case 10:return Cm(t.type._context),Kt(t),null;case 17:return yn(t.type)&&Kc(),Kt(t),null;case 19:if(tt(lt),o=t.memoizedState,o===null)return Kt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Mu(o,!1);else{if(Rt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ad(e),a!==null){for(t.flags|=128,Mu(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ze(lt,lt.current&1|2),t.child}e=e.sibling}o.tail!==null&&xt()>Xa&&(t.flags|=128,r=!0,Mu(o,!1),t.lanes=4194304)}else{if(!r)if(e=ad(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!it)return Kt(t),null}else 2*xt()-o.renderingStartTime>Xa&&n!==1073741824&&(t.flags|=128,r=!0,Mu(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=xt(),t.sibling=null,n=lt.current,Ze(lt,r?n&1|2:n&1),t):(Kt(t),null);case 22:case 23:return cg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Dn&1073741824&&(Kt(t),t.subtreeFlags&6&&(t.flags|=8192)):Kt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function M6(e,t){switch(xm(t),t.tag){case 1:return yn(t.type)&&Kc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ya(),tt(gn),tt(qt),Im(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nm(t),null;case 13:if(tt(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(lt),null;case 4:return Ya(),null;case 10:return Cm(t.type._context),null;case 22:case 23:return cg(),null;case 24:return null;default:return null}}var md=!1,Xt=!1,F6=typeof WeakSet=="function"?WeakSet:Set,se=null;function Ga(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){mt(e,t,r)}else n.current=null}function Zm(e,t,n){try{n()}catch(r){mt(e,t,r)}}var $b=!1;function B6(e,t){if(cm=Lc,e=Ew(),nm(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=a),f===o&&++c===r&&(u=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(dm={focusedElem:e,selectionRange:n},Lc=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;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 y=m.memoizedProps,b=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:hr(t.type,y),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(T){mt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return m=$b,$b=!1,m}function Fu(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 o=i.destroy;i.destroy=void 0,o!==void 0&&Zm(t,n,o)}i=i.next}while(i!==r)}}function gd(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 Jm(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 Wb(e){var t=e.alternate;t!==null&&(e.alternate=null,Wb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pr],delete t[Su],delete t[mm],delete t[w6],delete t[b6])),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 Yb(e){return e.tag===5||e.tag===3||e.tag===4}function qb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yb(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 eg(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=qc));else if(r!==4&&(e=e.child,e!==null))for(eg(e,t,n),e=e.sibling;e!==null;)eg(e,t,n),e=e.sibling}function tg(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(tg(e,t,n),e=e.sibling;e!==null;)tg(e,t,n),e=e.sibling}var zt=null,mr=!1;function Vi(e,t,n){for(n=n.child;n!==null;)Gb(e,t,n),n=n.sibling}function Gb(e,t,n){if(Nr&&typeof Nr.onCommitFiberUnmount=="function")try{Nr.onCommitFiberUnmount(Rc,n)}catch{}switch(n.tag){case 5:Xt||Ga(n,t);case 6:var r=zt,i=mr;zt=null,Vi(e,t,n),zt=r,mr=i,zt!==null&&(mr?(e=zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(mr?(e=zt,n=n.stateNode,e.nodeType===8?hm(e.parentNode,n):e.nodeType===1&&hm(e,n),mu(e)):hm(zt,n.stateNode));break;case 4:r=zt,i=mr,zt=n.stateNode.containerInfo,mr=!0,Vi(e,t,n),zt=r,mr=i;break;case 0:case 11:case 14:case 15:if(!Xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Zm(n,t,a),i=i.next}while(i!==r)}Vi(e,t,n);break;case 1:if(!Xt&&(Ga(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){mt(n,t,s)}Vi(e,t,n);break;case 21:Vi(e,t,n);break;case 22:n.mode&1?(Xt=(r=Xt)||n.memoizedState!==null,Vi(e,t,n),Xt=r):Vi(e,t,n);break;default:Vi(e,t,n)}}function Kb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new F6),t.forEach(function(r){var i=q6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function gr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:zt=s.stateNode,mr=!1;break e;case 3:zt=s.stateNode.containerInfo,mr=!0;break e;case 4:zt=s.stateNode.containerInfo,mr=!0;break e}s=s.return}if(zt===null)throw Error(Q(160));Gb(o,a,i),zt=null,mr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){mt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xb(t,e),t=t.sibling}function Xb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gr(t,e),Dr(e),r&4){try{Fu(3,e,e.return),gd(3,e)}catch(y){mt(e,e.return,y)}try{Fu(5,e,e.return)}catch(y){mt(e,e.return,y)}}break;case 1:gr(t,e),Dr(e),r&512&&n!==null&&Ga(n,n.return);break;case 5:if(gr(t,e),Dr(e),r&512&&n!==null&&Ga(n,n.return),e.flags&32){var i=e.stateNode;try{iu(i,"")}catch(y){mt(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&_x(i,o),Ih(s,a);var l=Ih(s,o);for(a=0;a<u.length;a+=2){var c=u[a],d=u[a+1];c==="style"?Ix(i,d):c==="dangerouslySetInnerHTML"?Nx(i,d):c==="children"?iu(i,d):mh(i,c,d,l)}switch(s){case"input":Ah(i,o);break;case"textarea":Ax(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Aa(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Aa(i,!!o.multiple,o.defaultValue,!0):Aa(i,!!o.multiple,o.multiple?[]:"",!1))}i[Su]=o}catch(y){mt(e,e.return,y)}}break;case 6:if(gr(t,e),Dr(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(y){mt(e,e.return,y)}}break;case 3:if(gr(t,e),Dr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{mu(t.containerInfo)}catch(y){mt(e,e.return,y)}break;case 4:gr(t,e),Dr(e);break;case 13:gr(t,e),Dr(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(ig=xt())),r&4&&Kb(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Xt=(l=Xt)||c,gr(t,e),Xt=l):gr(t,e),Dr(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(se=e,c=e.child;c!==null;){for(d=se=c;se!==null;){switch(f=se,p=f.child,f.tag){case 0:case 11:case 14:case 15:Fu(4,f,f.return);break;case 1:Ga(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(y){mt(r,n,y)}}break;case 5:Ga(f,f.return);break;case 22:if(f.memoizedState!==null){Jb(d);continue}}p!==null?(p.return=f,se=p):Jb(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,u=d.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Px("display",a))}catch(y){mt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){mt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gr(t,e),Dr(e),r&4&&Kb(e);break;case 21:break;default:gr(t,e),Dr(e)}}function Dr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Yb(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(iu(i,""),r.flags&=-33);var o=qb(e);tg(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=qb(e);eg(e,s,a);break;default:throw Error(Q(161))}}catch(u){mt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function j6(e,t,n){se=e,Qb(e)}function Qb(e,t,n){for(var r=(e.mode&1)!==0;se!==null;){var i=se,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||md;if(!a){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Xt;s=md;var l=Xt;if(md=a,(Xt=u)&&!l)for(se=i;se!==null;)a=se,u=a.child,a.tag===22&&a.memoizedState!==null?eE(i):u!==null?(u.return=a,se=u):eE(i);for(;o!==null;)se=o,Qb(o),o=o.sibling;se=i,md=s,Xt=l}Zb(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,se=o):Zb(e)}}function Zb(e){for(;se!==null;){var t=se;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xt||gd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Xt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:hr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Jw(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Jw(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&mu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Xt||t.flags&512&&Jm(t)}catch(f){mt(t,t.return,f)}}if(t===e){se=null;break}if(n=t.sibling,n!==null){n.return=t.return,se=n;break}se=t.return}}function Jb(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var n=t.sibling;if(n!==null){n.return=t.return,se=n;break}se=t.return}}function eE(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gd(4,t)}catch(u){mt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){mt(t,i,u)}}var o=t.return;try{Jm(t)}catch(u){mt(t,o,u)}break;case 5:var a=t.return;try{Jm(t)}catch(u){mt(t,a,u)}}}catch(u){mt(t,t.return,u)}if(t===e){se=null;break}var s=t.sibling;if(s!==null){s.return=t.return,se=s;break}se=t.return}}var U6=Math.ceil,yd=Zr.ReactCurrentDispatcher,ng=Zr.ReactCurrentOwner,Zn=Zr.ReactCurrentBatchConfig,je=0,Dt=null,_t=null,Ht=0,Dn=0,Ka=Bi(0),Rt=0,Bu=null,Vo=0,vd=0,rg=0,ju=null,xn=null,ig=0,Xa=1/0,ai=null,xd=!1,og=null,$i=null,wd=!1,Wi=null,bd=0,Uu=0,ag=null,Ed=-1,Td=0;function dn(){return je&6?xt():Ed!==-1?Ed:Ed=xt()}function Yi(e){return e.mode&1?je&2&&Ht!==0?Ht&-Ht:T6.transition!==null?(Td===0&&(Td=qx()),Td):(e=Ye,e!==0||(e=window.event,e=e===void 0?16:nw(e.type)),e):1}function yr(e,t,n,r){if(50<Uu)throw Uu=0,ag=null,Error(Q(185));cu(e,n,r),(!(je&2)||e!==Dt)&&(e===Dt&&(!(je&2)&&(vd|=n),Rt===4&&qi(e,Ht)),wn(e,r),n===1&&je===0&&!(t.mode&1)&&(Xa=xt()+500,Qc&&Ui()))}function wn(e,t){var n=e.callbackNode;TD(e,t);var r=Ic(e,e===Dt?Ht:0);if(r===0)n!==null&&$x(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$x(n),t===1)e.tag===0?E6(nE.bind(null,e)):zw(nE.bind(null,e)),v6(function(){!(je&6)&&Ui()}),n=null;else{switch(Gx(r)){case 1:n=jh;break;case 4:n=Wx;break;case 16:n=kc;break;case 536870912:n=Yx;break;default:n=kc}n=cE(n,tE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tE(e,t){if(Ed=-1,Td=0,je&6)throw Error(Q(327));var n=e.callbackNode;if(Qa()&&e.callbackNode!==n)return null;var r=Ic(e,e===Dt?Ht:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_d(e,r);else{t=r;var i=je;je|=2;var o=iE();(Dt!==e||Ht!==t)&&(ai=null,Xa=xt()+500,Wo(e,t));do try{V6();break}catch(s){rE(e,s)}while(!0);_m(),yd.current=o,je=i,_t!==null?t=0:(Dt=null,Ht=0,t=Rt)}if(t!==0){if(t===2&&(i=Uh(e),i!==0&&(r=i,t=sg(e,i))),t===1)throw n=Bu,Wo(e,0),qi(e,r),wn(e,xt()),n;if(t===6)qi(e,r);else{if(i=e.current.alternate,!(r&30)&&!z6(i)&&(t=_d(e,r),t===2&&(o=Uh(e),o!==0&&(r=o,t=sg(e,o))),t===1))throw n=Bu,Wo(e,0),qi(e,r),wn(e,xt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Yo(e,xn,ai);break;case 3:if(qi(e,r),(r&130023424)===r&&(t=ig+500-xt(),10<t)){if(Ic(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){dn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=pm(Yo.bind(null,e,xn,ai),t);break}Yo(e,xn,ai);break;case 4:if(qi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-dr(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=xt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*U6(r/1960))-r,10<r){e.timeoutHandle=pm(Yo.bind(null,e,xn,ai),r);break}Yo(e,xn,ai);break;case 5:Yo(e,xn,ai);break;default:throw Error(Q(329))}}}return wn(e,xt()),e.callbackNode===n?tE.bind(null,e):null}function sg(e,t){var n=ju;return e.current.memoizedState.isDehydrated&&(Wo(e,t).flags|=256),e=_d(e,t),e!==2&&(t=xn,xn=n,t!==null&&ug(t)),e}function ug(e){xn===null?xn=e:xn.push.apply(xn,e)}function z6(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],o=i.getSnapshot;i=i.value;try{if(!fr(o(),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 qi(e,t){for(t&=~rg,t&=~vd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dr(t),r=1<<n;e[n]=-1,t&=~r}}function nE(e){if(je&6)throw Error(Q(327));Qa();var t=Ic(e,0);if(!(t&1))return wn(e,xt()),null;var n=_d(e,t);if(e.tag!==0&&n===2){var r=Uh(e);r!==0&&(t=r,n=sg(e,r))}if(n===1)throw n=Bu,Wo(e,0),qi(e,t),wn(e,xt()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Yo(e,xn,ai),wn(e,xt()),null}function lg(e,t){var n=je;je|=1;try{return e(t)}finally{je=n,je===0&&(Xa=xt()+500,Qc&&Ui())}}function $o(e){Wi!==null&&Wi.tag===0&&!(je&6)&&Qa();var t=je;je|=1;var n=Zn.transition,r=Ye;try{if(Zn.transition=null,Ye=1,e)return e()}finally{Ye=r,Zn.transition=n,je=t,!(je&6)&&Ui()}}function cg(){Dn=Ka.current,tt(Ka)}function Wo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,y6(n)),_t!==null)for(n=_t.return;n!==null;){var r=n;switch(xm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Kc();break;case 3:Ya(),tt(gn),tt(qt),Im();break;case 5:Nm(r);break;case 4:Ya();break;case 13:tt(lt);break;case 19:tt(lt);break;case 10:Cm(r.type._context);break;case 22:case 23:cg()}n=n.return}if(Dt=e,_t=e=Gi(e.current,null),Ht=Dn=t,Rt=0,Bu=null,rg=vd=Vo=0,xn=ju=null,Uo!==null){for(t=0;t<Uo.length;t++)if(n=Uo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Uo=null}return e}function rE(e,t){do{var n=_t;try{if(_m(),sd.current=dd,ud){for(var r=ct.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ud=!1}if(Ho=0,Ot=kt=ct=null,Iu=!1,Ou=0,ng.current=null,n===null||n.return===null){Rt=1,Bu=t,_t=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=Ht,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=kb(a);if(p!==null){p.flags&=-257,Rb(p,a,s,o,t),p.mode&1&&Ab(o,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){Ab(o,l,t),dg();break e}u=Error(Q(426))}}else if(it&&s.mode&1){var b=kb(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Rb(b,a,s,o,t),Em(qa(u,s));break e}}o=u=qa(u,s),Rt!==4&&(Rt=2),ju===null?ju=[o]:ju.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=Cb(o,u,t);Zw(o,g);break e;case 1:s=u;var x=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&($i===null||!$i.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var T=Sb(o,s,t);Zw(o,T);break e}}o=o.return}while(o!==null)}aE(n)}catch(C){t=C,_t===n&&n!==null&&(_t=n=n.return);continue}break}while(!0)}function iE(){var e=yd.current;return yd.current=dd,e===null?dd:e}function dg(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),Dt===null||!(Vo&268435455)&&!(vd&268435455)||qi(Dt,Ht)}function _d(e,t){var n=je;je|=2;var r=iE();(Dt!==e||Ht!==t)&&(ai=null,Wo(e,t));do try{H6();break}catch(i){rE(e,i)}while(!0);if(_m(),je=n,yd.current=r,_t!==null)throw Error(Q(261));return Dt=null,Ht=0,Rt}function H6(){for(;_t!==null;)oE(_t)}function V6(){for(;_t!==null&&!hD();)oE(_t)}function oE(e){var t=lE(e.alternate,e,Dn);e.memoizedProps=e.pendingProps,t===null?aE(e):_t=t,ng.current=null}function aE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=M6(n,t),n!==null){n.flags&=32767,_t=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Rt=6,_t=null;return}}else if(n=L6(n,t,Dn),n!==null){_t=n;return}if(t=t.sibling,t!==null){_t=t;return}_t=t=e}while(t!==null);Rt===0&&(Rt=5)}function Yo(e,t,n){var r=Ye,i=Zn.transition;try{Zn.transition=null,Ye=1,$6(e,t,n,r)}finally{Zn.transition=i,Ye=r}return null}function $6(e,t,n,r){do Qa();while(Wi!==null);if(je&6)throw Error(Q(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(Q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(_D(e,o),e===Dt&&(_t=Dt=null,Ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wd||(wd=!0,cE(kc,function(){return Qa(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Zn.transition,Zn.transition=null;var a=Ye;Ye=1;var s=je;je|=4,ng.current=null,B6(e,n),Xb(n,e),c6(dm),Lc=!!cm,dm=cm=null,e.current=n,j6(n),mD(),je=s,Ye=a,Zn.transition=o}else e.current=n;if(wd&&(wd=!1,Wi=e,bd=i),o=e.pendingLanes,o===0&&($i=null),vD(n.stateNode),wn(e,xt()),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(xd)throw xd=!1,e=og,og=null,e;return bd&1&&e.tag!==0&&Qa(),o=e.pendingLanes,o&1?e===ag?Uu++:(Uu=0,ag=e):Uu=0,Ui(),null}function Qa(){if(Wi!==null){var e=Gx(bd),t=Zn.transition,n=Ye;try{if(Zn.transition=null,Ye=16>e?16:e,Wi===null)var r=!1;else{if(e=Wi,Wi=null,bd=0,je&6)throw Error(Q(331));var i=je;for(je|=4,se=e.current;se!==null;){var o=se,a=o.child;if(se.flags&16){var s=o.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(se=l;se!==null;){var c=se;switch(c.tag){case 0:case 11:case 15:Fu(8,c,o)}var d=c.child;if(d!==null)d.return=c,se=d;else for(;se!==null;){c=se;var f=c.sibling,p=c.return;if(Wb(c),c===l){se=null;break}if(f!==null){f.return=p,se=f;break}se=p}}}var m=o.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}se=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,se=a;else e:for(;se!==null;){if(o=se,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Fu(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,se=g;break e}se=o.return}}var x=e.current;for(se=x;se!==null;){a=se;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,se=w;else e:for(a=x;se!==null;){if(s=se,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:gd(9,s)}}catch(C){mt(s,s.return,C)}if(s===a){se=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,se=T;break e}se=s.return}}if(je=i,Ui(),Nr&&typeof Nr.onPostCommitFiberRoot=="function")try{Nr.onPostCommitFiberRoot(Rc,e)}catch{}r=!0}return r}finally{Ye=n,Zn.transition=t}}return!1}function sE(e,t,n){t=qa(n,t),t=Cb(e,t,1),e=Hi(e,t,1),t=dn(),e!==null&&(cu(e,1,t),wn(e,t))}function mt(e,t,n){if(e.tag===3)sE(e,e,n);else for(;t!==null;){if(t.tag===3){sE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($i===null||!$i.has(r))){e=qa(n,e),e=Sb(t,e,1),t=Hi(t,e,1),e=dn(),t!==null&&(cu(t,1,e),wn(t,e));break}}t=t.return}}function W6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=dn(),e.pingedLanes|=e.suspendedLanes&n,Dt===e&&(Ht&n)===n&&(Rt===4||Rt===3&&(Ht&130023424)===Ht&&500>xt()-ig?Wo(e,0):rg|=n),wn(e,t)}function uE(e,t){t===0&&(e.mode&1?(t=Pc,Pc<<=1,!(Pc&130023424)&&(Pc=4194304)):t=1);var n=dn();e=ri(e,t),e!==null&&(cu(e,t,n),wn(e,n))}function Y6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uE(e,n)}function q6(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(Q(314))}r!==null&&r.delete(t),uE(e,n)}var lE;lE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)vn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vn=!1,D6(e,t,n);vn=!!(e.flags&131072)}else vn=!1,it&&t.flags&1048576&&Hw(t,Jc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hd(e,t),e=t.pendingProps;var i=ja(t,qt.current);Wa(t,n),i=Lm(null,t,r,e,i,n);var o=Mm();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,yn(r)?(o=!0,Xc(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,km(t),i.updater=fd,t.stateNode=i,i._reactInternals=t,Hm(t,r,e,n),t=Ym(null,t,r,!0,o,n)):(t.tag=0,it&&o&&vm(t),cn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=K6(r),e=hr(r,e),i){case 0:t=Wm(null,t,r,e,n);break e;case 1:t=Lb(null,t,r,e,n);break e;case 11:t=Nb(null,t,r,e,n);break e;case 14:t=Pb(null,t,r,hr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),Wm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),Lb(e,t,r,i,n);case 3:e:{if(Mb(t),e===null)throw Error(Q(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Qw(e,t),od(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=qa(Error(Q(423)),t),t=Fb(e,t,r,n,i);break e}else if(r!==i){i=qa(Error(Q(424)),t),t=Fb(e,t,r,n,i);break e}else for(On=Fi(t.stateNode.containerInfo.firstChild),In=t,it=!0,pr=null,n=Kw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ha(),r===i){t=oi(e,t,n);break e}cn(e,t,r,n)}t=t.child}return t;case 5:return eb(t),e===null&&bm(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,fm(r,i)?a=null:o!==null&&fm(r,o)&&(t.flags|=32),Db(e,t),cn(e,t,a,n),t.child;case 6:return e===null&&bm(t),null;case 13:return Bb(e,t,n);case 4:return Rm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):cn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),Nb(e,t,r,i,n);case 7:return cn(e,t,t.pendingProps,n),t.child;case 8:return cn(e,t,t.pendingProps.children,n),t.child;case 12:return cn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Ze(nd,r._currentValue),r._currentValue=a,o!==null)if(fr(o.value,a)){if(o.children===i.children&&!gn.current){t=oi(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=ii(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Sm(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Q(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sm(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}cn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wa(t,n),i=Xn(i),r=r(i),t.flags|=1,cn(e,t,r,n),t.child;case 14:return r=t.type,i=hr(r,t.pendingProps),i=hr(r.type,i),Pb(e,t,r,i,n);case 15:return Ib(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),hd(e,t),t.tag=1,yn(r)?(e=!0,Xc(t)):e=!1,Wa(t,n),Tb(t,r,i),Hm(t,r,i,n),Ym(null,t,r,!0,e,n);case 19:return Ub(e,t,n);case 22:return Ob(e,t,n)}throw Error(Q(156,t.tag))};function cE(e,t){return Vx(e,t)}function G6(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 Jn(e,t,n,r){return new G6(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function K6(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===bh)return 14}return 2}function Gi(e,t){var n=e.alternate;return n===null?(n=Jn(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 Cd(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")fg(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Sa:return qo(n.children,i,o,t);case gh:a=8,i|=8;break;case yh:return e=Jn(12,n,t,i|2),e.elementType=yh,e.lanes=o,e;case xh:return e=Jn(13,n,t,i),e.elementType=xh,e.lanes=o,e;case wh:return e=Jn(19,n,t,i),e.elementType=wh,e.lanes=o,e;case xx:return Sd(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yx:a=10;break e;case vx:a=9;break e;case vh:a=11;break e;case bh:a=14;break e;case Ri:a=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=Jn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function qo(e,t,n,r){return e=Jn(7,e,r,t),e.lanes=n,e}function Sd(e,t,n,r){return e=Jn(22,e,r,t),e.elementType=xx,e.lanes=n,e.stateNode={isHidden:!1},e}function pg(e,t,n){return e=Jn(6,e,null,t),e.lanes=n,e}function hg(e,t,n){return t=Jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function X6(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=zh(0),this.expirationTimes=zh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mg(e,t,n,r,i,o,a,s,u){return e=new X6(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Jn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},km(o),e}function Q6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ca,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function dE(e){if(!e)return ji;e=e._reactInternals;e:{if(Lo(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(yn(n))return jw(e,n,t)}return t}function fE(e,t,n,r,i,o,a,s,u){return e=mg(n,r,!0,e,i,o,a,s,u),e.context=dE(null),n=e.current,r=dn(),i=Yi(n),o=ii(r,i),o.callback=t??null,Hi(n,o,i),e.current.lanes=i,cu(e,i,r),wn(e,r),e}function Ad(e,t,n,r){var i=t.current,o=dn(),a=Yi(i);return n=dE(n),t.context===null?t.context=n:t.pendingContext=n,t=ii(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Hi(i,t,a),e!==null&&(yr(e,i,a,o),id(e,i,a)),a}function kd(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 pE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gg(e,t){pE(e,t),(e=e.alternate)&&pE(e,t)}function Z6(){return null}var hE=typeof reportError=="function"?reportError:function(e){console.error(e)};function yg(e){this._internalRoot=e}Rd.prototype.render=yg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Ad(e,t,null,null)},Rd.prototype.unmount=yg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$o(function(){Ad(null,e,null,null)}),t[Jr]=null}};function Rd(e){this._internalRoot=e}Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Di.length&&t!==0&&t<Di[n].priority;n++);Di.splice(n,0,e),n===0&&ew(e)}};function vg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mE(){}function J6(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var l=kd(a);o.call(l)}}var a=fE(t,r,e,0,null,!1,!1,"",mE);return e._reactRootContainer=a,e[Jr]=a.current,_u(e.nodeType===8?e.parentNode:e),$o(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=kd(u);s.call(l)}}var u=mg(e,0,!1,null,null,!1,!1,"",mE);return e._reactRootContainer=u,e[Jr]=u.current,_u(e.nodeType===8?e.parentNode:e),$o(function(){Ad(t,u,n,r)}),u}function Pd(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var u=kd(a);s.call(u)}}Ad(t,a,e,i)}else a=J6(n,t,e,i,r);return kd(a)}Kx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lu(t.pendingLanes);n!==0&&(Hh(t,n|1),wn(t,xt()),!(je&6)&&(Xa=xt()+500,Ui()))}break;case 13:$o(function(){var r=ri(e,1);if(r!==null){var i=dn();yr(r,e,1,i)}}),gg(e,1)}},Vh=function(e){if(e.tag===13){var t=ri(e,134217728);if(t!==null){var n=dn();yr(t,e,134217728,n)}gg(e,134217728)}},Xx=function(e){if(e.tag===13){var t=Yi(e),n=ri(e,t);if(n!==null){var r=dn();yr(n,e,t,r)}gg(e,t)}},Qx=function(){return Ye},Zx=function(e,t){var n=Ye;try{return Ye=e,t()}finally{Ye=n}},Lh=function(e,t,n){switch(t){case"input":if(Ah(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=Gc(r);if(!i)throw Error(Q(90));Ex(r),Ah(r,i)}}}break;case"textarea":Ax(e,n);break;case"select":t=n.value,t!=null&&Aa(e,!!n.multiple,t,!1)}},Mx=lg,Fx=$o;var eL={usingClientEntryPoint:!1,Events:[Au,Fa,Gc,Dx,Lx,lg]},zu={findFiberByHostInstance:Mo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tL={bundleType:zu.bundleType,version:zu.version,rendererPackageName:zu.rendererPackageName,rendererConfig:zu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zx(e),e===null?null:e.stateNode},findFiberByHostInstance:zu.findFiberByHostInstance||Z6,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 Id=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Id.isDisabled&&Id.supportsFiber)try{Rc=Id.inject(tL),Nr=Id}catch{}}Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eL,Rn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vg(t))throw Error(Q(200));return Q6(e,t,null,n)},Rn.createRoot=function(e,t){if(!vg(e))throw Error(Q(299));var n=!1,r="",i=hE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=mg(e,1,!1,null,null,n,!1,r,i),e[Jr]=t.current,_u(e.nodeType===8?e.parentNode:e),new yg(t)},Rn.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=zx(t),e=e===null?null:e.stateNode,e},Rn.flushSync=function(e){return $o(e)},Rn.hydrate=function(e,t,n){if(!Nd(t))throw Error(Q(200));return Pd(null,e,t,!0,n)},Rn.hydrateRoot=function(e,t,n){if(!vg(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=hE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=fE(t,null,e,1,n??null,i,!1,o,a),e[Jr]=t.current,_u(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 Rd(t)},Rn.render=function(e,t,n){if(!Nd(t))throw Error(Q(200));return Pd(null,e,t,!1,n)},Rn.unmountComponentAtNode=function(e){if(!Nd(e))throw Error(Q(40));return e._reactRootContainer?($o(function(){Pd(null,null,e,!1,function(){e._reactRootContainer=null,e[Jr]=null})}),!0):!1},Rn.unstable_batchedUpdates=lg,Rn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Nd(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Pd(e,t,n,!1,r)},Rn.version="18.3.1-next-f1338f8080-20240426";function gE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gE)}catch(e){console.error(e)}}gE(),dx.exports=Rn;var Go=dx.exports,yE,vE=Go;yE=vE.createRoot,vE.hydrateRoot;const xE="3.0.48";function Od(e){"@babel/helpers - typeof";return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Od(e)}var nL=/^\s+/,rL=/\s+$/;function de(e,t){if(e=e||"",t=t||{},e instanceof de)return e;if(!(this instanceof de))return new de(e,t);var n=iL(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}de.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,o,a,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*a+.0722*s},setAlpha:function(t){return this._a=CE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=bE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=bE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=wE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=wE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return EE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return uL(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ot(this._r,255)*100)+"%",g:Math.round(ot(this._g,255)*100)+"%",b:Math.round(ot(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%)":"rgba("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:wL[EE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+TE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=de(t);r="#"+TE(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return de(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(fL,arguments)},brighten:function(){return this._applyModification(pL,arguments)},darken:function(){return this._applyModification(hL,arguments)},desaturate:function(){return this._applyModification(lL,arguments)},saturate:function(){return this._applyModification(cL,arguments)},greyscale:function(){return this._applyModification(dL,arguments)},spin:function(){return this._applyModification(mL,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(vL,arguments)},complement:function(){return this._applyCombination(gL,arguments)},monochromatic:function(){return this._applyCombination(xL,arguments)},splitcomplement:function(){return this._applyCombination(yL,arguments)},triad:function(){return this._applyCombination(_E,[3])},tetrad:function(){return this._applyCombination(_E,[4])}},de.fromRatio=function(e,t){if(Od(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Hu(e[r]));e=n}return de(e,t)};function iL(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=_L(e)),Od(e)=="object"&&(si(e.r)&&si(e.g)&&si(e.b)?(t=oL(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):si(e.h)&&si(e.s)&&si(e.v)?(r=Hu(e.s),i=Hu(e.v),t=sL(e.h,r,i),a=!0,s="hsv"):si(e.h)&&si(e.s)&&si(e.l)&&(r=Hu(e.s),o=Hu(e.l),t=aL(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=CE(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function oL(e,t,n){return{r:ot(e,255)*255,g:ot(t,255)*255,b:ot(n,255)*255}}function wE(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=(r+i)/2;if(r==i)o=a=0;else{var u=r-i;switch(a=s>.5?u/(2-r-i):u/(r+i),r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,l:s}}function aL(e,t,n){var r,i,o;e=ot(e,360),t=ot(t,100),n=ot(n,100);function a(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),i=a(u,s,e),o=a(u,s,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function bE(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=r,u=r-i;if(a=r===0?0:u/r,r==i)o=0;else{switch(r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,v:s}}function sL(e,t,n){e=ot(e,360)*6,t=ot(t,100),n=ot(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,a,o,o,s,n][u],c=[s,n,n,a,o,o][u],d=[o,o,s,n,n,a][u];return{r:l*255,g:c*255,b:d*255}}function EE(e,t,n,r){var i=[vr(Math.round(e).toString(16)),vr(Math.round(t).toString(16)),vr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function uL(e,t,n,r,i){var o=[vr(Math.round(e).toString(16)),vr(Math.round(t).toString(16)),vr(Math.round(n).toString(16)),vr(SE(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function TE(e,t,n,r){var i=[vr(SE(r)),vr(Math.round(e).toString(16)),vr(Math.round(t).toString(16)),vr(Math.round(n).toString(16))];return i.join("")}de.equals=function(e,t){return!e||!t?!1:de(e).toRgbString()==de(t).toRgbString()},de.random=function(){return de.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function lL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.s-=t/100,n.s=Dd(n.s),de(n)}function cL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.s+=t/100,n.s=Dd(n.s),de(n)}function dL(e){return de(e).desaturate(100)}function fL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.l+=t/100,n.l=Dd(n.l),de(n)}function pL(e,t){t=t===0?0:t||10;var n=de(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),de(n)}function hL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.l-=t/100,n.l=Dd(n.l),de(n)}function mL(e,t){var n=de(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,de(n)}function gL(e){var t=de(e).toHsl();return t.h=(t.h+180)%360,de(t)}function _E(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=de(e).toHsl(),r=[de(e)],i=360/t,o=1;o<t;o++)r.push(de({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function yL(e){var t=de(e).toHsl(),n=t.h;return[de(e),de({h:(n+72)%360,s:t.s,l:t.l}),de({h:(n+216)%360,s:t.s,l:t.l})]}function vL(e,t,n){t=t||6,n=n||30;var r=de(e).toHsl(),i=360/n,o=[de(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(de(r));return o}function xL(e,t){t=t||6;for(var n=de(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(de({h:r,s:i,v:o})),o=(o+s)%1;return a}de.mix=function(e,t,n){n=n===0?0:n||50;var r=de(e).toRgb(),i=de(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return de(a)},de.readability=function(e,t){var n=de(e),r=de(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},de.isReadable=function(e,t,n){var r=de.readability(e,t),i,o;switch(o=!1,i=CL(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},de.mostReadable=function(e,t,n){var r=null,i=0,o,a,s,u;n=n||{},a=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)o=de.readability(e,t[l]),o>i&&(i=o,r=de(t[l]));return de.isReadable(e,r,{level:s,size:u})||!a?r:(n.includeFallbackColors=!1,de.mostReadable(e,["#fff","#000"],n))};var xg=de.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},wL=de.hexNames=bL(xg);function bL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function CE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ot(e,t){EL(e)&&(e="100%");var n=TL(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Dd(e){return Math.min(1,Math.max(0,e))}function Ln(e){return parseInt(e,16)}function EL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function TL(e){return typeof e=="string"&&e.indexOf("%")!=-1}function vr(e){return e.length==1?"0"+e:""+e}function Hu(e){return e<=1&&(e=e*100+"%"),e}function SE(e){return Math.round(parseFloat(e)*255).toString(16)}function AE(e){return Ln(e)/255}var xr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function si(e){return!!xr.CSS_UNIT.exec(e)}function _L(e){e=e.replace(nL,"").replace(rL,"").toLowerCase();var t=!1;if(xg[e])e=xg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=xr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=xr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=xr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=xr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=xr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=xr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=xr.hex8.exec(e))?{r:Ln(n[1]),g:Ln(n[2]),b:Ln(n[3]),a:AE(n[4]),format:t?"name":"hex8"}:(n=xr.hex6.exec(e))?{r:Ln(n[1]),g:Ln(n[2]),b:Ln(n[3]),format:t?"name":"hex"}:(n=xr.hex4.exec(e))?{r:Ln(n[1]+""+n[1]),g:Ln(n[2]+""+n[2]),b:Ln(n[3]+""+n[3]),a:AE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=xr.hex3.exec(e))?{r:Ln(n[1]+""+n[1]),g:Ln(n[2]+""+n[2]),b:Ln(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function CL(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const SL=350,kE=400,RE=600,wg={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},NE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=de(e).toHsl(),n=de(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function AL(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))})}function Vu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const bg=e=>Array.isArray(e);function PE(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}function $u(e){return typeof e=="string"||Array.isArray(e)}function IE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Eg(e,t,n,r){if(typeof t=="function"){const[i,o]=IE(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=IE(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Ld(e,t,n){const r=e.getProps();return Eg(r,t,n!==void 0?n:r.custom,e)}const Tg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_g=["initial",...Tg],Wu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ki=new Set(Wu),ui=e=>e*1e3,li=e=>e/1e3,kL={type:"spring",stiffness:500,damping:25,restSpeed:10},RL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),NL={type:"keyframes",duration:.8},PL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},IL=(e,{keyframes:t})=>t.length>2?NL:Ki.has(e)?e.startsWith("scale")?RL(t[1]):kL:PL;function Cg(e,t){return e?e[t]||e.default||e:void 0}const OL={skipAnimations:!1,useManualTiming:!1},DL=e=>e!==null;function Md(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(DL),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Qt=e=>e;function LL(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(l){o.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&o.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),o.delete(l)},process:l=>{if(a=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const Fd=["read","resolveKeyframes","update","preRender","render","postRender"],ML=40;function OE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=Fd.reduce((g,x)=>(g[x]=LL(o),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=a,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,ML),1),i.timestamp=g,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Fd.reduce((g,x)=>{const w=a[x];return g[x]=(T,C=!1,_=!1)=>(n||m(),w.schedule(T,C,_)),g},{}),cancel:g=>{for(let x=0;x<Fd.length;x++)a[Fd[x]].cancel(g)},state:i,steps:a}}const{schedule:Ke,cancel:Xi,state:Vt,steps:Sg}=OE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qt,!0),DE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,FL=1e-7,BL=12;function jL(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=DE(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>FL&&++s<BL);return a}function Yu(e,t,n,r){if(e===t&&n===r)return Qt;const i=o=>jL(o,0,1,e,n);return o=>o===0||o===1?o:DE(i(o),t,r)}const LE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ME=e=>t=>1-e(1-t),FE=Yu(.33,1.53,.69,.99),Ag=ME(FE),BE=LE(Ag),jE=e=>(e*=2)<1?.5*Ag(e):.5*(2-Math.pow(2,-10*(e-1))),kg=e=>1-Math.sin(Math.acos(e)),UE=ME(kg),zE=LE(kg),HE=e=>/^0[^.\s]+$/u.test(e);function UL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||HE(e):!0}let Rg=Qt;const VE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$E=e=>t=>typeof t=="string"&&t.startsWith(e),WE=$E("--"),zL=$E("var(--"),Ng=e=>zL(e)?HL.test(e.split("/*")[0].trim()):!1,HL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,VL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $L(e){const t=VL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function YE(e,t,n=1){const[r,i]=$L(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return VE(a)?parseFloat(a):a}return Ng(i)?YE(i,t,n+1):i}const Qi=(e,t,n)=>n>t?t:n<e?e:n,Za={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qu={...Za,transform:e=>Qi(0,1,e)},Bd={...Za,default:1},Gu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zi=Gu("deg"),Lr=Gu("%"),ge=Gu("px"),WL=Gu("vh"),YL=Gu("vw"),qE={...Lr,parse:e=>Lr.parse(e)/100,transform:e=>Lr.transform(e*100)},qL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),GE=e=>e===Za||e===ge,KE=(e,t)=>parseFloat(e.split(", ")[t]),XE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return KE(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?KE(o[1],e):0}},GL=new Set(["x","y","z"]),KL=Wu.filter(e=>!GL.has(e));function XL(e){const t=[];return KL.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ja={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:XE(4,13),y:XE(5,14)};Ja.translateX=Ja.x,Ja.translateY=Ja.y;const QE=e=>t=>t.test(e),ZE=[Za,ge,Lr,Zi,YL,WL,{test:e=>e==="auto",parse:e=>e}],JE=e=>ZE.find(QE(e)),Ko=new Set;let Pg=!1,Ig=!1;function eT(){if(Ig){const e=Array.from(Ko).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=XL(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(([o,a])=>{var s;(s=r.getValue(o))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ig=!1,Pg=!1,Ko.forEach(e=>e.complete()),Ko.clear()}function tT(){Ko.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ig=!0)})}function QL(){tT(),eT()}class Og{constructor(t,n,r,i,o,a=!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=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ko.add(this),Pg||(Pg=!0,Ke.read(tT),Ke.resolveKeyframes(eT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ko.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ko.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ku=e=>Math.round(e*1e5)/1e5,Dg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ZL(e){return e==null}const JL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Lg=(e,t)=>n=>!!(typeof n=="string"&&JL.test(n)&&n.startsWith(e)||t&&!ZL(n)&&Object.prototype.hasOwnProperty.call(n,t)),nT=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Dg);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},e4=e=>Qi(0,255,e),Mg={...Za,transform:e=>Math.round(e4(e))},Xo={test:Lg("rgb","red"),parse:nT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mg.transform(e)+", "+Mg.transform(t)+", "+Mg.transform(n)+", "+Ku(qu.transform(r))+")"};function t4(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 Fg={test:Lg("#"),parse:t4,transform:Xo.transform},es={test:Lg("hsl","hue"),parse:nT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Lr.transform(Ku(t))+", "+Lr.transform(Ku(n))+", "+Ku(qu.transform(r))+")"},Zt={test:e=>Xo.test(e)||Fg.test(e)||es.test(e),parse:e=>Xo.test(e)?Xo.parse(e):es.test(e)?es.parse(e):Fg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xo.transform(e):es.transform(e)},n4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function r4(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Dg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(n4))===null||n===void 0?void 0:n.length)||0)>0}const rT="number",iT="color",i4="var",o4="var(",oT="${}",a4=/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 Xu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(a4,u=>(Zt.test(u)?(r.color.push(o),i.push(iT),n.push(Zt.parse(u))):u.startsWith(o4)?(r.var.push(o),i.push(i4),n.push(u)):(r.number.push(o),i.push(rT),n.push(parseFloat(u))),++o,oT)).split(oT);return{values:n,split:s,indexes:r,types:i}}function aT(e){return Xu(e).values}function sT(e){const{split:t,types:n}=Xu(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===rT?o+=Ku(i[a]):s===iT?o+=Zt.transform(i[a]):o+=i[a]}return o}}const s4=e=>typeof e=="number"?0:e;function u4(e){const t=aT(e);return sT(e)(t.map(s4))}const Ji={test:r4,parse:aT,createTransformer:sT,getAnimatableNone:u4},l4=new Set(["brightness","contrast","saturate","opacity"]);function c4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Dg)||[];if(!r)return e;const i=n.replace(r,"");let o=l4.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const d4=/\b([a-z-]*)\(.*?\)/gu,Bg={...Ji,getAnimatableNone:e=>{const t=e.match(d4);return t?t.map(c4).join(" "):e}},f4={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},p4={rotate:Zi,rotateX:Zi,rotateY:Zi,rotateZ:Zi,scale:Bd,scaleX:Bd,scaleY:Bd,scaleZ:Bd,skew:Zi,skewX:Zi,skewY:Zi,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:qu,originX:qE,originY:qE,originZ:ge},uT={...Za,transform:Math.round},jg={...f4,...p4,zIndex:uT,size:ge,fillOpacity:qu,strokeOpacity:qu,numOctaves:uT},h4={...jg,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:Bg,WebkitFilter:Bg},Ug=e=>h4[e];function lT(e,t){let n=Ug(e);return n!==Bg&&(n=Ji),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const m4=new Set(["auto","none","0"]);function g4(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!m4.has(o)&&Xu(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=lT(n,i)}class cT extends Og{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Ng(l))){const c=YE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!qL.has(r)||t.length!==2)return;const[i,o]=t,a=JE(i),s=JE(o);if(a!==s)if(GE(a)&&GE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)UL(t[i])&&r.push(i);r.length&&g4(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=Ja[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 t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=i.length-1,s=i[a];i[a]=Ja[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function zg(e){return typeof e=="function"}let jd;function y4(){jd=void 0}const Mr={now:()=>(jd===void 0&&Mr.set(Vt.isProcessing||OL.useManualTiming?Vt.timestamp:performance.now()),jd),set:e=>{jd=e,queueMicrotask(y4)}},dT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ji.test(e)||e==="0")&&!e.startsWith("url("));function v4(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 x4(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=dT(i,t),s=dT(o,t);return!a||!s?!1:v4(e)||(n==="spring"||zg(n))&&r}const w4=40;class fT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Mr.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>w4?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&QL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Mr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!x4(t,r,i,o))if(a)this.options.duration=0;else{u==null||u(Md(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function pT(e,t){return t?e*(1e3/t):0}const b4=5;function hT(e,t,n){const r=Math.max(t-b4,0);return pT(n-e(r),t-r)}const Hg=.001,E4=.01,T4=10,_4=.05,C4=1;function S4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,a=1-t;a=Qi(_4,C4,a),e=Qi(E4,T4,li(e)),a<1?(i=l=>{const c=l*a,d=c*e,f=c-n,p=Vg(l,a),m=Math.exp(-d);return Hg-f/p*m},o=l=>{const d=l*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(l,2)*e,m=Math.exp(-d),y=Vg(Math.pow(l,2),a);return(-i(l)+Hg>0?-1:1)*((f-p)*m)/y}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Hg+c*d},o=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=k4(i,o,s);if(e=ui(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const A4=12;function k4(e,t,n){let r=n;for(let i=1;i<A4;i++)r=r-e(r)/t(r);return r}function Vg(e,t){return e*Math.sqrt(1-t*t)}const R4=["duration","bounce"],N4=["stiffness","damping","mass"];function mT(e,t){return t.some(n=>e[n]!==void 0)}function P4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!mT(e,N4)&&mT(e,R4)){const n=S4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function gT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=P4({...r,velocity:-li(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=o-i,b=li(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(m<1){const w=Vg(b,m);x=T=>{const C=Math.exp(-m*b*T);return o-C*((p+m*b*y)/w*Math.sin(w*T)+y*Math.cos(w*T))}}else if(m===1)x=w=>o-Math.exp(-b*w)*(y+(p+b*y)*w);else{const w=b*Math.sqrt(m*m-1);x=T=>{const C=Math.exp(-m*b*T),_=Math.min(w*T,300);return o-C*((p+m*b*y)*Math.sinh(_)+w*y*Math.cosh(_))/w}}return{calculatedDuration:f&&c||null,next:w=>{const T=x(w);if(f)a.done=w>=c;else{let C=0;m<1&&(C=w===0?ui(p):hT(x,w,T));const _=Math.abs(C)<=n,A=Math.abs(o-T)<=t;a.done=_&&A}return a.value=a.done?o:T,a}}}function yT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=I=>s!==void 0&&I<s||u!==void 0&&I>u,m=I=>s===void 0?u:u===void 0||Math.abs(s-I)<Math.abs(u-I)?s:u;let y=n*t;const b=d+y,g=a===void 0?b:a(b);g!==b&&(y=g-d);const x=I=>-y*Math.exp(-I/r),w=I=>g+x(I),T=I=>{const U=x(I),P=w(I);f.done=Math.abs(U)<=l,f.value=f.done?g:P};let C,_;const A=I=>{p(f.value)&&(C=I,_=gT({keyframes:[f.value,m(f.value)],velocity:hT(w,I,f.value),damping:i,stiffness:o,restDelta:l,restSpeed:c}))};return A(0),{calculatedDuration:null,next:I=>{let U=!1;return!_&&C===void 0&&(U=!0,T(I),A(I)),C!==void 0&&I>=C?_.next(I-C):(!U&&T(I),f)}}}const I4=Yu(.42,0,1,1),O4=Yu(0,0,.58,1),vT=Yu(.42,0,.58,1),D4=e=>Array.isArray(e)&&typeof e[0]!="number",$g=e=>Array.isArray(e)&&typeof e[0]=="number",xT={linear:Qt,easeIn:I4,easeInOut:vT,easeOut:O4,circIn:kg,circInOut:zE,circOut:UE,backIn:Ag,backInOut:BE,backOut:FE,anticipate:jE},wT=e=>{if($g(e)){Rg(e.length===4);const[t,n,r,i]=e;return Yu(t,n,r,i)}else if(typeof e=="string")return Rg(xT[e]!==void 0),xT[e];return e},L4=(e,t)=>n=>t(e(n)),ci=(...e)=>e.reduce(L4),ts=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dt=(e,t,n)=>e+(t-e)*n;function Wg(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 M4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Wg(u,s,e+1/3),o=Wg(u,s,e),a=Wg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Ud(e,t){return n=>n>0?t:e}const Yg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},F4=[Fg,Xo,es],B4=e=>F4.find(t=>t.test(e));function bT(e){const t=B4(e);if(!t)return!1;let n=t.parse(e);return t===es&&(n=M4(n)),n}const ET=(e,t)=>{const n=bT(e),r=bT(t);if(!n||!r)return Ud(e,t);const i={...n};return o=>(i.red=Yg(n.red,r.red,o),i.green=Yg(n.green,r.green,o),i.blue=Yg(n.blue,r.blue,o),i.alpha=dt(n.alpha,r.alpha,o),Xo.transform(i))},qg=new Set(["none","hidden"]);function j4(e,t){return qg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function U4(e,t){return n=>dt(e,t,n)}function Gg(e){return typeof e=="number"?U4:typeof e=="string"?Ng(e)?Ud:Zt.test(e)?ET:V4:Array.isArray(e)?TT:typeof e=="object"?Zt.test(e)?ET:z4:Ud}function TT(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Gg(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function z4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Gg(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function H4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],s=e.indexes[a][i[a]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[o]=u,i[a]++}return r}const V4=(e,t)=>{const n=Ji.createTransformer(t),r=Xu(e),i=Xu(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?qg.has(e)&&!i.values.length||qg.has(t)&&!r.values.length?j4(e,t):ci(TT(H4(r,i),i.values),n):Ud(e,t)};function _T(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?dt(e,t,n):Gg(e)(e,t)}function $4(e,t,n){const r=[],i=n||_T,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Qt:t;s=ci(u,s)}r.push(s)}return r}function W4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Rg(o===t.length),o===1)return()=>t[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=$4(t,r,i),s=a.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=ts(e[c],e[c+1],l);return a[c](d)};return n?l=>u(Qi(e[0],e[o-1],l)):u}function Y4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ts(0,t,r);e.push(dt(n,1,i))}}function q4(e){const t=[0];return Y4(t,e.length-1),t}function G4(e,t){return e.map(n=>n*t)}function K4(e,t){return e.map(()=>t||vT).splice(0,e.length-1)}function zd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=D4(r)?r.map(wT):wT(r),o={done:!1,value:t[0]},a=G4(n&&n.length===t.length?n:q4(t),e),s=W4(a,t,{ease:Array.isArray(i)?i:K4(t,i)});return{calculatedDuration:e,next:u=>(o.value=s(u),o.done=u>=e,o)}}const CT=2e4;function X4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<CT;)t+=n,r=e.next(t);return t>=CT?1/0:t}const Q4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>Xi(t),now:()=>Vt.isProcessing?Vt.timestamp:Mr.now()}},Z4={decay:yT,inertia:yT,tween:zd,keyframes:zd,spring:gT},J4=e=>e/100;class Kg extends fT{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:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||Og,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new a(o,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=zg(n)?n:Z4[n]||zd;let u,l;s!==zd&&typeof t[0]!="number"&&(u=ci(J4,_T(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});o==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=X4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,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:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:y,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/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),x=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let w=this.currentTime,T=o;if(p){const I=Math.min(this.currentTime,c)/d;let U=Math.floor(I),P=I%1;!P&&I>=1&&(P=1),P===1&&U--,U=Math.min(U,p+1),!!(U%2)&&(m==="reverse"?(P=1-P,y&&(P-=y/d)):m==="mirror"&&(T=a)),w=Qi(0,1,P)*d}const C=x?{done:!1,value:u[0]}:T.next(w);s&&(C.value=s(C.value));let{done:_}=C;!x&&l!==null&&(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return A&&i!==void 0&&(C.value=Md(u,this.options,i)),b&&b(C.value),A&&this.finish(),C}get duration(){const{resolved:t}=this;return t?li(t.calculatedDuration):0}get time(){return li(this.currentTime)}set time(t){t=ui(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=li(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Q4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),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(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t: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)}}const ST=new Set(["opacity","clipPath","filter","transform"]),eM=10,tM=(e,t)=>{let n="";const r=Math.max(Math.round(t/eM),2);for(let i=0;i<r;i++)n+=e(ts(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Xg(e){let t;return()=>(t===void 0&&(t=e()),t)}const nM={linearEasing:void 0};function rM(e,t){const n=Xg(e);return()=>{var r;return(r=nM[t])!==null&&r!==void 0?r:n()}}const Hd=rM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function AT(e){return!!(typeof e=="function"&&Hd()||!e||typeof e=="string"&&(e in Qg||Hd())||$g(e)||Array.isArray(e)&&e.every(AT))}const Qu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qu([0,.65,.55,1]),circOut:Qu([.55,0,1,.45]),backIn:Qu([.31,.01,.66,-.59]),backOut:Qu([.33,1.53,.69,.99])};function kT(e,t){if(e)return typeof e=="function"&&Hd()?tM(e,t):$g(e)?Qu(e):Array.isArray(e)?e.map(n=>kT(n,t)||Qg.easeOut):Qg[e]}function iM(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=kT(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function RT(e,t){e.timeline=t,e.onfinish=null}const oM=Xg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vd=10,aM=2e4;function sM(e){return zg(e.type)||e.type==="spring"||!AT(e.ease)}function uM(e,t){const n=new Kg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<aM;)r=n.sample(o),i.push(r.value),o+=Vd;return{times:void 0,keyframes:i,duration:o-Vd,ease:"linear"}}const NT={anticipate:jE,backInOut:BE,circInOut:zE};function lM(e){return e in NT}class PT extends fT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new cT(o,(a,s)=>this.onKeyframesResolved(a,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&Hd()&&lM(a)&&(a=NT[a]),sM(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...b}=this.options,g=uM(t,b);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,o=g.times,a=g.ease,s="keyframes"}const d=iM(u.owner.current,l,t,{...this.options,duration:i,times:o,ease:a});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(RT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Md(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:s,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return li(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return li(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ui(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}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 Qt;const{animation:r}=n;RT(r,t)}return Qt}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:o,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Kg({...p,keyframes:r,duration:i,type:o,ease:a,times:s,isGenerator:!0}),y=ui(this.time);l.setWithVelocity(m.sample(y-Vd).value,m.sample(y).value,Vd)}const{onStop:u}=this.options;u&&u(),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:o,damping:a,type:s}=t;return oM()&&r&&ST.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}const cM=Xg(()=>window.ScrollTimeline!==void 0);class dM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}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=>cM()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function fM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Zg=(e,t,n,r={},i,o)=>a=>{const s=Cg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-ui(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};fM(s)||(c={...c,...IL(e,c)}),c.duration&&(c.duration=ui(c.duration)),c.repeatDelay&&(c.repeatDelay=ui(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const f=Md(c.keyframes,s);if(f!==void 0)return Ke.update(()=>{c.onUpdate(f),c.onComplete()}),new dM([])}return!o&&PT.supports(c)?new PT(c):new Kg(c)},pM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),hM=e=>bg(e)?e[e.length-1]||0:e;function Jg(e,t){e.indexOf(t)===-1&&e.push(t)}function e0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class t0{constructor(){this.subscriptions=[]}add(t){return Jg(this.subscriptions,t),()=>e0(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 o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const IT=30,mM=e=>!isNaN(parseFloat(e));class gM{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Mr.now();this.updatedAt!==o&&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=Mr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mM(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 t0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ke.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=Mr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>IT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,IT);return pT(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 Zu(e,t){return new gM(e,t)}function yM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zu(n))}function vM(e,t){const n=Ld(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=hM(o[a]);yM(e,a,s)}}const $d=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OT="data-"+$d("framerAppearId");function DT(e){return e.props[OT]}const Jt=e=>!!(e&&e.getVelocity);function xM(e){return!!(Jt(e)&&e.add)}function n0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(xM(n))return n.add(t)}function wM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function LT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(a=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=u[d];if(p===void 0||c&&wM(c,d))continue;const m={delay:n,...Cg(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=DT(e);if(g){const x=window.MotionHandoffAnimation(g,d,Ke);x!==null&&(m.startTime=x,y=!0)}}n0(e,d),f.start(Zg(d,f,p,e.shouldReduceMotion&&Ki.has(d)?{type:!1}:m,e,y));const b=f.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{Ke.update(()=>{s&&vM(e,s)})}),l}function r0(e,t,n={}){var r;const i=Ld(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(LT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=o;return bM(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[l,c]=u==="beforeChildren"?[a,s]:[s,a];return l().then(()=>c())}else return Promise.all([a(),s(n.delay)])}function bM(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(EM).forEach((l,c)=>{l.notify("AnimationStart",t),a.push(r0(l,t,{...o,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(a)}function EM(e,t){return e.sortNodePosition(t)}function TM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>r0(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=r0(e,t,n);else{const i=typeof t=="function"?Ld(e,t,n.custom):t;r=Promise.all(LT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const _M=_g.length;function MT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?MT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<_M;n++){const r=_g[n],i=e.props[r];($u(i)||i===!1)&&(t[r]=i)}return t}const CM=[...Tg].reverse(),SM=Tg.length;function AM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>TM(e,n,r)))}function kM(e){let t=AM(e),n=FT(),r=!0;const i=u=>(l,c)=>{var d;const f=Ld(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function o(u){t=u(e)}function a(u){const{props:l}=e,c=MT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let b=0;b<SM;b++){const g=CM[b],x=n[g],w=l[g]!==void 0?l[g]:c[g],T=$u(w),C=g===u?x.isActive:null;C===!1&&(m=b);let _=w===c[g]&&w!==l[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),x.protectedKeys={...p},!x.isActive&&C===null||!w&&!x.prevProp||Vu(w)||typeof w=="boolean")continue;const A=RM(x.prevProp,w);let I=A||g===u&&x.isActive&&!_&&T||b>m&&T,U=!1;const P=Array.isArray(w)?w:[w];let $=P.reduce(i(g),{});C===!1&&($={});const{prevResolvedValues:H={}}=x,X={...H,...$},Y=ee=>{I=!0,f.has(ee)&&(U=!0,f.delete(ee)),x.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=H[ee];if(p.hasOwnProperty(ee))continue;let k=!1;bg(F)&&bg(B)?k=!PE(F,B):k=F!==B,k?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):x.protectedKeys[ee]=!0}x.prevProp=w,x.prevResolvedValues=$,x.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(I=!1),I&&(!(_&&A)||U)&&d.push(...P.map(ee=>({animation:ee,options:{type:g}})))}if(f.size){const b={};f.forEach(g=>{const x=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),b[g]=x??null}),d.push({animation:b})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=a(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=FT(),r=!0}}}function RM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!PE(t,e):!1}function Qo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function FT(){return{animate:Qo(!0),whileInView:Qo(),whileHover:Qo(),whileTap:Qo(),whileDrag:Qo(),whileFocus:Qo(),exit:Qo()}}class eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class NM extends eo{constructor(t){super(t),t.animationState||(t.animationState=kM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vu(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===void 0||t.call(this)}}let PM=0;class IM extends eo{constructor(){super(...arguments),this.id=PM++}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}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const OM={animation:{Feature:NM},exit:{Feature:IM}},BT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Wd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const DM=e=>t=>BT(t)&&e(t,Wd(t));function di(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function fi(e,t,n,r){return di(e,t,DM(n),r)}const jT=(e,t)=>Math.abs(e-t);function LM(e,t){const n=jT(e.x,t.x),r=jT(e.y,t.y);return Math.sqrt(n**2+r**2)}class UT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!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 d=o0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=LM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=Vt;this.history.push({...m,timestamp:y});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=i0(f,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=o0(d.type==="pointercancel"?this.lastMoveEventInfo:i0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!BT(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=Wd(t),s=i0(a,this.transformPagePoint),{point:u}=s,{timestamp:l}=Vt;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,o0(s,this.history)),this.removeListeners=ci(fi(this.contextWindow,"pointermove",this.handlePointerMove),fi(this.contextWindow,"pointerup",this.handlePointerUp),fi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xi(this.updatePoint)}}function i0(e,t){return t?{point:t(e.point)}:e}function zT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function o0({point:e},t){return{point:e,delta:zT(e,HT(t)),offset:zT(e,MM(t)),velocity:FM(t,.1)}}function MM(e){return e[0]}function HT(e){return e[e.length-1]}function FM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=HT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ui(t)));)n--;if(!r)return{x:0,y:0};const o=li(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function VT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const $T=VT("dragHorizontal"),WT=VT("dragVertical");function YT(e){let t=!1;if(e==="y")t=WT();else if(e==="x")t=$T();else{const n=$T(),r=WT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function qT(){const e=YT(!0);return e?(e(),!1):!0}function ns(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const GT=1e-4,BM=1-GT,jM=1+GT,KT=.01,UM=0-KT,zM=0+KT;function Mn(e){return e.max-e.min}function HM(e,t,n){return Math.abs(e-t)<=n}function XT(e,t,n,r=.5){e.origin=r,e.originPoint=dt(t.min,t.max,e.origin),e.scale=Mn(n)/Mn(t),e.translate=dt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=BM&&e.scale<=jM||isNaN(e.scale))&&(e.scale=1),(e.translate>=UM&&e.translate<=zM||isNaN(e.translate))&&(e.translate=0)}function Ju(e,t,n,r){XT(e.x,t.x,n.x,r?r.originX:void 0),XT(e.y,t.y,n.y,r?r.originY:void 0)}function QT(e,t,n){e.min=n.min+t.min,e.max=e.min+Mn(t)}function VM(e,t,n){QT(e.x,t.x,n.x),QT(e.y,t.y,n.y)}function ZT(e,t,n){e.min=t.min-n.min,e.max=e.min+Mn(t)}function el(e,t,n){ZT(e.x,t.x,n.x),ZT(e.y,t.y,n.y)}function $M(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?dt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?dt(n,e,r.max):Math.min(e,n)),e}function JT(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 WM(e,{top:t,left:n,bottom:r,right:i}){return{x:JT(e.x,n,i),y:JT(e.y,t,r)}}function e2(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 YM(e,t){return{x:e2(e.x,t.x),y:e2(e.y,t.y)}}function qM(e,t){let n=.5;const r=Mn(e),i=Mn(t);return i>r?n=ts(t.min,t.max-r,e.min):r>i&&(n=ts(e.min,e.max-i,t.min)),Qi(0,1,n)}function GM(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 a0=.35;function KM(e=a0){return e===!1?e=0:e===!0&&(e=a0),{x:t2(e,"left","right"),y:t2(e,"top","bottom")}}function t2(e,t,n){return{min:n2(e,t),max:n2(e,n)}}function n2(e,t){return typeof e=="number"?e:e[t]||0}const r2=()=>({translate:0,scale:1,origin:0,originPoint:0}),rs=()=>({x:r2(),y:r2()}),i2=()=>({min:0,max:0}),wt=()=>({x:i2(),y:i2()});function er(e){return[e("x"),e("y")]}function o2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function XM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QM(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}}function s0(e){return e===void 0||e===1}function u0({scale:e,scaleX:t,scaleY:n}){return!s0(e)||!s0(t)||!s0(n)}function Zo(e){return u0(e)||a2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function a2(e){return s2(e.x)||s2(e.y)}function s2(e){return e&&e!=="0%"}function Yd(e,t,n){const r=e-n,i=t*r;return n+i}function u2(e,t,n,r,i){return i!==void 0&&(e=Yd(e,i,r)),Yd(e,n,r)+t}function l0(e,t=0,n=1,r,i){e.min=u2(e.min,t,n,r,i),e.max=u2(e.max,t,n,r,i)}function l2(e,{x:t,y:n}){l0(e.x,t.translate,t.scale,t.originPoint),l0(e.y,n.translate,n.scale,n.originPoint)}const c2=.999999999999,d2=1.0000000000001;function ZM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&os(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,l2(e,a)),r&&Zo(o.latestValues)&&os(e,o.latestValues))}t.x<d2&&t.x>c2&&(t.x=1),t.y<d2&&t.y>c2&&(t.y=1)}function is(e,t){e.min=e.min+t,e.max=e.max+t}function f2(e,t,n,r,i=.5){const o=dt(e.min,e.max,i);l0(e,t,n,o,r)}function os(e,t){f2(e.x,t.x,t.scaleX,t.scale,t.originX),f2(e.y,t.y,t.scaleY,t.scale,t.originY)}function p2(e,t){return o2(QM(e.getBoundingClientRect(),t))}function JM(e,t,n){const r=p2(e,n),{scroll:i}=t;return i&&(is(r.x,i.offset.x),is(r.y,i.offset.y)),r}const h2=({current:e})=>e?e.ownerDocument.defaultView:null,e5=new WeakMap;class t5{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Wd(c,"page").point)},o=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=YT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),er(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Lr.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[b];w&&(g=Mn(w)*(parseFloat(g)/100))}}this.originPoint[b]=g}),m&&Ke.postRender(()=>m(c,d)),n0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=n5(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>er(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new UT(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:h2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Ke.postRender(()=>o(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!qd(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=$M(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&ns(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=WM(i.layoutBox,n):this.constraints=!1,this.elastic=KM(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&er(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=GM(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ns(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=JM(r,i.root,this.visualElement.getTransformPagePoint());let a=YM(i.layout.layoutBox,o);if(n){const s=n(XM(a));this.hasMutatedConstraints=!!s,s&&(a=o2(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=er(c=>{if(!qd(c,n,this.currentDirection))return;let d=u&&u[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return n0(this.visualElement,t),r.start(Zg(t,r,0,n,this.visualElement,!1))}stopAnimation(){er(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){er(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?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){er(n=>{const{drag:r}=this.getProps();if(!qd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-dt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ns(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};er(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const u=s.get();i[a]=qM({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),er(a=>{if(!qd(a,t,null))return;const s=this.getAxisMotionValue(a),{min:u,max:l}=this.constraints[a];s.set(dt(u,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;e5.set(this.visualElement,this);const t=this.visualElement.current,n=fi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();ns(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ke.read(r);const a=di(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(er(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=a0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function qd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function n5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class r5 extends eo{constructor(t){super(t),this.removeGroupControls=Qt,this.removeListeners=Qt,this.controls=new t5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const m2=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class i5 extends eo{constructor(){super(...arguments),this.removePointerDownListener=Qt}onPointerDown(t){this.session=new UT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:h2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:m2(t),onStart:m2(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Ke.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=fi(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 Gd=v.createContext(null);function o5(){const e=v.useContext(Gd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const o=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}const c0=v.createContext({}),g2=v.createContext({}),Kd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function y2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const tl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=y2(e,t.target.x),r=y2(e,t.target.y);return`${n}% ${r}%`}},a5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ji.parse(e);if(i.length>5)return r;const o=Ji.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=u;const l=dt(s,u,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}},Xd={};function s5(e){Object.assign(Xd,e)}const{schedule:d0,cancel:Aie}=OE(queueMicrotask,!1);class u5 extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;s5(l5),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Kd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ke.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),d0.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 v2(e){const[t,n]=o5(),r=v.useContext(c0);return E.jsx(u5,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(g2),isPresent:t,safeToRemove:n})}const l5={borderRadius:{...tl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tl,borderTopRightRadius:tl,borderBottomLeftRadius:tl,borderBottomRightRadius:tl,boxShadow:a5},x2=["TopLeft","TopRight","BottomLeft","BottomRight"],c5=x2.length,w2=e=>typeof e=="string"?parseFloat(e):e,b2=e=>typeof e=="number"||ge.test(e);function d5(e,t,n,r,i,o){i?(e.opacity=dt(0,n.opacity!==void 0?n.opacity:1,f5(r)),e.opacityExit=dt(t.opacity!==void 0?t.opacity:1,0,p5(r))):o&&(e.opacity=dt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<c5;a++){const s=`border${x2[a]}Radius`;let u=E2(t,s),l=E2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||b2(u)===b2(l)?(e[s]=Math.max(dt(w2(u),w2(l),r),0),(Lr.test(l)||Lr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=dt(t.rotate||0,n.rotate||0,r))}function E2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const f5=T2(0,.5,UE),p5=T2(.5,.95,Qt);function T2(e,t,n){return r=>r<e?0:r>t?1:n(ts(e,t,r))}function _2(e,t){e.min=t.min,e.max=t.max}function tr(e,t){_2(e.x,t.x),_2(e.y,t.y)}function C2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function S2(e,t,n,r,i){return e-=t,e=Yd(e,1/n,r),i!==void 0&&(e=Yd(e,1/i,r)),e}function h5(e,t=0,n=1,r=.5,i,o=e,a=e){if(Lr.test(t)&&(t=parseFloat(t),t=dt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=dt(o.min,o.max,r);e===o&&(s-=t),e.min=S2(e.min,t,n,s,i),e.max=S2(e.max,t,n,s,i)}function A2(e,t,[n,r,i],o,a){h5(e,t[n],t[r],t[i],t.scale,o,a)}const m5=["x","scaleX","originX"],g5=["y","scaleY","originY"];function k2(e,t,n,r){A2(e.x,t,m5,n?n.x:void 0,r?r.x:void 0),A2(e.y,t,g5,n?n.y:void 0,r?r.y:void 0)}function R2(e){return e.translate===0&&e.scale===1}function N2(e){return R2(e.x)&&R2(e.y)}function P2(e,t){return e.min===t.min&&e.max===t.max}function y5(e,t){return P2(e.x,t.x)&&P2(e.y,t.y)}function I2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function O2(e,t){return I2(e.x,t.x)&&I2(e.y,t.y)}function D2(e){return Mn(e.x)/Mn(e.y)}function L2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class v5{constructor(){this.members=[]}add(t){Jg(this.members,t),t.scheduleRender()}remove(t){if(e0(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 o=this.members[i];if(o.isPresent!==!1){r=o;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 x5(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const w5=(e,t)=>e.depth-t.depth;class b5{constructor(){this.children=[],this.isDirty=!1}add(t){Jg(this.children,t),this.isDirty=!0}remove(t){e0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(w5),this.isDirty=!1,this.children.forEach(t)}}function Qd(e){const t=Jt(e)?e.get():e;return pM(t)?t.toValue():t}function E5(e,t){const n=Mr.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Xi(r),e(o-t))};return Ke.read(r,!0),()=>Xi(r)}function T5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function _5(e,t,n){const r=Jt(e)?e:Zu(e);return r.start(Zg("",r,t,n)),r.animation}const Jo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},nl=typeof window<"u"&&window.MotionDebug!==void 0,f0=["","X","Y","Z"],C5={visibility:"hidden"},M2=1e3;let S5=0;function p0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function F2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=DT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&F2(r)}function B2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=S5++,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,nl&&(Jo.totalNodes=Jo.resolvedTargetDeltas=Jo.recalculatedProjection=0),this.nodes.forEach(R5),this.nodes.forEach(D5),this.nodes.forEach(L5),this.nodes.forEach(N5),nl&&window.MotionDebug.record(Jo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new b5)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new t0),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const u=this.eventHandlers.get(a);u&&u.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=T5(a),this.instance=a;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=E5(f,250),Kd.hasAnimatedSinceResize&&(Kd.hasAnimatedSinceResize=!1,this.nodes.forEach(U2))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||U5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=c.getProps(),x=!this.targetLayout||!O2(this.targetLayout,m)||p,w=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const T={...Cg(y,"layout"),onPlay:b,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||U2(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xi(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(M5),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&F2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(j2);return}this.isUpdating||this.nodes.forEach(I5),this.isUpdating=!1,this.nodes.forEach(O5),this.nodes.forEach(A5),this.nodes.forEach(k5),this.clearAllSnapshots();const s=Mr.now();Vt.delta=Qi(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Sg.update.process(Vt),Sg.preRender.process(Vt),Sg.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,d0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(P5),this.sharedNodes.forEach(F5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!N2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;a&&(s||Zo(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return a&&(u=this.removeTransform(u)),z5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return wt();const u=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(H5))){const{scroll:c}=this.root;c&&(is(u.x,c.offset.x),is(u.y,c.offset.y))}return u}removeElementScroll(a){var s;const u=wt();if(tr(u,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&tr(u,a),is(u.x,d.offset.x),is(u.y,d.offset.y))}return u}applyTransform(a,s=!1){const u=wt();tr(u,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&os(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Zo(c.latestValues)&&os(u,c.latestValues)}return Zo(this.latestValues)&&os(u,this.latestValues),u}removeTransform(a){const s=wt();tr(s,a);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Zo(l.latestValues))continue;u0(l.latestValues)&&l.updateSnapshot();const c=wt(),d=l.measurePageBox();tr(c,d),k2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Zo(this.latestValues)&&k2(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),el(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=wt(),this.targetWithTransforms=wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),VM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tr(this.target,this.layout.layoutBox),l2(this.target,this.targetDelta)):tr(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=wt(),this.relativeTargetOrigin=wt(),el(this.relativeTargetOrigin,this.target,p.target),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}nl&&Jo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||u0(this.parent.latestValues)||a2(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 a;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Vt.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;tr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;ZM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=wt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(C2(this.prevProjectionDelta.x,this.projectionDelta.x),C2(this.prevProjectionDelta.y,this.projectionDelta.y)),Ju(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!L2(this.projectionDelta.x,this.prevProjectionDelta.x)||!L2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),nl&&Jo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rs(),this.projectionDelta=rs(),this.projectionDeltaWithTransform=rs()}setAnimationOrigin(a,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=wt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,b=this.getStack(),g=!b||b.members.length<=1,x=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(j5));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const C=T/1e3;z2(d.x,a.x,C),z2(d.y,a.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(el(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),B5(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&y5(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=wt()),tr(w,this.relativeTarget)),y&&(this.animationValues=c,d5(c,l,this.latestValues,C,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{Kd.hasAnimatedSinceResize=!0,this.currentAnimation=_5(0,M2,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(M2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=a;if(!(!s||!u||!l)){if(this!==a&&this.layout&&l&&Y2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||wt();const d=Mn(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+d;const f=Mn(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+f}tr(s,u),os(s,c),Ju(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new v5),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&p0("z",a,l,this.animationValues);for(let c=0;c<f0.length;c++)p0(`rotate${f0[c]}`,a,l,this.animationValues),p0(`skew${f0[c]}`,a,l,this.animationValues);a.render();for(const c in l)a.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);a.scheduleRender()}getProjectionStyles(a){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return C5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Qd(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Qd(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Zo(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=x5(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in Xd){if(f[y]===void 0)continue;const{correct:b,applyTo:g}=Xd[y],x=l.transform==="none"?f[y]:b(f[y],d);if(g){const w=g.length;for(let T=0;T<w;T++)l[g[T]]=x}else l[y]=x}return this.options.layoutId&&(l.pointerEvents=d===this?Qd(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(j2),this.root.sharedNodes.clear()}}}function A5(e){e.updateLayout()}function k5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?er(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Mn(f);f.min=r[d].min,f.max=f.min+p}):Y2(o,n.layoutBox,r)&&er(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Mn(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=rs();Ju(s,r,n.layoutBox);const u=rs();a?Ju(u,e.applyTransform(i,!0),n.measuredBox):Ju(u,r,n.layoutBox);const l=!N2(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=wt();el(m,n.layoutBox,f.layoutBox);const y=wt();el(y,r,p.layoutBox),O2(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function R5(e){nl&&Jo.totalNodes++,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 N5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function P5(e){e.clearSnapshot()}function j2(e){e.clearMeasurements()}function I5(e){e.isLayoutDirty=!1}function O5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function U2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function D5(e){e.resolveTargetDelta()}function L5(e){e.calcProjection()}function M5(e){e.resetSkewAndRotation()}function F5(e){e.removeLeadSnapshot()}function z2(e,t,n){e.translate=dt(t.translate,0,n),e.scale=dt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function H2(e,t,n,r){e.min=dt(t.min,n.min,r),e.max=dt(t.max,n.max,r)}function B5(e,t,n,r){H2(e.x,t.x,n.x,r),H2(e.y,t.y,n.y,r)}function j5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const U5={duration:.45,ease:[.4,0,.1,1]},V2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$2=V2("applewebkit/")&&!V2("chrome/")?Math.round:Qt;function W2(e){e.min=$2(e.min),e.max=$2(e.max)}function z5(e){W2(e.x),W2(e.y)}function Y2(e,t,n){return e==="position"||e==="preserve-aspect"&&!HM(D2(t),D2(n),.2)}function H5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const V5=B2({attachResizeListener:(e,t)=>di(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),h0={current:void 0},q2=B2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!h0.current){const e=new V5({});e.mount(window),e.setOptions({layoutScroll:!0}),h0.current=e}return h0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$5={pan:{Feature:i5},drag:{Feature:r5,ProjectionNode:q2,MeasureLayout:v2}};function G2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||qT())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Ke.postRender(()=>u(o,a))};return fi(e.current,n,i,{passive:!e.getProps()[r]})}class W5 extends eo{mount(){this.unmount=ci(G2(this.node,!0),G2(this.node,!1))}unmount(){}}class Y5 extends eo{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=ci(di(this.node.current,"focus",()=>this.onFocus()),di(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const K2=(e,t)=>t?e===t?!0:K2(e,t.parentElement):!1;function m0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Wd(n))}class q5 extends eo{constructor(){super(...arguments),this.removeStartListeners=Qt,this.removeEndListeners=Qt,this.removeAccessibleListeners=Qt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=fi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!K2(this.node.current,s.target)?c:l;f&&Ke.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),a=fi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ci(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||m0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Ke.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=di(this.node.current,"keyup",a),m0("down",(s,u)=>{this.startPress(s,u)})},n=di(this.node.current,"keydown",t),r=()=>{this.isPressing&&m0("cancel",(o,a)=>this.cancelPress(o,a))},i=di(this.node.current,"blur",r);this.removeAccessibleListeners=ci(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ke.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qT()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ke.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=fi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=di(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ci(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const g0=new WeakMap,y0=new WeakMap,G5=e=>{const t=g0.get(e.target);t&&t(e)},K5=e=>{e.forEach(G5)};function X5({root:e,...t}){const n=e||document;y0.has(n)||y0.set(n,{});const r=y0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(K5,{root:e,...t})),r[i]}function Q5(e,t,n){const r=X5(t);return g0.set(e,n),r.observe(e),()=>{g0.delete(e),r.unobserve(e)}}const Z5={some:0,all:1};class J5 extends eo{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:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Z5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return Q5(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(e8(t,n))&&this.startObserver()}unmount(){}}function e8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const t8={inView:{Feature:J5},tap:{Feature:q5},focus:{Feature:Y5},hover:{Feature:W5}},n8={layout:{ProjectionNode:q2,MeasureLayout:v2}},v0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Zd=v.createContext({}),x0=typeof window<"u",X2=x0?v.useLayoutEffect:v.useEffect,Q2=v.createContext({strict:!1});function r8(e,t,n,r,i){var o,a;const{visualElement:s}=v.useContext(Zd),u=v.useContext(Q2),l=v.useContext(Gd),c=v.useContext(v0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(g2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&i8(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[OT],y=v.useRef(!!m&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,m))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,m)));return X2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),d0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function i8(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Z2(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&ns(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function Z2(e){if(e)return e.options.allowProjection!==!1?e.projection:Z2(e.parent)}function o8(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ns(n)&&(n.current=r))},[t])}function Jd(e){return Vu(e.animate)||_g.some(t=>$u(e[t]))}function J2(e){return!!(Jd(e)||e.variants)}function a8(e,t){if(Jd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||$u(n)?n:void 0,animate:$u(r)?r:void 0}}return e.inherit!==!1?t:{}}function s8(e){const{initial:t,animate:n}=a8(e,v.useContext(Zd));return v.useMemo(()=>({initial:t,animate:n}),[e_(t),e_(n)])}function e_(e){return Array.isArray(e)?e.join(" "):e}const t_={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"]},as={};for(const e in t_)as[e]={isEnabled:t=>t_[e].some(n=>!!t[n])};function u8(e){for(const t in e)as[t]={...as[t],...e[t]}}const l8=Symbol.for("motionComponentSymbol");function c8({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&u8(e);function o(s,u){let l;const c={...v.useContext(v0),...s,layoutId:d8(s)},{isStatic:d}=c,f=s8(s),p=r(s,d);if(!d&&x0){f8();const m=p8(c);l=m.MeasureLayout,f.visualElement=r8(i,p,c,t,m.ProjectionNode)}return E.jsxs(Zd.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,o8(p,f.visualElement,u),p,d,f.visualElement)]})}const a=v.forwardRef(o);return a[l8]=i,a}function d8({layoutId:e}){const t=v.useContext(c0).id;return t&&e!==void 0?t+"-"+e:e}function f8(e,t){v.useContext(Q2).strict}function p8(e){const{drag:t,layout:n}=as;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 h8=["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 w0(e){return typeof e!="string"||e.includes("-")?!1:!!(h8.indexOf(e)>-1||/[A-Z]/u.test(e))}function n_(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const r_=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 i_(e,t,n,r){n_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(r_.has(i)?i:$d(i),t.attrs[i])}function o_(e,{layout:t,layoutId:n}){return Ki.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xd[e]||e==="opacity")}function b0(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(Jt(i[a])||t.style&&Jt(t.style[a])||o_(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),o}function a_(e,t,n){const r=b0(e,t,n);for(const i in e)if(Jt(e[i])||Jt(t[i])){const o=Wu.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function E0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function m8(e){if(Ki.has(e))return"transform";if(ST.has(e))return $d(e)}function g8({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,a,s){const u={latestValues:y8(i,o,a,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const s_=e=>(t,n)=>{const r=v.useContext(Zd),i=v.useContext(Gd),o=()=>g8(e,t,r,i,n);return n?o():E0(o)};function u_(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const o=Eg(e,r[i]);if(o){const{transitionEnd:a,transition:s,...u}=o;n(u,a)}}}function y8(e,t,n,r,i){var o;const a={},s=new Set,u=r&&((o=e.style)===null||o===void 0?void 0:o.willChange)===void 0,l=i(e,{});for(const b in l)a[b]=Qd(l[b]);let{initial:c,animate:d}=e;const f=Jd(e),p=J2(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?d:c;return y&&typeof y!="boolean"&&!Vu(y)&&u_(e,y,(b,g)=>{for(const x in b){let w=b[x];if(Array.isArray(w)){const T=m?w.length-1:0;w=w[T]}w!==null&&(a[x]=w)}for(const x in g)a[x]=g[x]}),u&&(d&&c!==!1&&!Vu(d)&&u_(e,d,b=>{for(const g in b){const x=m8(g);x&&s.add(x)}}),s.size&&(a.willChange=Array.from(s).join(","))),a}const T0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),l_=()=>({...T0(),attrs:{}}),c_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,v8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},x8=Wu.length;function w8(e,t,n){let r="",i=!0;for(let o=0;o<x8;o++){const a=Wu[o],s=e[a];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(a.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=c_(s,jg[a]);if(!u){i=!1;const c=v8[a]||a;r+=`${c}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function _0(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const u in t){const l=t[u];if(Ki.has(u)){a=!0;continue}else if(WE(u)){i[u]=l;continue}else{const c=c_(l,jg[u]);u.startsWith("origin")?(s=!0,o[u]=c):r[u]=c}}if(t.transform||(a||n?r.transform=w8(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=o;r.transformOrigin=`${u} ${l} ${c}`}}function d_(e,t,n){return typeof e=="string"?e:ge.transform(t+n*e)}function b8(e,t,n){const r=d_(t,e.x,e.width),i=d_(n,e.y,e.height);return`${r} ${i}`}const E8={offset:"stroke-dashoffset",array:"stroke-dasharray"},T8={offset:"strokeDashoffset",array:"strokeDasharray"};function _8(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?E8:T8;e[o.offset]=ge.transform(-r);const a=ge.transform(t),s=ge.transform(n);e[o.array]=`${a} ${s}`}function C0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(_0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=b8(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&_8(f,a,s,u,!1)}const S0=e=>typeof e=="string"&&e.toLowerCase()==="svg",C8={useVisualState:s_({scrapeMotionValuesFromProps:a_,createRenderState:l_,onMount:(e,t,{renderState:n,latestValues:r})=>{Ke.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ke.render(()=>{C0(n,r,S0(t.tagName),e.transformTemplate),i_(t,n)})}})},S8={useVisualState:s_({applyWillChange:!0,scrapeMotionValuesFromProps:b0,createRenderState:T0})};function f_(e,t,n){for(const r in t)!Jt(t[r])&&!o_(r,n)&&(e[r]=t[r])}function A8({transformTemplate:e},t){return v.useMemo(()=>{const n=T0();return _0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function k8(e,t){const n=e.style||{},r={};return f_(r,n,e),Object.assign(r,A8(e,t)),r}function R8(e,t){const n={},r=k8(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 N8=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 ef(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||N8.has(e)}let p_=e=>!ef(e);function P8(e){e&&(p_=t=>t.startsWith("on")?!ef(t):e(t))}try{P8(require("@emotion/is-prop-valid").default)}catch{}function I8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(p_(i)||n===!0&&ef(i)||!t&&!ef(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function O8(e,t,n,r){const i=v.useMemo(()=>{const o=l_();return C0(o,t,S0(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};f_(o,e.style,e),i.style={...o,...i.style}}return i}function D8(e=!1){return(n,r,i,{latestValues:o},a)=>{const u=(w0(n)?O8:R8)(r,o,a,n),l=I8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>Jt(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function L8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...w0(r)?C8:S8,preloadedFeatures:e,useRender:D8(i),createVisualElement:t,Component:r};return c8(a)}}const A0={current:null},h_={current:!1};function M8(){if(h_.current=!0,!!x0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>A0.current=e.matches;e.addListener(t),t()}else A0.current=!1}function F8(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Jt(i))e.addValue(r,i);else if(Jt(o))e.addValue(r,Zu(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Zu(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const m_=new WeakMap,B8=[...ZE,Zt,Ji],j8=e=>B8.find(QE(e)),g_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class U8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Og,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 f=Mr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Ke.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=Jd(n),this.isVariantNode=J2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&Jt(p)&&p.set(u[f],!1)}}mount(t){this.current=t,m_.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)),h_.current||M8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:A0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){m_.delete(this.current),this.projection&&this.projection.unmount(),Xi(this.notifyUpdate),Xi(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=Ki.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),a&&a(),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 as){const n=as[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 o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wt()}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<g_.length;r++){const i=g_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=F8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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=Zu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(VE(i)||HE(i))?i=parseFloat(i):!j8(i)&&Ji.test(n)&&(i=lT(t,n)),this.setBaseTarget(t,Jt(i)?i.get():i)),Jt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Eg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Jt(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new t0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class y_ extends U8{constructor(){super(...arguments),this.KeyframeResolver=cT}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]}}function z8(e){return window.getComputedStyle(e)}class H8 extends y_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=n_}readValueFromInstance(t,n){if(Ki.has(n)){const r=Ug(n);return r&&r.default||0}else{const r=z8(t),i=(WE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return p2(t,n)}build(t,n,r){_0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return b0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class V8 extends y_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=wt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ki.has(n)){const r=Ug(n);return r&&r.default||0}return n=r_.has(n)?n:$d(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return a_(t,n,r)}build(t,n,r){C0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){i_(t,n,r,i)}mount(t){this.isSVGTag=S0(t.tagName),super.mount(t)}}const $8=(e,t)=>w0(e)?new V8(t):new H8(t,{allowProjection:e!==v.Fragment}),W8=L8({...OM,...t8,...$5,...n8},$8),ss=AL(W8);class Y8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function q8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=v.useContext(v0);return v.useInsertionEffect(()=>{const{width:a,height:s,top:u,left:l}=i.current;if(t||!r.current||!a||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Vm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $m(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var P6=typeof WeakMap=="function"?WeakMap:Map;function Cb(e,t,n){n=ii(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xd||(xd=!0,og=r),$m(e,t)},n}function Sb(e,t,n){n=ii(-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(){$m(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){$m(e,t),typeof r!="function"&&($i===null?$i=new Set([this]):$i.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Ab(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new P6;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=W6.bind(null,e,t,n),t.then(e,e))}function kb(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 Rb(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=ii(-1,1),t.tag=2,Hi(n,t,1))),n.lanes|=1),e)}var I6=Zr.ReactCurrentOwner,vn=!1;function cn(e,t,n,r){t.child=e===null?Kw(t,null,n,r):Va(t,e.child,n,r)}function Nb(e,t,n,r,i){n=n.render;var o=t.ref;return Wa(t,i),r=Lm(e,t,n,r,o,i),n=Mm(),e!==null&&!vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oi(e,t,i)):(it&&n&&vm(t),t.flags|=1,cn(e,t,r,i),t.child)}function Pb(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!fg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ib(e,t,o,r,i)):(e=Cd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:bu,n(a,r)&&e.ref===t.ref)return oi(e,t,i)}return t.flags|=1,e=Gi(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ib(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(bu(o,r)&&e.ref===t.ref)if(vn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(vn=!0);else return t.lanes=e.lanes,oi(e,t,i)}return Wm(e,t,n,r,i)}function Ob(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ze(Ka,Dn),Dn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ze(Ka,Dn),Dn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ze(Ka,Dn),Dn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ze(Ka,Dn),Dn|=r;return cn(e,t,i,n),t.child}function Db(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wm(e,t,n,r,i){var o=yn(n)?Fo:qt.current;return o=ja(t,o),Wa(t,i),n=Lm(e,t,n,r,o,i),r=Mm(),e!==null&&!vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oi(e,t,i)):(it&&r&&vm(t),t.flags|=1,cn(e,t,n,i),t.child)}function Lb(e,t,n,r,i){if(yn(n)){var o=!0;Xc(t)}else o=!1;if(Wa(t,i),t.stateNode===null)hd(e,t),Tb(t,n,r),Hm(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=Xn(l):(l=yn(n)?Fo:qt.current,l=ja(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&_b(t,a,r,l),zi=!1;var f=t.memoizedState;a.state=f,od(t,r,a,i),u=t.memoizedState,s!==r||f!==u||gn.current||zi?(typeof c=="function"&&(zm(t,n,c,r),u=t.memoizedState),(s=zi||Eb(t,n,s,r,f,u,l))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Qw(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:hr(t.type,s),a.props=l,d=t.pendingProps,f=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=Xn(u):(u=yn(n)?Fo:qt.current,u=ja(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==u)&&_b(t,a,r,u),zi=!1,f=t.memoizedState,a.state=f,od(t,r,a,i);var m=t.memoizedState;s!==d||f!==m||gn.current||zi?(typeof p=="function"&&(zm(t,n,p,r),m=t.memoizedState),(l=zi||Eb(t,n,l,r,f,m,u)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ym(e,t,n,r,o,i)}function Ym(e,t,n,r,i,o){Db(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Uw(t,n,!1),oi(e,t,o);r=t.stateNode,I6.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Va(t,e.child,null,o),t.child=Va(t,null,s,o)):cn(e,t,s,o),t.memoizedState=r.state,i&&Uw(t,n,!0),t.child}function Mb(e){var t=e.stateNode;t.pendingContext?Bw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bw(e,t.context,!1),Rm(e,t.containerInfo)}function Fb(e,t,n,r,i){return Ha(),Em(i),t.flags|=256,cn(e,t,n,r),t.child}var qm={dehydrated:null,treeContext:null,retryLane:0};function Gm(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bb(e,t,n){var r=t.pendingProps,i=lt.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ze(lt,i&1),e===null)return bm(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):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Sd(a,r,0,null),e=qo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Gm(n),t.memoizedState=qm,e):Km(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return O6(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Gi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Gi(s,o):(o=qo(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?Gm(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=qm,r}return o=e.child,e=o.sibling,r=Gi(o,{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 Km(e,t){return t=Sd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function pd(e,t,n,r){return r!==null&&Em(r),Va(t,e.child,null,n),e=Km(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function O6(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Vm(Error(Q(422))),pd(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Sd({mode:"visible",children:r.children},i,0,null),o=qo(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Va(t,e.child,null,a),t.child.memoizedState=Gm(a),t.memoizedState=qm,o);if(!(t.mode&1))return pd(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Q(419)),r=Vm(o,r,void 0),pd(e,t,a,r)}if(s=(a&e.childLanes)!==0,vn||s){if(r=Dt,r!==null){switch(a&-a){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|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ri(e,i),yr(r,e,i,-1))}return dg(),r=Vm(Error(Q(421))),pd(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Y6.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,On=Fi(i.nextSibling),In=t,it=!0,pr=null,e!==null&&(Gn[Kn++]=ti,Gn[Kn++]=ni,Gn[Kn++]=Bo,ti=e.id,ni=e.overflow,Bo=t),t=Km(t,r.children),t.flags|=4096,t)}function jb(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sm(e.return,t,n)}function Xm(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ub(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(cn(e,t,r.children,n),r=lt.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&&jb(e,n,t);else if(e.tag===19)jb(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(Ze(lt,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&&ad(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Xm(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ad(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Xm(t,!0,n,null,o);break;case"together":Xm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function oi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Vo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function D6(e,t,n){switch(t.tag){case 3:Mb(t),Ha();break;case 5:eb(t);break;case 1:yn(t.type)&&Xc(t);break;case 4:Rm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ze(nd,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ze(lt,lt.current&1),t.flags|=128,null):n&t.child.childLanes?Bb(e,t,n):(Ze(lt,lt.current&1),e=oi(e,t,n),e!==null?e.sibling:null);Ze(lt,lt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ub(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ze(lt,lt.current),r)break;return null;case 22:case 23:return t.lanes=0,Ob(e,t,n)}return oi(e,t,n)}var zb,Qm,Hb,Vb;zb=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}},Qm=function(){},Hb=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,zo(Ir.current);var o=null;switch(n){case"input":i=Sh(e,i),r=Sh(e,r),o=[];break;case"select":i=ut({},i,{value:void 0}),r=ut({},r,{value:void 0}),o=[];break;case"textarea":i=Rh(e,i),r=Rh(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=qc)}Ph(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(eu.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(eu.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&et("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Vb=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mu(e,t){if(!it)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 Kt(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 L6(e,t,n){var r=t.pendingProps;switch(xm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(t),null;case 1:return yn(t.type)&&Kc(),Kt(t),null;case 3:return r=t.stateNode,Ya(),tt(gn),tt(qt),Im(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ed(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pr!==null&&(ug(pr),pr=null))),Qm(e,t),Kt(t),null;case 5:Nm(t);var i=zo(Pu.current);if(n=t.type,e!==null&&t.stateNode!=null)Hb(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Kt(t),null}if(e=zo(Ir.current),ed(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Pr]=t,r[Su]=o,e=(t.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(i=0;i<Tu.length;i++)et(Tu[i],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":Tx(r,o),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},et("invalid",r);break;case"textarea":Sx(r,o),et("invalid",r)}Ph(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&Yc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Yc(r.textContent,s,e),i=["children",""+s]):eu.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&et("scroll",r)}switch(n){case"input":Tc(r),Cx(r,o,!0);break;case"textarea":Tc(r),kx(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=qc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Rx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Pr]=t,e[Su]=r,zb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ih(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;i<Tu.length;i++)et(Tu[i],e);i=r;break;case"source":et("error",e),i=r;break;case"img":case"image":case"link":et("error",e),et("load",e),i=r;break;case"details":et("toggle",e),i=r;break;case"input":Tx(e,r),i=Sh(e,r),et("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ut({},r,{value:void 0}),et("invalid",e);break;case"textarea":Sx(e,r),i=Rh(e,r),et("invalid",e);break;default:i=r}Ph(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var u=s[o];o==="style"?Ix(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Nx(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&iu(e,u):typeof u=="number"&&iu(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(eu.hasOwnProperty(o)?u!=null&&o==="onScroll"&&et("scroll",e):u!=null&&mh(e,o,u,a))}switch(n){case"input":Tc(e),Cx(e,r,!1);break;case"textarea":Tc(e),kx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ni(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Aa(e,!!r.multiple,o,!1):r.defaultValue!=null&&Aa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=qc)}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 Kt(t),null;case 6:if(e&&t.stateNode!=null)Vb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=zo(Pu.current),zo(Ir.current),ed(t)){if(r=t.stateNode,n=t.memoizedProps,r[Pr]=t,(o=r.nodeValue!==n)&&(e=In,e!==null))switch(e.tag){case 3:Yc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Pr]=t,t.stateNode=r}return Kt(t),null;case 13:if(tt(lt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&On!==null&&t.mode&1&&!(t.flags&128))Yw(),Ha(),t.flags|=98560,o=!1;else if(o=ed(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Q(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Q(317));o[Pr]=t}else Ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kt(t),o=!1}else pr!==null&&(ug(pr),pr=null),o=!0;if(!o)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||lt.current&1?Rt===0&&(Rt=3):dg())),t.updateQueue!==null&&(t.flags|=4),Kt(t),null);case 4:return Ya(),Qm(e,t),e===null&&_u(t.stateNode.containerInfo),Kt(t),null;case 10:return Cm(t.type._context),Kt(t),null;case 17:return yn(t.type)&&Kc(),Kt(t),null;case 19:if(tt(lt),o=t.memoizedState,o===null)return Kt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Mu(o,!1);else{if(Rt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ad(e),a!==null){for(t.flags|=128,Mu(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ze(lt,lt.current&1|2),t.child}e=e.sibling}o.tail!==null&&xt()>Xa&&(t.flags|=128,r=!0,Mu(o,!1),t.lanes=4194304)}else{if(!r)if(e=ad(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!it)return Kt(t),null}else 2*xt()-o.renderingStartTime>Xa&&n!==1073741824&&(t.flags|=128,r=!0,Mu(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=xt(),t.sibling=null,n=lt.current,Ze(lt,r?n&1|2:n&1),t):(Kt(t),null);case 22:case 23:return cg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Dn&1073741824&&(Kt(t),t.subtreeFlags&6&&(t.flags|=8192)):Kt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function M6(e,t){switch(xm(t),t.tag){case 1:return yn(t.type)&&Kc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ya(),tt(gn),tt(qt),Im(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nm(t),null;case 13:if(tt(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(lt),null;case 4:return Ya(),null;case 10:return Cm(t.type._context),null;case 22:case 23:return cg(),null;case 24:return null;default:return null}}var md=!1,Xt=!1,F6=typeof WeakSet=="function"?WeakSet:Set,se=null;function Ga(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){mt(e,t,r)}else n.current=null}function Zm(e,t,n){try{n()}catch(r){mt(e,t,r)}}var $b=!1;function B6(e,t){if(cm=Lc,e=Ew(),nm(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=a),f===o&&++c===r&&(u=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(dm={focusedElem:e,selectionRange:n},Lc=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;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 y=m.memoizedProps,b=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:hr(t.type,y),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(T){mt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return m=$b,$b=!1,m}function Fu(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 o=i.destroy;i.destroy=void 0,o!==void 0&&Zm(t,n,o)}i=i.next}while(i!==r)}}function gd(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 Jm(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 Wb(e){var t=e.alternate;t!==null&&(e.alternate=null,Wb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pr],delete t[Su],delete t[mm],delete t[w6],delete t[b6])),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 Yb(e){return e.tag===5||e.tag===3||e.tag===4}function qb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yb(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 eg(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=qc));else if(r!==4&&(e=e.child,e!==null))for(eg(e,t,n),e=e.sibling;e!==null;)eg(e,t,n),e=e.sibling}function tg(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(tg(e,t,n),e=e.sibling;e!==null;)tg(e,t,n),e=e.sibling}var zt=null,mr=!1;function Vi(e,t,n){for(n=n.child;n!==null;)Gb(e,t,n),n=n.sibling}function Gb(e,t,n){if(Nr&&typeof Nr.onCommitFiberUnmount=="function")try{Nr.onCommitFiberUnmount(Rc,n)}catch{}switch(n.tag){case 5:Xt||Ga(n,t);case 6:var r=zt,i=mr;zt=null,Vi(e,t,n),zt=r,mr=i,zt!==null&&(mr?(e=zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(mr?(e=zt,n=n.stateNode,e.nodeType===8?hm(e.parentNode,n):e.nodeType===1&&hm(e,n),mu(e)):hm(zt,n.stateNode));break;case 4:r=zt,i=mr,zt=n.stateNode.containerInfo,mr=!0,Vi(e,t,n),zt=r,mr=i;break;case 0:case 11:case 14:case 15:if(!Xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Zm(n,t,a),i=i.next}while(i!==r)}Vi(e,t,n);break;case 1:if(!Xt&&(Ga(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){mt(n,t,s)}Vi(e,t,n);break;case 21:Vi(e,t,n);break;case 22:n.mode&1?(Xt=(r=Xt)||n.memoizedState!==null,Vi(e,t,n),Xt=r):Vi(e,t,n);break;default:Vi(e,t,n)}}function Kb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new F6),t.forEach(function(r){var i=q6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function gr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:zt=s.stateNode,mr=!1;break e;case 3:zt=s.stateNode.containerInfo,mr=!0;break e;case 4:zt=s.stateNode.containerInfo,mr=!0;break e}s=s.return}if(zt===null)throw Error(Q(160));Gb(o,a,i),zt=null,mr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){mt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xb(t,e),t=t.sibling}function Xb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gr(t,e),Dr(e),r&4){try{Fu(3,e,e.return),gd(3,e)}catch(y){mt(e,e.return,y)}try{Fu(5,e,e.return)}catch(y){mt(e,e.return,y)}}break;case 1:gr(t,e),Dr(e),r&512&&n!==null&&Ga(n,n.return);break;case 5:if(gr(t,e),Dr(e),r&512&&n!==null&&Ga(n,n.return),e.flags&32){var i=e.stateNode;try{iu(i,"")}catch(y){mt(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&_x(i,o),Ih(s,a);var l=Ih(s,o);for(a=0;a<u.length;a+=2){var c=u[a],d=u[a+1];c==="style"?Ix(i,d):c==="dangerouslySetInnerHTML"?Nx(i,d):c==="children"?iu(i,d):mh(i,c,d,l)}switch(s){case"input":Ah(i,o);break;case"textarea":Ax(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Aa(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Aa(i,!!o.multiple,o.defaultValue,!0):Aa(i,!!o.multiple,o.multiple?[]:"",!1))}i[Su]=o}catch(y){mt(e,e.return,y)}}break;case 6:if(gr(t,e),Dr(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(y){mt(e,e.return,y)}}break;case 3:if(gr(t,e),Dr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{mu(t.containerInfo)}catch(y){mt(e,e.return,y)}break;case 4:gr(t,e),Dr(e);break;case 13:gr(t,e),Dr(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(ig=xt())),r&4&&Kb(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Xt=(l=Xt)||c,gr(t,e),Xt=l):gr(t,e),Dr(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(se=e,c=e.child;c!==null;){for(d=se=c;se!==null;){switch(f=se,p=f.child,f.tag){case 0:case 11:case 14:case 15:Fu(4,f,f.return);break;case 1:Ga(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(y){mt(r,n,y)}}break;case 5:Ga(f,f.return);break;case 22:if(f.memoizedState!==null){Jb(d);continue}}p!==null?(p.return=f,se=p):Jb(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,u=d.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Px("display",a))}catch(y){mt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){mt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gr(t,e),Dr(e),r&4&&Kb(e);break;case 21:break;default:gr(t,e),Dr(e)}}function Dr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Yb(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(iu(i,""),r.flags&=-33);var o=qb(e);tg(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=qb(e);eg(e,s,a);break;default:throw Error(Q(161))}}catch(u){mt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function j6(e,t,n){se=e,Qb(e)}function Qb(e,t,n){for(var r=(e.mode&1)!==0;se!==null;){var i=se,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||md;if(!a){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Xt;s=md;var l=Xt;if(md=a,(Xt=u)&&!l)for(se=i;se!==null;)a=se,u=a.child,a.tag===22&&a.memoizedState!==null?eE(i):u!==null?(u.return=a,se=u):eE(i);for(;o!==null;)se=o,Qb(o),o=o.sibling;se=i,md=s,Xt=l}Zb(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,se=o):Zb(e)}}function Zb(e){for(;se!==null;){var t=se;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xt||gd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Xt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:hr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Jw(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Jw(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&mu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Xt||t.flags&512&&Jm(t)}catch(f){mt(t,t.return,f)}}if(t===e){se=null;break}if(n=t.sibling,n!==null){n.return=t.return,se=n;break}se=t.return}}function Jb(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var n=t.sibling;if(n!==null){n.return=t.return,se=n;break}se=t.return}}function eE(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gd(4,t)}catch(u){mt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){mt(t,i,u)}}var o=t.return;try{Jm(t)}catch(u){mt(t,o,u)}break;case 5:var a=t.return;try{Jm(t)}catch(u){mt(t,a,u)}}}catch(u){mt(t,t.return,u)}if(t===e){se=null;break}var s=t.sibling;if(s!==null){s.return=t.return,se=s;break}se=t.return}}var U6=Math.ceil,yd=Zr.ReactCurrentDispatcher,ng=Zr.ReactCurrentOwner,Zn=Zr.ReactCurrentBatchConfig,je=0,Dt=null,_t=null,Ht=0,Dn=0,Ka=Bi(0),Rt=0,Bu=null,Vo=0,vd=0,rg=0,ju=null,xn=null,ig=0,Xa=1/0,ai=null,xd=!1,og=null,$i=null,wd=!1,Wi=null,bd=0,Uu=0,ag=null,Ed=-1,Td=0;function dn(){return je&6?xt():Ed!==-1?Ed:Ed=xt()}function Yi(e){return e.mode&1?je&2&&Ht!==0?Ht&-Ht:T6.transition!==null?(Td===0&&(Td=qx()),Td):(e=Ye,e!==0||(e=window.event,e=e===void 0?16:nw(e.type)),e):1}function yr(e,t,n,r){if(50<Uu)throw Uu=0,ag=null,Error(Q(185));cu(e,n,r),(!(je&2)||e!==Dt)&&(e===Dt&&(!(je&2)&&(vd|=n),Rt===4&&qi(e,Ht)),wn(e,r),n===1&&je===0&&!(t.mode&1)&&(Xa=xt()+500,Qc&&Ui()))}function wn(e,t){var n=e.callbackNode;TD(e,t);var r=Ic(e,e===Dt?Ht:0);if(r===0)n!==null&&$x(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$x(n),t===1)e.tag===0?E6(nE.bind(null,e)):zw(nE.bind(null,e)),v6(function(){!(je&6)&&Ui()}),n=null;else{switch(Gx(r)){case 1:n=jh;break;case 4:n=Wx;break;case 16:n=kc;break;case 536870912:n=Yx;break;default:n=kc}n=cE(n,tE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tE(e,t){if(Ed=-1,Td=0,je&6)throw Error(Q(327));var n=e.callbackNode;if(Qa()&&e.callbackNode!==n)return null;var r=Ic(e,e===Dt?Ht:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_d(e,r);else{t=r;var i=je;je|=2;var o=iE();(Dt!==e||Ht!==t)&&(ai=null,Xa=xt()+500,Wo(e,t));do try{V6();break}catch(s){rE(e,s)}while(!0);_m(),yd.current=o,je=i,_t!==null?t=0:(Dt=null,Ht=0,t=Rt)}if(t!==0){if(t===2&&(i=Uh(e),i!==0&&(r=i,t=sg(e,i))),t===1)throw n=Bu,Wo(e,0),qi(e,r),wn(e,xt()),n;if(t===6)qi(e,r);else{if(i=e.current.alternate,!(r&30)&&!z6(i)&&(t=_d(e,r),t===2&&(o=Uh(e),o!==0&&(r=o,t=sg(e,o))),t===1))throw n=Bu,Wo(e,0),qi(e,r),wn(e,xt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Yo(e,xn,ai);break;case 3:if(qi(e,r),(r&130023424)===r&&(t=ig+500-xt(),10<t)){if(Ic(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){dn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=pm(Yo.bind(null,e,xn,ai),t);break}Yo(e,xn,ai);break;case 4:if(qi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-dr(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=xt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*U6(r/1960))-r,10<r){e.timeoutHandle=pm(Yo.bind(null,e,xn,ai),r);break}Yo(e,xn,ai);break;case 5:Yo(e,xn,ai);break;default:throw Error(Q(329))}}}return wn(e,xt()),e.callbackNode===n?tE.bind(null,e):null}function sg(e,t){var n=ju;return e.current.memoizedState.isDehydrated&&(Wo(e,t).flags|=256),e=_d(e,t),e!==2&&(t=xn,xn=n,t!==null&&ug(t)),e}function ug(e){xn===null?xn=e:xn.push.apply(xn,e)}function z6(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],o=i.getSnapshot;i=i.value;try{if(!fr(o(),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 qi(e,t){for(t&=~rg,t&=~vd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dr(t),r=1<<n;e[n]=-1,t&=~r}}function nE(e){if(je&6)throw Error(Q(327));Qa();var t=Ic(e,0);if(!(t&1))return wn(e,xt()),null;var n=_d(e,t);if(e.tag!==0&&n===2){var r=Uh(e);r!==0&&(t=r,n=sg(e,r))}if(n===1)throw n=Bu,Wo(e,0),qi(e,t),wn(e,xt()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Yo(e,xn,ai),wn(e,xt()),null}function lg(e,t){var n=je;je|=1;try{return e(t)}finally{je=n,je===0&&(Xa=xt()+500,Qc&&Ui())}}function $o(e){Wi!==null&&Wi.tag===0&&!(je&6)&&Qa();var t=je;je|=1;var n=Zn.transition,r=Ye;try{if(Zn.transition=null,Ye=1,e)return e()}finally{Ye=r,Zn.transition=n,je=t,!(je&6)&&Ui()}}function cg(){Dn=Ka.current,tt(Ka)}function Wo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,y6(n)),_t!==null)for(n=_t.return;n!==null;){var r=n;switch(xm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Kc();break;case 3:Ya(),tt(gn),tt(qt),Im();break;case 5:Nm(r);break;case 4:Ya();break;case 13:tt(lt);break;case 19:tt(lt);break;case 10:Cm(r.type._context);break;case 22:case 23:cg()}n=n.return}if(Dt=e,_t=e=Gi(e.current,null),Ht=Dn=t,Rt=0,Bu=null,rg=vd=Vo=0,xn=ju=null,Uo!==null){for(t=0;t<Uo.length;t++)if(n=Uo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Uo=null}return e}function rE(e,t){do{var n=_t;try{if(_m(),sd.current=dd,ud){for(var r=ct.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ud=!1}if(Ho=0,Ot=kt=ct=null,Iu=!1,Ou=0,ng.current=null,n===null||n.return===null){Rt=1,Bu=t,_t=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=Ht,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=kb(a);if(p!==null){p.flags&=-257,Rb(p,a,s,o,t),p.mode&1&&Ab(o,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){Ab(o,l,t),dg();break e}u=Error(Q(426))}}else if(it&&s.mode&1){var b=kb(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Rb(b,a,s,o,t),Em(qa(u,s));break e}}o=u=qa(u,s),Rt!==4&&(Rt=2),ju===null?ju=[o]:ju.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=Cb(o,u,t);Zw(o,g);break e;case 1:s=u;var x=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&($i===null||!$i.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var T=Sb(o,s,t);Zw(o,T);break e}}o=o.return}while(o!==null)}aE(n)}catch(C){t=C,_t===n&&n!==null&&(_t=n=n.return);continue}break}while(!0)}function iE(){var e=yd.current;return yd.current=dd,e===null?dd:e}function dg(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),Dt===null||!(Vo&268435455)&&!(vd&268435455)||qi(Dt,Ht)}function _d(e,t){var n=je;je|=2;var r=iE();(Dt!==e||Ht!==t)&&(ai=null,Wo(e,t));do try{H6();break}catch(i){rE(e,i)}while(!0);if(_m(),je=n,yd.current=r,_t!==null)throw Error(Q(261));return Dt=null,Ht=0,Rt}function H6(){for(;_t!==null;)oE(_t)}function V6(){for(;_t!==null&&!hD();)oE(_t)}function oE(e){var t=lE(e.alternate,e,Dn);e.memoizedProps=e.pendingProps,t===null?aE(e):_t=t,ng.current=null}function aE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=M6(n,t),n!==null){n.flags&=32767,_t=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Rt=6,_t=null;return}}else if(n=L6(n,t,Dn),n!==null){_t=n;return}if(t=t.sibling,t!==null){_t=t;return}_t=t=e}while(t!==null);Rt===0&&(Rt=5)}function Yo(e,t,n){var r=Ye,i=Zn.transition;try{Zn.transition=null,Ye=1,$6(e,t,n,r)}finally{Zn.transition=i,Ye=r}return null}function $6(e,t,n,r){do Qa();while(Wi!==null);if(je&6)throw Error(Q(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(Q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(_D(e,o),e===Dt&&(_t=Dt=null,Ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wd||(wd=!0,cE(kc,function(){return Qa(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Zn.transition,Zn.transition=null;var a=Ye;Ye=1;var s=je;je|=4,ng.current=null,B6(e,n),Xb(n,e),c6(dm),Lc=!!cm,dm=cm=null,e.current=n,j6(n),mD(),je=s,Ye=a,Zn.transition=o}else e.current=n;if(wd&&(wd=!1,Wi=e,bd=i),o=e.pendingLanes,o===0&&($i=null),vD(n.stateNode),wn(e,xt()),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(xd)throw xd=!1,e=og,og=null,e;return bd&1&&e.tag!==0&&Qa(),o=e.pendingLanes,o&1?e===ag?Uu++:(Uu=0,ag=e):Uu=0,Ui(),null}function Qa(){if(Wi!==null){var e=Gx(bd),t=Zn.transition,n=Ye;try{if(Zn.transition=null,Ye=16>e?16:e,Wi===null)var r=!1;else{if(e=Wi,Wi=null,bd=0,je&6)throw Error(Q(331));var i=je;for(je|=4,se=e.current;se!==null;){var o=se,a=o.child;if(se.flags&16){var s=o.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(se=l;se!==null;){var c=se;switch(c.tag){case 0:case 11:case 15:Fu(8,c,o)}var d=c.child;if(d!==null)d.return=c,se=d;else for(;se!==null;){c=se;var f=c.sibling,p=c.return;if(Wb(c),c===l){se=null;break}if(f!==null){f.return=p,se=f;break}se=p}}}var m=o.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}se=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,se=a;else e:for(;se!==null;){if(o=se,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Fu(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,se=g;break e}se=o.return}}var x=e.current;for(se=x;se!==null;){a=se;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,se=w;else e:for(a=x;se!==null;){if(s=se,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:gd(9,s)}}catch(C){mt(s,s.return,C)}if(s===a){se=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,se=T;break e}se=s.return}}if(je=i,Ui(),Nr&&typeof Nr.onPostCommitFiberRoot=="function")try{Nr.onPostCommitFiberRoot(Rc,e)}catch{}r=!0}return r}finally{Ye=n,Zn.transition=t}}return!1}function sE(e,t,n){t=qa(n,t),t=Cb(e,t,1),e=Hi(e,t,1),t=dn(),e!==null&&(cu(e,1,t),wn(e,t))}function mt(e,t,n){if(e.tag===3)sE(e,e,n);else for(;t!==null;){if(t.tag===3){sE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($i===null||!$i.has(r))){e=qa(n,e),e=Sb(t,e,1),t=Hi(t,e,1),e=dn(),t!==null&&(cu(t,1,e),wn(t,e));break}}t=t.return}}function W6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=dn(),e.pingedLanes|=e.suspendedLanes&n,Dt===e&&(Ht&n)===n&&(Rt===4||Rt===3&&(Ht&130023424)===Ht&&500>xt()-ig?Wo(e,0):rg|=n),wn(e,t)}function uE(e,t){t===0&&(e.mode&1?(t=Pc,Pc<<=1,!(Pc&130023424)&&(Pc=4194304)):t=1);var n=dn();e=ri(e,t),e!==null&&(cu(e,t,n),wn(e,n))}function Y6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uE(e,n)}function q6(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(Q(314))}r!==null&&r.delete(t),uE(e,n)}var lE;lE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)vn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vn=!1,D6(e,t,n);vn=!!(e.flags&131072)}else vn=!1,it&&t.flags&1048576&&Hw(t,Jc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hd(e,t),e=t.pendingProps;var i=ja(t,qt.current);Wa(t,n),i=Lm(null,t,r,e,i,n);var o=Mm();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,yn(r)?(o=!0,Xc(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,km(t),i.updater=fd,t.stateNode=i,i._reactInternals=t,Hm(t,r,e,n),t=Ym(null,t,r,!0,o,n)):(t.tag=0,it&&o&&vm(t),cn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=K6(r),e=hr(r,e),i){case 0:t=Wm(null,t,r,e,n);break e;case 1:t=Lb(null,t,r,e,n);break e;case 11:t=Nb(null,t,r,e,n);break e;case 14:t=Pb(null,t,r,hr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),Wm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),Lb(e,t,r,i,n);case 3:e:{if(Mb(t),e===null)throw Error(Q(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Qw(e,t),od(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=qa(Error(Q(423)),t),t=Fb(e,t,r,n,i);break e}else if(r!==i){i=qa(Error(Q(424)),t),t=Fb(e,t,r,n,i);break e}else for(On=Fi(t.stateNode.containerInfo.firstChild),In=t,it=!0,pr=null,n=Kw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ha(),r===i){t=oi(e,t,n);break e}cn(e,t,r,n)}t=t.child}return t;case 5:return eb(t),e===null&&bm(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,fm(r,i)?a=null:o!==null&&fm(r,o)&&(t.flags|=32),Db(e,t),cn(e,t,a,n),t.child;case 6:return e===null&&bm(t),null;case 13:return Bb(e,t,n);case 4:return Rm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):cn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),Nb(e,t,r,i,n);case 7:return cn(e,t,t.pendingProps,n),t.child;case 8:return cn(e,t,t.pendingProps.children,n),t.child;case 12:return cn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Ze(nd,r._currentValue),r._currentValue=a,o!==null)if(fr(o.value,a)){if(o.children===i.children&&!gn.current){t=oi(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=ii(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Sm(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Q(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sm(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}cn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wa(t,n),i=Xn(i),r=r(i),t.flags|=1,cn(e,t,r,n),t.child;case 14:return r=t.type,i=hr(r,t.pendingProps),i=hr(r.type,i),Pb(e,t,r,i,n);case 15:return Ib(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hr(r,i),hd(e,t),t.tag=1,yn(r)?(e=!0,Xc(t)):e=!1,Wa(t,n),Tb(t,r,i),Hm(t,r,i,n),Ym(null,t,r,!0,e,n);case 19:return Ub(e,t,n);case 22:return Ob(e,t,n)}throw Error(Q(156,t.tag))};function cE(e,t){return Vx(e,t)}function G6(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 Jn(e,t,n,r){return new G6(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function K6(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===bh)return 14}return 2}function Gi(e,t){var n=e.alternate;return n===null?(n=Jn(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 Cd(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")fg(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Sa:return qo(n.children,i,o,t);case gh:a=8,i|=8;break;case yh:return e=Jn(12,n,t,i|2),e.elementType=yh,e.lanes=o,e;case xh:return e=Jn(13,n,t,i),e.elementType=xh,e.lanes=o,e;case wh:return e=Jn(19,n,t,i),e.elementType=wh,e.lanes=o,e;case xx:return Sd(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yx:a=10;break e;case vx:a=9;break e;case vh:a=11;break e;case bh:a=14;break e;case Ri:a=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=Jn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function qo(e,t,n,r){return e=Jn(7,e,r,t),e.lanes=n,e}function Sd(e,t,n,r){return e=Jn(22,e,r,t),e.elementType=xx,e.lanes=n,e.stateNode={isHidden:!1},e}function pg(e,t,n){return e=Jn(6,e,null,t),e.lanes=n,e}function hg(e,t,n){return t=Jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function X6(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=zh(0),this.expirationTimes=zh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mg(e,t,n,r,i,o,a,s,u){return e=new X6(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Jn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},km(o),e}function Q6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ca,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function dE(e){if(!e)return ji;e=e._reactInternals;e:{if(Lo(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(yn(n))return jw(e,n,t)}return t}function fE(e,t,n,r,i,o,a,s,u){return e=mg(n,r,!0,e,i,o,a,s,u),e.context=dE(null),n=e.current,r=dn(),i=Yi(n),o=ii(r,i),o.callback=t??null,Hi(n,o,i),e.current.lanes=i,cu(e,i,r),wn(e,r),e}function Ad(e,t,n,r){var i=t.current,o=dn(),a=Yi(i);return n=dE(n),t.context===null?t.context=n:t.pendingContext=n,t=ii(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Hi(i,t,a),e!==null&&(yr(e,i,a,o),id(e,i,a)),a}function kd(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 pE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gg(e,t){pE(e,t),(e=e.alternate)&&pE(e,t)}function Z6(){return null}var hE=typeof reportError=="function"?reportError:function(e){console.error(e)};function yg(e){this._internalRoot=e}Rd.prototype.render=yg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Ad(e,t,null,null)},Rd.prototype.unmount=yg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$o(function(){Ad(null,e,null,null)}),t[Jr]=null}};function Rd(e){this._internalRoot=e}Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Di.length&&t!==0&&t<Di[n].priority;n++);Di.splice(n,0,e),n===0&&ew(e)}};function vg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mE(){}function J6(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var l=kd(a);o.call(l)}}var a=fE(t,r,e,0,null,!1,!1,"",mE);return e._reactRootContainer=a,e[Jr]=a.current,_u(e.nodeType===8?e.parentNode:e),$o(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=kd(u);s.call(l)}}var u=mg(e,0,!1,null,null,!1,!1,"",mE);return e._reactRootContainer=u,e[Jr]=u.current,_u(e.nodeType===8?e.parentNode:e),$o(function(){Ad(t,u,n,r)}),u}function Pd(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var u=kd(a);s.call(u)}}Ad(t,a,e,i)}else a=J6(n,t,e,i,r);return kd(a)}Kx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lu(t.pendingLanes);n!==0&&(Hh(t,n|1),wn(t,xt()),!(je&6)&&(Xa=xt()+500,Ui()))}break;case 13:$o(function(){var r=ri(e,1);if(r!==null){var i=dn();yr(r,e,1,i)}}),gg(e,1)}},Vh=function(e){if(e.tag===13){var t=ri(e,134217728);if(t!==null){var n=dn();yr(t,e,134217728,n)}gg(e,134217728)}},Xx=function(e){if(e.tag===13){var t=Yi(e),n=ri(e,t);if(n!==null){var r=dn();yr(n,e,t,r)}gg(e,t)}},Qx=function(){return Ye},Zx=function(e,t){var n=Ye;try{return Ye=e,t()}finally{Ye=n}},Lh=function(e,t,n){switch(t){case"input":if(Ah(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=Gc(r);if(!i)throw Error(Q(90));Ex(r),Ah(r,i)}}}break;case"textarea":Ax(e,n);break;case"select":t=n.value,t!=null&&Aa(e,!!n.multiple,t,!1)}},Mx=lg,Fx=$o;var eL={usingClientEntryPoint:!1,Events:[Au,Fa,Gc,Dx,Lx,lg]},zu={findFiberByHostInstance:Mo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tL={bundleType:zu.bundleType,version:zu.version,rendererPackageName:zu.rendererPackageName,rendererConfig:zu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zx(e),e===null?null:e.stateNode},findFiberByHostInstance:zu.findFiberByHostInstance||Z6,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 Id=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Id.isDisabled&&Id.supportsFiber)try{Rc=Id.inject(tL),Nr=Id}catch{}}Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eL,Rn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vg(t))throw Error(Q(200));return Q6(e,t,null,n)},Rn.createRoot=function(e,t){if(!vg(e))throw Error(Q(299));var n=!1,r="",i=hE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=mg(e,1,!1,null,null,n,!1,r,i),e[Jr]=t.current,_u(e.nodeType===8?e.parentNode:e),new yg(t)},Rn.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=zx(t),e=e===null?null:e.stateNode,e},Rn.flushSync=function(e){return $o(e)},Rn.hydrate=function(e,t,n){if(!Nd(t))throw Error(Q(200));return Pd(null,e,t,!0,n)},Rn.hydrateRoot=function(e,t,n){if(!vg(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=hE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=fE(t,null,e,1,n??null,i,!1,o,a),e[Jr]=t.current,_u(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 Rd(t)},Rn.render=function(e,t,n){if(!Nd(t))throw Error(Q(200));return Pd(null,e,t,!1,n)},Rn.unmountComponentAtNode=function(e){if(!Nd(e))throw Error(Q(40));return e._reactRootContainer?($o(function(){Pd(null,null,e,!1,function(){e._reactRootContainer=null,e[Jr]=null})}),!0):!1},Rn.unstable_batchedUpdates=lg,Rn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Nd(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Pd(e,t,n,!1,r)},Rn.version="18.3.1-next-f1338f8080-20240426";function gE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gE)}catch(e){console.error(e)}}gE(),dx.exports=Rn;var Go=dx.exports,yE,vE=Go;yE=vE.createRoot,vE.hydrateRoot;const xE="3.0.49";function Od(e){"@babel/helpers - typeof";return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Od(e)}var nL=/^\s+/,rL=/\s+$/;function de(e,t){if(e=e||"",t=t||{},e instanceof de)return e;if(!(this instanceof de))return new de(e,t);var n=iL(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}de.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,o,a,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*a+.0722*s},setAlpha:function(t){return this._a=CE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=bE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=bE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=wE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=wE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return EE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return uL(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ot(this._r,255)*100)+"%",g:Math.round(ot(this._g,255)*100)+"%",b:Math.round(ot(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%)":"rgba("+Math.round(ot(this._r,255)*100)+"%, "+Math.round(ot(this._g,255)*100)+"%, "+Math.round(ot(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:wL[EE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+TE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=de(t);r="#"+TE(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return de(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(fL,arguments)},brighten:function(){return this._applyModification(pL,arguments)},darken:function(){return this._applyModification(hL,arguments)},desaturate:function(){return this._applyModification(lL,arguments)},saturate:function(){return this._applyModification(cL,arguments)},greyscale:function(){return this._applyModification(dL,arguments)},spin:function(){return this._applyModification(mL,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(vL,arguments)},complement:function(){return this._applyCombination(gL,arguments)},monochromatic:function(){return this._applyCombination(xL,arguments)},splitcomplement:function(){return this._applyCombination(yL,arguments)},triad:function(){return this._applyCombination(_E,[3])},tetrad:function(){return this._applyCombination(_E,[4])}},de.fromRatio=function(e,t){if(Od(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Hu(e[r]));e=n}return de(e,t)};function iL(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=_L(e)),Od(e)=="object"&&(si(e.r)&&si(e.g)&&si(e.b)?(t=oL(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):si(e.h)&&si(e.s)&&si(e.v)?(r=Hu(e.s),i=Hu(e.v),t=sL(e.h,r,i),a=!0,s="hsv"):si(e.h)&&si(e.s)&&si(e.l)&&(r=Hu(e.s),o=Hu(e.l),t=aL(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=CE(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function oL(e,t,n){return{r:ot(e,255)*255,g:ot(t,255)*255,b:ot(n,255)*255}}function wE(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=(r+i)/2;if(r==i)o=a=0;else{var u=r-i;switch(a=s>.5?u/(2-r-i):u/(r+i),r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,l:s}}function aL(e,t,n){var r,i,o;e=ot(e,360),t=ot(t,100),n=ot(n,100);function a(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),i=a(u,s,e),o=a(u,s,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function bE(e,t,n){e=ot(e,255),t=ot(t,255),n=ot(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=r,u=r-i;if(a=r===0?0:u/r,r==i)o=0;else{switch(r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s:a,v:s}}function sL(e,t,n){e=ot(e,360)*6,t=ot(t,100),n=ot(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,a,o,o,s,n][u],c=[s,n,n,a,o,o][u],d=[o,o,s,n,n,a][u];return{r:l*255,g:c*255,b:d*255}}function EE(e,t,n,r){var i=[vr(Math.round(e).toString(16)),vr(Math.round(t).toString(16)),vr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function uL(e,t,n,r,i){var o=[vr(Math.round(e).toString(16)),vr(Math.round(t).toString(16)),vr(Math.round(n).toString(16)),vr(SE(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function TE(e,t,n,r){var i=[vr(SE(r)),vr(Math.round(e).toString(16)),vr(Math.round(t).toString(16)),vr(Math.round(n).toString(16))];return i.join("")}de.equals=function(e,t){return!e||!t?!1:de(e).toRgbString()==de(t).toRgbString()},de.random=function(){return de.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function lL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.s-=t/100,n.s=Dd(n.s),de(n)}function cL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.s+=t/100,n.s=Dd(n.s),de(n)}function dL(e){return de(e).desaturate(100)}function fL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.l+=t/100,n.l=Dd(n.l),de(n)}function pL(e,t){t=t===0?0:t||10;var n=de(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),de(n)}function hL(e,t){t=t===0?0:t||10;var n=de(e).toHsl();return n.l-=t/100,n.l=Dd(n.l),de(n)}function mL(e,t){var n=de(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,de(n)}function gL(e){var t=de(e).toHsl();return t.h=(t.h+180)%360,de(t)}function _E(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=de(e).toHsl(),r=[de(e)],i=360/t,o=1;o<t;o++)r.push(de({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function yL(e){var t=de(e).toHsl(),n=t.h;return[de(e),de({h:(n+72)%360,s:t.s,l:t.l}),de({h:(n+216)%360,s:t.s,l:t.l})]}function vL(e,t,n){t=t||6,n=n||30;var r=de(e).toHsl(),i=360/n,o=[de(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(de(r));return o}function xL(e,t){t=t||6;for(var n=de(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(de({h:r,s:i,v:o})),o=(o+s)%1;return a}de.mix=function(e,t,n){n=n===0?0:n||50;var r=de(e).toRgb(),i=de(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return de(a)},de.readability=function(e,t){var n=de(e),r=de(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},de.isReadable=function(e,t,n){var r=de.readability(e,t),i,o;switch(o=!1,i=CL(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},de.mostReadable=function(e,t,n){var r=null,i=0,o,a,s,u;n=n||{},a=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)o=de.readability(e,t[l]),o>i&&(i=o,r=de(t[l]));return de.isReadable(e,r,{level:s,size:u})||!a?r:(n.includeFallbackColors=!1,de.mostReadable(e,["#fff","#000"],n))};var xg=de.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},wL=de.hexNames=bL(xg);function bL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function CE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ot(e,t){EL(e)&&(e="100%");var n=TL(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Dd(e){return Math.min(1,Math.max(0,e))}function Ln(e){return parseInt(e,16)}function EL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function TL(e){return typeof e=="string"&&e.indexOf("%")!=-1}function vr(e){return e.length==1?"0"+e:""+e}function Hu(e){return e<=1&&(e=e*100+"%"),e}function SE(e){return Math.round(parseFloat(e)*255).toString(16)}function AE(e){return Ln(e)/255}var xr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function si(e){return!!xr.CSS_UNIT.exec(e)}function _L(e){e=e.replace(nL,"").replace(rL,"").toLowerCase();var t=!1;if(xg[e])e=xg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=xr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=xr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=xr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=xr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=xr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=xr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=xr.hex8.exec(e))?{r:Ln(n[1]),g:Ln(n[2]),b:Ln(n[3]),a:AE(n[4]),format:t?"name":"hex8"}:(n=xr.hex6.exec(e))?{r:Ln(n[1]),g:Ln(n[2]),b:Ln(n[3]),format:t?"name":"hex"}:(n=xr.hex4.exec(e))?{r:Ln(n[1]+""+n[1]),g:Ln(n[2]+""+n[2]),b:Ln(n[3]+""+n[3]),a:AE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=xr.hex3.exec(e))?{r:Ln(n[1]+""+n[1]),g:Ln(n[2]+""+n[2]),b:Ln(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function CL(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const SL=350,kE=400,RE=600,wg={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},NE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=de(e).toHsl(),n=de(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function AL(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))})}function Vu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const bg=e=>Array.isArray(e);function PE(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}function $u(e){return typeof e=="string"||Array.isArray(e)}function IE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Eg(e,t,n,r){if(typeof t=="function"){const[i,o]=IE(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=IE(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Ld(e,t,n){const r=e.getProps();return Eg(r,t,n!==void 0?n:r.custom,e)}const Tg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_g=["initial",...Tg],Wu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ki=new Set(Wu),ui=e=>e*1e3,li=e=>e/1e3,kL={type:"spring",stiffness:500,damping:25,restSpeed:10},RL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),NL={type:"keyframes",duration:.8},PL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},IL=(e,{keyframes:t})=>t.length>2?NL:Ki.has(e)?e.startsWith("scale")?RL(t[1]):kL:PL;function Cg(e,t){return e?e[t]||e.default||e:void 0}const OL={skipAnimations:!1,useManualTiming:!1},DL=e=>e!==null;function Md(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(DL),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Qt=e=>e;function LL(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(l){o.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&o.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),o.delete(l)},process:l=>{if(a=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const Fd=["read","resolveKeyframes","update","preRender","render","postRender"],ML=40;function OE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=Fd.reduce((g,x)=>(g[x]=LL(o),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=a,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,ML),1),i.timestamp=g,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Fd.reduce((g,x)=>{const w=a[x];return g[x]=(T,C=!1,_=!1)=>(n||m(),w.schedule(T,C,_)),g},{}),cancel:g=>{for(let x=0;x<Fd.length;x++)a[Fd[x]].cancel(g)},state:i,steps:a}}const{schedule:Ke,cancel:Xi,state:Vt,steps:Sg}=OE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qt,!0),DE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,FL=1e-7,BL=12;function jL(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=DE(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>FL&&++s<BL);return a}function Yu(e,t,n,r){if(e===t&&n===r)return Qt;const i=o=>jL(o,0,1,e,n);return o=>o===0||o===1?o:DE(i(o),t,r)}const LE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ME=e=>t=>1-e(1-t),FE=Yu(.33,1.53,.69,.99),Ag=ME(FE),BE=LE(Ag),jE=e=>(e*=2)<1?.5*Ag(e):.5*(2-Math.pow(2,-10*(e-1))),kg=e=>1-Math.sin(Math.acos(e)),UE=ME(kg),zE=LE(kg),HE=e=>/^0[^.\s]+$/u.test(e);function UL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||HE(e):!0}let Rg=Qt;const VE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$E=e=>t=>typeof t=="string"&&t.startsWith(e),WE=$E("--"),zL=$E("var(--"),Ng=e=>zL(e)?HL.test(e.split("/*")[0].trim()):!1,HL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,VL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $L(e){const t=VL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function YE(e,t,n=1){const[r,i]=$L(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return VE(a)?parseFloat(a):a}return Ng(i)?YE(i,t,n+1):i}const Qi=(e,t,n)=>n>t?t:n<e?e:n,Za={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qu={...Za,transform:e=>Qi(0,1,e)},Bd={...Za,default:1},Gu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zi=Gu("deg"),Lr=Gu("%"),ge=Gu("px"),WL=Gu("vh"),YL=Gu("vw"),qE={...Lr,parse:e=>Lr.parse(e)/100,transform:e=>Lr.transform(e*100)},qL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),GE=e=>e===Za||e===ge,KE=(e,t)=>parseFloat(e.split(", ")[t]),XE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return KE(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?KE(o[1],e):0}},GL=new Set(["x","y","z"]),KL=Wu.filter(e=>!GL.has(e));function XL(e){const t=[];return KL.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ja={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:XE(4,13),y:XE(5,14)};Ja.translateX=Ja.x,Ja.translateY=Ja.y;const QE=e=>t=>t.test(e),ZE=[Za,ge,Lr,Zi,YL,WL,{test:e=>e==="auto",parse:e=>e}],JE=e=>ZE.find(QE(e)),Ko=new Set;let Pg=!1,Ig=!1;function eT(){if(Ig){const e=Array.from(Ko).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=XL(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(([o,a])=>{var s;(s=r.getValue(o))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ig=!1,Pg=!1,Ko.forEach(e=>e.complete()),Ko.clear()}function tT(){Ko.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ig=!0)})}function QL(){tT(),eT()}class Og{constructor(t,n,r,i,o,a=!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=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ko.add(this),Pg||(Pg=!0,Ke.read(tT),Ke.resolveKeyframes(eT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ko.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ko.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ku=e=>Math.round(e*1e5)/1e5,Dg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ZL(e){return e==null}const JL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Lg=(e,t)=>n=>!!(typeof n=="string"&&JL.test(n)&&n.startsWith(e)||t&&!ZL(n)&&Object.prototype.hasOwnProperty.call(n,t)),nT=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Dg);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},e4=e=>Qi(0,255,e),Mg={...Za,transform:e=>Math.round(e4(e))},Xo={test:Lg("rgb","red"),parse:nT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mg.transform(e)+", "+Mg.transform(t)+", "+Mg.transform(n)+", "+Ku(qu.transform(r))+")"};function t4(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 Fg={test:Lg("#"),parse:t4,transform:Xo.transform},es={test:Lg("hsl","hue"),parse:nT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Lr.transform(Ku(t))+", "+Lr.transform(Ku(n))+", "+Ku(qu.transform(r))+")"},Zt={test:e=>Xo.test(e)||Fg.test(e)||es.test(e),parse:e=>Xo.test(e)?Xo.parse(e):es.test(e)?es.parse(e):Fg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xo.transform(e):es.transform(e)},n4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function r4(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Dg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(n4))===null||n===void 0?void 0:n.length)||0)>0}const rT="number",iT="color",i4="var",o4="var(",oT="${}",a4=/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 Xu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(a4,u=>(Zt.test(u)?(r.color.push(o),i.push(iT),n.push(Zt.parse(u))):u.startsWith(o4)?(r.var.push(o),i.push(i4),n.push(u)):(r.number.push(o),i.push(rT),n.push(parseFloat(u))),++o,oT)).split(oT);return{values:n,split:s,indexes:r,types:i}}function aT(e){return Xu(e).values}function sT(e){const{split:t,types:n}=Xu(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===rT?o+=Ku(i[a]):s===iT?o+=Zt.transform(i[a]):o+=i[a]}return o}}const s4=e=>typeof e=="number"?0:e;function u4(e){const t=aT(e);return sT(e)(t.map(s4))}const Ji={test:r4,parse:aT,createTransformer:sT,getAnimatableNone:u4},l4=new Set(["brightness","contrast","saturate","opacity"]);function c4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Dg)||[];if(!r)return e;const i=n.replace(r,"");let o=l4.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const d4=/\b([a-z-]*)\(.*?\)/gu,Bg={...Ji,getAnimatableNone:e=>{const t=e.match(d4);return t?t.map(c4).join(" "):e}},f4={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},p4={rotate:Zi,rotateX:Zi,rotateY:Zi,rotateZ:Zi,scale:Bd,scaleX:Bd,scaleY:Bd,scaleZ:Bd,skew:Zi,skewX:Zi,skewY:Zi,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:qu,originX:qE,originY:qE,originZ:ge},uT={...Za,transform:Math.round},jg={...f4,...p4,zIndex:uT,size:ge,fillOpacity:qu,strokeOpacity:qu,numOctaves:uT},h4={...jg,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:Bg,WebkitFilter:Bg},Ug=e=>h4[e];function lT(e,t){let n=Ug(e);return n!==Bg&&(n=Ji),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const m4=new Set(["auto","none","0"]);function g4(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!m4.has(o)&&Xu(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=lT(n,i)}class cT extends Og{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Ng(l))){const c=YE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!qL.has(r)||t.length!==2)return;const[i,o]=t,a=JE(i),s=JE(o);if(a!==s)if(GE(a)&&GE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)UL(t[i])&&r.push(i);r.length&&g4(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=Ja[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 t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=i.length-1,s=i[a];i[a]=Ja[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function zg(e){return typeof e=="function"}let jd;function y4(){jd=void 0}const Mr={now:()=>(jd===void 0&&Mr.set(Vt.isProcessing||OL.useManualTiming?Vt.timestamp:performance.now()),jd),set:e=>{jd=e,queueMicrotask(y4)}},dT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ji.test(e)||e==="0")&&!e.startsWith("url("));function v4(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 x4(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=dT(i,t),s=dT(o,t);return!a||!s?!1:v4(e)||(n==="spring"||zg(n))&&r}const w4=40;class fT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Mr.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>w4?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&QL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Mr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!x4(t,r,i,o))if(a)this.options.duration=0;else{u==null||u(Md(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function pT(e,t){return t?e*(1e3/t):0}const b4=5;function hT(e,t,n){const r=Math.max(t-b4,0);return pT(n-e(r),t-r)}const Hg=.001,E4=.01,T4=10,_4=.05,C4=1;function S4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,a=1-t;a=Qi(_4,C4,a),e=Qi(E4,T4,li(e)),a<1?(i=l=>{const c=l*a,d=c*e,f=c-n,p=Vg(l,a),m=Math.exp(-d);return Hg-f/p*m},o=l=>{const d=l*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(l,2)*e,m=Math.exp(-d),y=Vg(Math.pow(l,2),a);return(-i(l)+Hg>0?-1:1)*((f-p)*m)/y}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Hg+c*d},o=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=k4(i,o,s);if(e=ui(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const A4=12;function k4(e,t,n){let r=n;for(let i=1;i<A4;i++)r=r-e(r)/t(r);return r}function Vg(e,t){return e*Math.sqrt(1-t*t)}const R4=["duration","bounce"],N4=["stiffness","damping","mass"];function mT(e,t){return t.some(n=>e[n]!==void 0)}function P4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!mT(e,N4)&&mT(e,R4)){const n=S4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function gT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=P4({...r,velocity:-li(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=o-i,b=li(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(m<1){const w=Vg(b,m);x=T=>{const C=Math.exp(-m*b*T);return o-C*((p+m*b*y)/w*Math.sin(w*T)+y*Math.cos(w*T))}}else if(m===1)x=w=>o-Math.exp(-b*w)*(y+(p+b*y)*w);else{const w=b*Math.sqrt(m*m-1);x=T=>{const C=Math.exp(-m*b*T),_=Math.min(w*T,300);return o-C*((p+m*b*y)*Math.sinh(_)+w*y*Math.cosh(_))/w}}return{calculatedDuration:f&&c||null,next:w=>{const T=x(w);if(f)a.done=w>=c;else{let C=0;m<1&&(C=w===0?ui(p):hT(x,w,T));const _=Math.abs(C)<=n,A=Math.abs(o-T)<=t;a.done=_&&A}return a.value=a.done?o:T,a}}}function yT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=I=>s!==void 0&&I<s||u!==void 0&&I>u,m=I=>s===void 0?u:u===void 0||Math.abs(s-I)<Math.abs(u-I)?s:u;let y=n*t;const b=d+y,g=a===void 0?b:a(b);g!==b&&(y=g-d);const x=I=>-y*Math.exp(-I/r),w=I=>g+x(I),T=I=>{const U=x(I),P=w(I);f.done=Math.abs(U)<=l,f.value=f.done?g:P};let C,_;const A=I=>{p(f.value)&&(C=I,_=gT({keyframes:[f.value,m(f.value)],velocity:hT(w,I,f.value),damping:i,stiffness:o,restDelta:l,restSpeed:c}))};return A(0),{calculatedDuration:null,next:I=>{let U=!1;return!_&&C===void 0&&(U=!0,T(I),A(I)),C!==void 0&&I>=C?_.next(I-C):(!U&&T(I),f)}}}const I4=Yu(.42,0,1,1),O4=Yu(0,0,.58,1),vT=Yu(.42,0,.58,1),D4=e=>Array.isArray(e)&&typeof e[0]!="number",$g=e=>Array.isArray(e)&&typeof e[0]=="number",xT={linear:Qt,easeIn:I4,easeInOut:vT,easeOut:O4,circIn:kg,circInOut:zE,circOut:UE,backIn:Ag,backInOut:BE,backOut:FE,anticipate:jE},wT=e=>{if($g(e)){Rg(e.length===4);const[t,n,r,i]=e;return Yu(t,n,r,i)}else if(typeof e=="string")return Rg(xT[e]!==void 0),xT[e];return e},L4=(e,t)=>n=>t(e(n)),ci=(...e)=>e.reduce(L4),ts=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dt=(e,t,n)=>e+(t-e)*n;function Wg(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 M4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Wg(u,s,e+1/3),o=Wg(u,s,e),a=Wg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Ud(e,t){return n=>n>0?t:e}const Yg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},F4=[Fg,Xo,es],B4=e=>F4.find(t=>t.test(e));function bT(e){const t=B4(e);if(!t)return!1;let n=t.parse(e);return t===es&&(n=M4(n)),n}const ET=(e,t)=>{const n=bT(e),r=bT(t);if(!n||!r)return Ud(e,t);const i={...n};return o=>(i.red=Yg(n.red,r.red,o),i.green=Yg(n.green,r.green,o),i.blue=Yg(n.blue,r.blue,o),i.alpha=dt(n.alpha,r.alpha,o),Xo.transform(i))},qg=new Set(["none","hidden"]);function j4(e,t){return qg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function U4(e,t){return n=>dt(e,t,n)}function Gg(e){return typeof e=="number"?U4:typeof e=="string"?Ng(e)?Ud:Zt.test(e)?ET:V4:Array.isArray(e)?TT:typeof e=="object"?Zt.test(e)?ET:z4:Ud}function TT(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Gg(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function z4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Gg(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function H4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],s=e.indexes[a][i[a]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[o]=u,i[a]++}return r}const V4=(e,t)=>{const n=Ji.createTransformer(t),r=Xu(e),i=Xu(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?qg.has(e)&&!i.values.length||qg.has(t)&&!r.values.length?j4(e,t):ci(TT(H4(r,i),i.values),n):Ud(e,t)};function _T(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?dt(e,t,n):Gg(e)(e,t)}function $4(e,t,n){const r=[],i=n||_T,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Qt:t;s=ci(u,s)}r.push(s)}return r}function W4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Rg(o===t.length),o===1)return()=>t[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=$4(t,r,i),s=a.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=ts(e[c],e[c+1],l);return a[c](d)};return n?l=>u(Qi(e[0],e[o-1],l)):u}function Y4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ts(0,t,r);e.push(dt(n,1,i))}}function q4(e){const t=[0];return Y4(t,e.length-1),t}function G4(e,t){return e.map(n=>n*t)}function K4(e,t){return e.map(()=>t||vT).splice(0,e.length-1)}function zd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=D4(r)?r.map(wT):wT(r),o={done:!1,value:t[0]},a=G4(n&&n.length===t.length?n:q4(t),e),s=W4(a,t,{ease:Array.isArray(i)?i:K4(t,i)});return{calculatedDuration:e,next:u=>(o.value=s(u),o.done=u>=e,o)}}const CT=2e4;function X4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<CT;)t+=n,r=e.next(t);return t>=CT?1/0:t}const Q4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>Xi(t),now:()=>Vt.isProcessing?Vt.timestamp:Mr.now()}},Z4={decay:yT,inertia:yT,tween:zd,keyframes:zd,spring:gT},J4=e=>e/100;class Kg extends fT{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:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||Og,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new a(o,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=zg(n)?n:Z4[n]||zd;let u,l;s!==zd&&typeof t[0]!="number"&&(u=ci(J4,_T(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});o==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=X4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,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:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:y,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/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),x=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let w=this.currentTime,T=o;if(p){const I=Math.min(this.currentTime,c)/d;let U=Math.floor(I),P=I%1;!P&&I>=1&&(P=1),P===1&&U--,U=Math.min(U,p+1),!!(U%2)&&(m==="reverse"?(P=1-P,y&&(P-=y/d)):m==="mirror"&&(T=a)),w=Qi(0,1,P)*d}const C=x?{done:!1,value:u[0]}:T.next(w);s&&(C.value=s(C.value));let{done:_}=C;!x&&l!==null&&(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return A&&i!==void 0&&(C.value=Md(u,this.options,i)),b&&b(C.value),A&&this.finish(),C}get duration(){const{resolved:t}=this;return t?li(t.calculatedDuration):0}get time(){return li(this.currentTime)}set time(t){t=ui(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=li(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Q4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),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(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t: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)}}const ST=new Set(["opacity","clipPath","filter","transform"]),eM=10,tM=(e,t)=>{let n="";const r=Math.max(Math.round(t/eM),2);for(let i=0;i<r;i++)n+=e(ts(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Xg(e){let t;return()=>(t===void 0&&(t=e()),t)}const nM={linearEasing:void 0};function rM(e,t){const n=Xg(e);return()=>{var r;return(r=nM[t])!==null&&r!==void 0?r:n()}}const Hd=rM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function AT(e){return!!(typeof e=="function"&&Hd()||!e||typeof e=="string"&&(e in Qg||Hd())||$g(e)||Array.isArray(e)&&e.every(AT))}const Qu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qu([0,.65,.55,1]),circOut:Qu([.55,0,1,.45]),backIn:Qu([.31,.01,.66,-.59]),backOut:Qu([.33,1.53,.69,.99])};function kT(e,t){if(e)return typeof e=="function"&&Hd()?tM(e,t):$g(e)?Qu(e):Array.isArray(e)?e.map(n=>kT(n,t)||Qg.easeOut):Qg[e]}function iM(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=kT(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function RT(e,t){e.timeline=t,e.onfinish=null}const oM=Xg(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vd=10,aM=2e4;function sM(e){return zg(e.type)||e.type==="spring"||!AT(e.ease)}function uM(e,t){const n=new Kg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<aM;)r=n.sample(o),i.push(r.value),o+=Vd;return{times:void 0,keyframes:i,duration:o-Vd,ease:"linear"}}const NT={anticipate:jE,backInOut:BE,circInOut:zE};function lM(e){return e in NT}class PT extends fT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new cT(o,(a,s)=>this.onKeyframesResolved(a,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&Hd()&&lM(a)&&(a=NT[a]),sM(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...b}=this.options,g=uM(t,b);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,o=g.times,a=g.ease,s="keyframes"}const d=iM(u.owner.current,l,t,{...this.options,duration:i,times:o,ease:a});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(RT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Md(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:s,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return li(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return li(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ui(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}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 Qt;const{animation:r}=n;RT(r,t)}return Qt}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:o,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Kg({...p,keyframes:r,duration:i,type:o,ease:a,times:s,isGenerator:!0}),y=ui(this.time);l.setWithVelocity(m.sample(y-Vd).value,m.sample(y).value,Vd)}const{onStop:u}=this.options;u&&u(),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:o,damping:a,type:s}=t;return oM()&&r&&ST.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}const cM=Xg(()=>window.ScrollTimeline!==void 0);class dM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}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=>cM()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function fM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Zg=(e,t,n,r={},i,o)=>a=>{const s=Cg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-ui(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};fM(s)||(c={...c,...IL(e,c)}),c.duration&&(c.duration=ui(c.duration)),c.repeatDelay&&(c.repeatDelay=ui(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const f=Md(c.keyframes,s);if(f!==void 0)return Ke.update(()=>{c.onUpdate(f),c.onComplete()}),new dM([])}return!o&&PT.supports(c)?new PT(c):new Kg(c)},pM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),hM=e=>bg(e)?e[e.length-1]||0:e;function Jg(e,t){e.indexOf(t)===-1&&e.push(t)}function e0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class t0{constructor(){this.subscriptions=[]}add(t){return Jg(this.subscriptions,t),()=>e0(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 o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const IT=30,mM=e=>!isNaN(parseFloat(e));class gM{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Mr.now();this.updatedAt!==o&&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=Mr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mM(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 t0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ke.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=Mr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>IT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,IT);return pT(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 Zu(e,t){return new gM(e,t)}function yM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zu(n))}function vM(e,t){const n=Ld(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=hM(o[a]);yM(e,a,s)}}const $d=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OT="data-"+$d("framerAppearId");function DT(e){return e.props[OT]}const Jt=e=>!!(e&&e.getVelocity);function xM(e){return!!(Jt(e)&&e.add)}function n0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(xM(n))return n.add(t)}function wM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function LT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(a=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=u[d];if(p===void 0||c&&wM(c,d))continue;const m={delay:n,...Cg(a||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=DT(e);if(g){const x=window.MotionHandoffAnimation(g,d,Ke);x!==null&&(m.startTime=x,y=!0)}}n0(e,d),f.start(Zg(d,f,p,e.shouldReduceMotion&&Ki.has(d)?{type:!1}:m,e,y));const b=f.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{Ke.update(()=>{s&&vM(e,s)})}),l}function r0(e,t,n={}){var r;const i=Ld(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(LT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=o;return bM(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[l,c]=u==="beforeChildren"?[a,s]:[s,a];return l().then(()=>c())}else return Promise.all([a(),s(n.delay)])}function bM(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(EM).forEach((l,c)=>{l.notify("AnimationStart",t),a.push(r0(l,t,{...o,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(a)}function EM(e,t){return e.sortNodePosition(t)}function TM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>r0(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=r0(e,t,n);else{const i=typeof t=="function"?Ld(e,t,n.custom):t;r=Promise.all(LT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const _M=_g.length;function MT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?MT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<_M;n++){const r=_g[n],i=e.props[r];($u(i)||i===!1)&&(t[r]=i)}return t}const CM=[...Tg].reverse(),SM=Tg.length;function AM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>TM(e,n,r)))}function kM(e){let t=AM(e),n=FT(),r=!0;const i=u=>(l,c)=>{var d;const f=Ld(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function o(u){t=u(e)}function a(u){const{props:l}=e,c=MT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let b=0;b<SM;b++){const g=CM[b],x=n[g],w=l[g]!==void 0?l[g]:c[g],T=$u(w),C=g===u?x.isActive:null;C===!1&&(m=b);let _=w===c[g]&&w!==l[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),x.protectedKeys={...p},!x.isActive&&C===null||!w&&!x.prevProp||Vu(w)||typeof w=="boolean")continue;const A=RM(x.prevProp,w);let I=A||g===u&&x.isActive&&!_&&T||b>m&&T,U=!1;const P=Array.isArray(w)?w:[w];let $=P.reduce(i(g),{});C===!1&&($={});const{prevResolvedValues:H={}}=x,X={...H,...$},Y=ee=>{I=!0,f.has(ee)&&(U=!0,f.delete(ee)),x.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=H[ee];if(p.hasOwnProperty(ee))continue;let k=!1;bg(F)&&bg(B)?k=!PE(F,B):k=F!==B,k?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):x.protectedKeys[ee]=!0}x.prevProp=w,x.prevResolvedValues=$,x.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(I=!1),I&&(!(_&&A)||U)&&d.push(...P.map(ee=>({animation:ee,options:{type:g}})))}if(f.size){const b={};f.forEach(g=>{const x=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),b[g]=x??null}),d.push({animation:b})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=a(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=FT(),r=!0}}}function RM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!PE(t,e):!1}function Qo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function FT(){return{animate:Qo(!0),whileInView:Qo(),whileHover:Qo(),whileTap:Qo(),whileDrag:Qo(),whileFocus:Qo(),exit:Qo()}}class eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class NM extends eo{constructor(t){super(t),t.animationState||(t.animationState=kM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vu(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===void 0||t.call(this)}}let PM=0;class IM extends eo{constructor(){super(...arguments),this.id=PM++}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}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const OM={animation:{Feature:NM},exit:{Feature:IM}},BT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Wd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const DM=e=>t=>BT(t)&&e(t,Wd(t));function di(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function fi(e,t,n,r){return di(e,t,DM(n),r)}const jT=(e,t)=>Math.abs(e-t);function LM(e,t){const n=jT(e.x,t.x),r=jT(e.y,t.y);return Math.sqrt(n**2+r**2)}class UT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!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 d=o0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=LM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=Vt;this.history.push({...m,timestamp:y});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=i0(f,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=o0(d.type==="pointercancel"?this.lastMoveEventInfo:i0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!BT(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=Wd(t),s=i0(a,this.transformPagePoint),{point:u}=s,{timestamp:l}=Vt;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,o0(s,this.history)),this.removeListeners=ci(fi(this.contextWindow,"pointermove",this.handlePointerMove),fi(this.contextWindow,"pointerup",this.handlePointerUp),fi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xi(this.updatePoint)}}function i0(e,t){return t?{point:t(e.point)}:e}function zT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function o0({point:e},t){return{point:e,delta:zT(e,HT(t)),offset:zT(e,MM(t)),velocity:FM(t,.1)}}function MM(e){return e[0]}function HT(e){return e[e.length-1]}function FM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=HT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ui(t)));)n--;if(!r)return{x:0,y:0};const o=li(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function VT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const $T=VT("dragHorizontal"),WT=VT("dragVertical");function YT(e){let t=!1;if(e==="y")t=WT();else if(e==="x")t=$T();else{const n=$T(),r=WT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function qT(){const e=YT(!0);return e?(e(),!1):!0}function ns(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const GT=1e-4,BM=1-GT,jM=1+GT,KT=.01,UM=0-KT,zM=0+KT;function Mn(e){return e.max-e.min}function HM(e,t,n){return Math.abs(e-t)<=n}function XT(e,t,n,r=.5){e.origin=r,e.originPoint=dt(t.min,t.max,e.origin),e.scale=Mn(n)/Mn(t),e.translate=dt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=BM&&e.scale<=jM||isNaN(e.scale))&&(e.scale=1),(e.translate>=UM&&e.translate<=zM||isNaN(e.translate))&&(e.translate=0)}function Ju(e,t,n,r){XT(e.x,t.x,n.x,r?r.originX:void 0),XT(e.y,t.y,n.y,r?r.originY:void 0)}function QT(e,t,n){e.min=n.min+t.min,e.max=e.min+Mn(t)}function VM(e,t,n){QT(e.x,t.x,n.x),QT(e.y,t.y,n.y)}function ZT(e,t,n){e.min=t.min-n.min,e.max=e.min+Mn(t)}function el(e,t,n){ZT(e.x,t.x,n.x),ZT(e.y,t.y,n.y)}function $M(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?dt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?dt(n,e,r.max):Math.min(e,n)),e}function JT(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 WM(e,{top:t,left:n,bottom:r,right:i}){return{x:JT(e.x,n,i),y:JT(e.y,t,r)}}function e2(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 YM(e,t){return{x:e2(e.x,t.x),y:e2(e.y,t.y)}}function qM(e,t){let n=.5;const r=Mn(e),i=Mn(t);return i>r?n=ts(t.min,t.max-r,e.min):r>i&&(n=ts(e.min,e.max-i,t.min)),Qi(0,1,n)}function GM(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 a0=.35;function KM(e=a0){return e===!1?e=0:e===!0&&(e=a0),{x:t2(e,"left","right"),y:t2(e,"top","bottom")}}function t2(e,t,n){return{min:n2(e,t),max:n2(e,n)}}function n2(e,t){return typeof e=="number"?e:e[t]||0}const r2=()=>({translate:0,scale:1,origin:0,originPoint:0}),rs=()=>({x:r2(),y:r2()}),i2=()=>({min:0,max:0}),wt=()=>({x:i2(),y:i2()});function er(e){return[e("x"),e("y")]}function o2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function XM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QM(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}}function s0(e){return e===void 0||e===1}function u0({scale:e,scaleX:t,scaleY:n}){return!s0(e)||!s0(t)||!s0(n)}function Zo(e){return u0(e)||a2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function a2(e){return s2(e.x)||s2(e.y)}function s2(e){return e&&e!=="0%"}function Yd(e,t,n){const r=e-n,i=t*r;return n+i}function u2(e,t,n,r,i){return i!==void 0&&(e=Yd(e,i,r)),Yd(e,n,r)+t}function l0(e,t=0,n=1,r,i){e.min=u2(e.min,t,n,r,i),e.max=u2(e.max,t,n,r,i)}function l2(e,{x:t,y:n}){l0(e.x,t.translate,t.scale,t.originPoint),l0(e.y,n.translate,n.scale,n.originPoint)}const c2=.999999999999,d2=1.0000000000001;function ZM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&os(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,l2(e,a)),r&&Zo(o.latestValues)&&os(e,o.latestValues))}t.x<d2&&t.x>c2&&(t.x=1),t.y<d2&&t.y>c2&&(t.y=1)}function is(e,t){e.min=e.min+t,e.max=e.max+t}function f2(e,t,n,r,i=.5){const o=dt(e.min,e.max,i);l0(e,t,n,o,r)}function os(e,t){f2(e.x,t.x,t.scaleX,t.scale,t.originX),f2(e.y,t.y,t.scaleY,t.scale,t.originY)}function p2(e,t){return o2(QM(e.getBoundingClientRect(),t))}function JM(e,t,n){const r=p2(e,n),{scroll:i}=t;return i&&(is(r.x,i.offset.x),is(r.y,i.offset.y)),r}const h2=({current:e})=>e?e.ownerDocument.defaultView:null,e5=new WeakMap;class t5{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Wd(c,"page").point)},o=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=YT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),er(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Lr.test(g)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[b];w&&(g=Mn(w)*(parseFloat(g)/100))}}this.originPoint[b]=g}),m&&Ke.postRender(()=>m(c,d)),n0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=n5(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>er(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new UT(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:h2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Ke.postRender(()=>o(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!qd(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=$M(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&ns(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=WM(i.layoutBox,n):this.constraints=!1,this.elastic=KM(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&er(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=GM(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ns(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=JM(r,i.root,this.visualElement.getTransformPagePoint());let a=YM(i.layout.layoutBox,o);if(n){const s=n(XM(a));this.hasMutatedConstraints=!!s,s&&(a=o2(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=er(c=>{if(!qd(c,n,this.currentDirection))return;let d=u&&u[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return n0(this.visualElement,t),r.start(Zg(t,r,0,n,this.visualElement,!1))}stopAnimation(){er(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){er(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?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){er(n=>{const{drag:r}=this.getProps();if(!qd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-dt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ns(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};er(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const u=s.get();i[a]=qM({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),er(a=>{if(!qd(a,t,null))return;const s=this.getAxisMotionValue(a),{min:u,max:l}=this.constraints[a];s.set(dt(u,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;e5.set(this.visualElement,this);const t=this.visualElement.current,n=fi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();ns(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ke.read(r);const a=di(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(er(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=a0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function qd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function n5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class r5 extends eo{constructor(t){super(t),this.removeGroupControls=Qt,this.removeListeners=Qt,this.controls=new t5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const m2=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class i5 extends eo{constructor(){super(...arguments),this.removePointerDownListener=Qt}onPointerDown(t){this.session=new UT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:h2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:m2(t),onStart:m2(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Ke.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=fi(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 Gd=v.createContext(null);function o5(){const e=v.useContext(Gd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const o=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}const c0=v.createContext({}),g2=v.createContext({}),Kd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function y2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const tl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=y2(e,t.target.x),r=y2(e,t.target.y);return`${n}% ${r}%`}},a5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ji.parse(e);if(i.length>5)return r;const o=Ji.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=u;const l=dt(s,u,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}},Xd={};function s5(e){Object.assign(Xd,e)}const{schedule:d0,cancel:Aie}=OE(queueMicrotask,!1);class u5 extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;s5(l5),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Kd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ke.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),d0.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 v2(e){const[t,n]=o5(),r=v.useContext(c0);return E.jsx(u5,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(g2),isPresent:t,safeToRemove:n})}const l5={borderRadius:{...tl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tl,borderTopRightRadius:tl,borderBottomLeftRadius:tl,borderBottomRightRadius:tl,boxShadow:a5},x2=["TopLeft","TopRight","BottomLeft","BottomRight"],c5=x2.length,w2=e=>typeof e=="string"?parseFloat(e):e,b2=e=>typeof e=="number"||ge.test(e);function d5(e,t,n,r,i,o){i?(e.opacity=dt(0,n.opacity!==void 0?n.opacity:1,f5(r)),e.opacityExit=dt(t.opacity!==void 0?t.opacity:1,0,p5(r))):o&&(e.opacity=dt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<c5;a++){const s=`border${x2[a]}Radius`;let u=E2(t,s),l=E2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||b2(u)===b2(l)?(e[s]=Math.max(dt(w2(u),w2(l),r),0),(Lr.test(l)||Lr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=dt(t.rotate||0,n.rotate||0,r))}function E2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const f5=T2(0,.5,UE),p5=T2(.5,.95,Qt);function T2(e,t,n){return r=>r<e?0:r>t?1:n(ts(e,t,r))}function _2(e,t){e.min=t.min,e.max=t.max}function tr(e,t){_2(e.x,t.x),_2(e.y,t.y)}function C2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function S2(e,t,n,r,i){return e-=t,e=Yd(e,1/n,r),i!==void 0&&(e=Yd(e,1/i,r)),e}function h5(e,t=0,n=1,r=.5,i,o=e,a=e){if(Lr.test(t)&&(t=parseFloat(t),t=dt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=dt(o.min,o.max,r);e===o&&(s-=t),e.min=S2(e.min,t,n,s,i),e.max=S2(e.max,t,n,s,i)}function A2(e,t,[n,r,i],o,a){h5(e,t[n],t[r],t[i],t.scale,o,a)}const m5=["x","scaleX","originX"],g5=["y","scaleY","originY"];function k2(e,t,n,r){A2(e.x,t,m5,n?n.x:void 0,r?r.x:void 0),A2(e.y,t,g5,n?n.y:void 0,r?r.y:void 0)}function R2(e){return e.translate===0&&e.scale===1}function N2(e){return R2(e.x)&&R2(e.y)}function P2(e,t){return e.min===t.min&&e.max===t.max}function y5(e,t){return P2(e.x,t.x)&&P2(e.y,t.y)}function I2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function O2(e,t){return I2(e.x,t.x)&&I2(e.y,t.y)}function D2(e){return Mn(e.x)/Mn(e.y)}function L2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class v5{constructor(){this.members=[]}add(t){Jg(this.members,t),t.scheduleRender()}remove(t){if(e0(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 o=this.members[i];if(o.isPresent!==!1){r=o;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 x5(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const w5=(e,t)=>e.depth-t.depth;class b5{constructor(){this.children=[],this.isDirty=!1}add(t){Jg(this.children,t),this.isDirty=!0}remove(t){e0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(w5),this.isDirty=!1,this.children.forEach(t)}}function Qd(e){const t=Jt(e)?e.get():e;return pM(t)?t.toValue():t}function E5(e,t){const n=Mr.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Xi(r),e(o-t))};return Ke.read(r,!0),()=>Xi(r)}function T5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function _5(e,t,n){const r=Jt(e)?e:Zu(e);return r.start(Zg("",r,t,n)),r.animation}const Jo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},nl=typeof window<"u"&&window.MotionDebug!==void 0,f0=["","X","Y","Z"],C5={visibility:"hidden"},M2=1e3;let S5=0;function p0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function F2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=DT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&F2(r)}function B2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=S5++,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,nl&&(Jo.totalNodes=Jo.resolvedTargetDeltas=Jo.recalculatedProjection=0),this.nodes.forEach(R5),this.nodes.forEach(D5),this.nodes.forEach(L5),this.nodes.forEach(N5),nl&&window.MotionDebug.record(Jo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new b5)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new t0),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const u=this.eventHandlers.get(a);u&&u.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=T5(a),this.instance=a;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=E5(f,250),Kd.hasAnimatedSinceResize&&(Kd.hasAnimatedSinceResize=!1,this.nodes.forEach(U2))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||U5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=c.getProps(),x=!this.targetLayout||!O2(this.targetLayout,m)||p,w=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const T={...Cg(y,"layout"),onPlay:b,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||U2(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xi(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(M5),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&F2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(j2);return}this.isUpdating||this.nodes.forEach(I5),this.isUpdating=!1,this.nodes.forEach(O5),this.nodes.forEach(A5),this.nodes.forEach(k5),this.clearAllSnapshots();const s=Mr.now();Vt.delta=Qi(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Sg.update.process(Vt),Sg.preRender.process(Vt),Sg.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,d0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(P5),this.sharedNodes.forEach(F5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!N2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;a&&(s||Zo(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return a&&(u=this.removeTransform(u)),z5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return wt();const u=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(H5))){const{scroll:c}=this.root;c&&(is(u.x,c.offset.x),is(u.y,c.offset.y))}return u}removeElementScroll(a){var s;const u=wt();if(tr(u,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&tr(u,a),is(u.x,d.offset.x),is(u.y,d.offset.y))}return u}applyTransform(a,s=!1){const u=wt();tr(u,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&os(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Zo(c.latestValues)&&os(u,c.latestValues)}return Zo(this.latestValues)&&os(u,this.latestValues),u}removeTransform(a){const s=wt();tr(s,a);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Zo(l.latestValues))continue;u0(l.latestValues)&&l.updateSnapshot();const c=wt(),d=l.measurePageBox();tr(c,d),k2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Zo(this.latestValues)&&k2(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),el(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=wt(),this.targetWithTransforms=wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),VM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tr(this.target,this.layout.layoutBox),l2(this.target,this.targetDelta)):tr(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=wt(),this.relativeTargetOrigin=wt(),el(this.relativeTargetOrigin,this.target,p.target),tr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}nl&&Jo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||u0(this.parent.latestValues)||a2(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 a;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Vt.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;tr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;ZM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=wt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(C2(this.prevProjectionDelta.x,this.projectionDelta.x),C2(this.prevProjectionDelta.y,this.projectionDelta.y)),Ju(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!L2(this.projectionDelta.x,this.prevProjectionDelta.x)||!L2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),nl&&Jo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rs(),this.projectionDelta=rs(),this.projectionDeltaWithTransform=rs()}setAnimationOrigin(a,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=rs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=wt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,b=this.getStack(),g=!b||b.members.length<=1,x=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(j5));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const C=T/1e3;z2(d.x,a.x,C),z2(d.y,a.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(el(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),B5(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&y5(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=wt()),tr(w,this.relativeTarget)),y&&(this.animationValues=c,d5(c,l,this.latestValues,C,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{Kd.hasAnimatedSinceResize=!0,this.currentAnimation=_5(0,M2,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(M2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=a;if(!(!s||!u||!l)){if(this!==a&&this.layout&&l&&Y2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||wt();const d=Mn(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+d;const f=Mn(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+f}tr(s,u),os(s,c),Ju(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new v5),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&p0("z",a,l,this.animationValues);for(let c=0;c<f0.length;c++)p0(`rotate${f0[c]}`,a,l,this.animationValues),p0(`skew${f0[c]}`,a,l,this.animationValues);a.render();for(const c in l)a.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);a.scheduleRender()}getProjectionStyles(a){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return C5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Qd(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Qd(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Zo(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=x5(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in Xd){if(f[y]===void 0)continue;const{correct:b,applyTo:g}=Xd[y],x=l.transform==="none"?f[y]:b(f[y],d);if(g){const w=g.length;for(let T=0;T<w;T++)l[g[T]]=x}else l[y]=x}return this.options.layoutId&&(l.pointerEvents=d===this?Qd(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(j2),this.root.sharedNodes.clear()}}}function A5(e){e.updateLayout()}function k5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?er(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Mn(f);f.min=r[d].min,f.max=f.min+p}):Y2(o,n.layoutBox,r)&&er(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],p=Mn(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=rs();Ju(s,r,n.layoutBox);const u=rs();a?Ju(u,e.applyTransform(i,!0),n.measuredBox):Ju(u,r,n.layoutBox);const l=!N2(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=wt();el(m,n.layoutBox,f.layoutBox);const y=wt();el(y,r,p.layoutBox),O2(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function R5(e){nl&&Jo.totalNodes++,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 N5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function P5(e){e.clearSnapshot()}function j2(e){e.clearMeasurements()}function I5(e){e.isLayoutDirty=!1}function O5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function U2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function D5(e){e.resolveTargetDelta()}function L5(e){e.calcProjection()}function M5(e){e.resetSkewAndRotation()}function F5(e){e.removeLeadSnapshot()}function z2(e,t,n){e.translate=dt(t.translate,0,n),e.scale=dt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function H2(e,t,n,r){e.min=dt(t.min,n.min,r),e.max=dt(t.max,n.max,r)}function B5(e,t,n,r){H2(e.x,t.x,n.x,r),H2(e.y,t.y,n.y,r)}function j5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const U5={duration:.45,ease:[.4,0,.1,1]},V2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$2=V2("applewebkit/")&&!V2("chrome/")?Math.round:Qt;function W2(e){e.min=$2(e.min),e.max=$2(e.max)}function z5(e){W2(e.x),W2(e.y)}function Y2(e,t,n){return e==="position"||e==="preserve-aspect"&&!HM(D2(t),D2(n),.2)}function H5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const V5=B2({attachResizeListener:(e,t)=>di(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),h0={current:void 0},q2=B2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!h0.current){const e=new V5({});e.mount(window),e.setOptions({layoutScroll:!0}),h0.current=e}return h0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$5={pan:{Feature:i5},drag:{Feature:r5,ProjectionNode:q2,MeasureLayout:v2}};function G2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||qT())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Ke.postRender(()=>u(o,a))};return fi(e.current,n,i,{passive:!e.getProps()[r]})}class W5 extends eo{mount(){this.unmount=ci(G2(this.node,!0),G2(this.node,!1))}unmount(){}}class Y5 extends eo{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=ci(di(this.node.current,"focus",()=>this.onFocus()),di(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const K2=(e,t)=>t?e===t?!0:K2(e,t.parentElement):!1;function m0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Wd(n))}class q5 extends eo{constructor(){super(...arguments),this.removeStartListeners=Qt,this.removeEndListeners=Qt,this.removeAccessibleListeners=Qt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=fi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!K2(this.node.current,s.target)?c:l;f&&Ke.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),a=fi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ci(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||m0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Ke.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=di(this.node.current,"keyup",a),m0("down",(s,u)=>{this.startPress(s,u)})},n=di(this.node.current,"keydown",t),r=()=>{this.isPressing&&m0("cancel",(o,a)=>this.cancelPress(o,a))},i=di(this.node.current,"blur",r);this.removeAccessibleListeners=ci(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ke.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qT()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ke.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=fi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=di(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ci(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const g0=new WeakMap,y0=new WeakMap,G5=e=>{const t=g0.get(e.target);t&&t(e)},K5=e=>{e.forEach(G5)};function X5({root:e,...t}){const n=e||document;y0.has(n)||y0.set(n,{});const r=y0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(K5,{root:e,...t})),r[i]}function Q5(e,t,n){const r=X5(t);return g0.set(e,n),r.observe(e),()=>{g0.delete(e),r.unobserve(e)}}const Z5={some:0,all:1};class J5 extends eo{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:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Z5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return Q5(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(e8(t,n))&&this.startObserver()}unmount(){}}function e8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const t8={inView:{Feature:J5},tap:{Feature:q5},focus:{Feature:Y5},hover:{Feature:W5}},n8={layout:{ProjectionNode:q2,MeasureLayout:v2}},v0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Zd=v.createContext({}),x0=typeof window<"u",X2=x0?v.useLayoutEffect:v.useEffect,Q2=v.createContext({strict:!1});function r8(e,t,n,r,i){var o,a;const{visualElement:s}=v.useContext(Zd),u=v.useContext(Q2),l=v.useContext(Gd),c=v.useContext(v0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(g2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&i8(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[OT],y=v.useRef(!!m&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,m))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,m)));return X2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),d0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function i8(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Z2(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&ns(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function Z2(e){if(e)return e.options.allowProjection!==!1?e.projection:Z2(e.parent)}function o8(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ns(n)&&(n.current=r))},[t])}function Jd(e){return Vu(e.animate)||_g.some(t=>$u(e[t]))}function J2(e){return!!(Jd(e)||e.variants)}function a8(e,t){if(Jd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||$u(n)?n:void 0,animate:$u(r)?r:void 0}}return e.inherit!==!1?t:{}}function s8(e){const{initial:t,animate:n}=a8(e,v.useContext(Zd));return v.useMemo(()=>({initial:t,animate:n}),[e_(t),e_(n)])}function e_(e){return Array.isArray(e)?e.join(" "):e}const t_={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"]},as={};for(const e in t_)as[e]={isEnabled:t=>t_[e].some(n=>!!t[n])};function u8(e){for(const t in e)as[t]={...as[t],...e[t]}}const l8=Symbol.for("motionComponentSymbol");function c8({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&u8(e);function o(s,u){let l;const c={...v.useContext(v0),...s,layoutId:d8(s)},{isStatic:d}=c,f=s8(s),p=r(s,d);if(!d&&x0){f8();const m=p8(c);l=m.MeasureLayout,f.visualElement=r8(i,p,c,t,m.ProjectionNode)}return E.jsxs(Zd.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,o8(p,f.visualElement,u),p,d,f.visualElement)]})}const a=v.forwardRef(o);return a[l8]=i,a}function d8({layoutId:e}){const t=v.useContext(c0).id;return t&&e!==void 0?t+"-"+e:e}function f8(e,t){v.useContext(Q2).strict}function p8(e){const{drag:t,layout:n}=as;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 h8=["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 w0(e){return typeof e!="string"||e.includes("-")?!1:!!(h8.indexOf(e)>-1||/[A-Z]/u.test(e))}function n_(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const r_=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 i_(e,t,n,r){n_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(r_.has(i)?i:$d(i),t.attrs[i])}function o_(e,{layout:t,layoutId:n}){return Ki.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xd[e]||e==="opacity")}function b0(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(Jt(i[a])||t.style&&Jt(t.style[a])||o_(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),o}function a_(e,t,n){const r=b0(e,t,n);for(const i in e)if(Jt(e[i])||Jt(t[i])){const o=Wu.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function E0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function m8(e){if(Ki.has(e))return"transform";if(ST.has(e))return $d(e)}function g8({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,a,s){const u={latestValues:y8(i,o,a,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const s_=e=>(t,n)=>{const r=v.useContext(Zd),i=v.useContext(Gd),o=()=>g8(e,t,r,i,n);return n?o():E0(o)};function u_(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const o=Eg(e,r[i]);if(o){const{transitionEnd:a,transition:s,...u}=o;n(u,a)}}}function y8(e,t,n,r,i){var o;const a={},s=new Set,u=r&&((o=e.style)===null||o===void 0?void 0:o.willChange)===void 0,l=i(e,{});for(const b in l)a[b]=Qd(l[b]);let{initial:c,animate:d}=e;const f=Jd(e),p=J2(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?d:c;return y&&typeof y!="boolean"&&!Vu(y)&&u_(e,y,(b,g)=>{for(const x in b){let w=b[x];if(Array.isArray(w)){const T=m?w.length-1:0;w=w[T]}w!==null&&(a[x]=w)}for(const x in g)a[x]=g[x]}),u&&(d&&c!==!1&&!Vu(d)&&u_(e,d,b=>{for(const g in b){const x=m8(g);x&&s.add(x)}}),s.size&&(a.willChange=Array.from(s).join(","))),a}const T0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),l_=()=>({...T0(),attrs:{}}),c_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,v8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},x8=Wu.length;function w8(e,t,n){let r="",i=!0;for(let o=0;o<x8;o++){const a=Wu[o],s=e[a];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(a.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=c_(s,jg[a]);if(!u){i=!1;const c=v8[a]||a;r+=`${c}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function _0(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const u in t){const l=t[u];if(Ki.has(u)){a=!0;continue}else if(WE(u)){i[u]=l;continue}else{const c=c_(l,jg[u]);u.startsWith("origin")?(s=!0,o[u]=c):r[u]=c}}if(t.transform||(a||n?r.transform=w8(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=o;r.transformOrigin=`${u} ${l} ${c}`}}function d_(e,t,n){return typeof e=="string"?e:ge.transform(t+n*e)}function b8(e,t,n){const r=d_(t,e.x,e.width),i=d_(n,e.y,e.height);return`${r} ${i}`}const E8={offset:"stroke-dashoffset",array:"stroke-dasharray"},T8={offset:"strokeDashoffset",array:"strokeDasharray"};function _8(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?E8:T8;e[o.offset]=ge.transform(-r);const a=ge.transform(t),s=ge.transform(n);e[o.array]=`${a} ${s}`}function C0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(_0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=b8(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&_8(f,a,s,u,!1)}const S0=e=>typeof e=="string"&&e.toLowerCase()==="svg",C8={useVisualState:s_({scrapeMotionValuesFromProps:a_,createRenderState:l_,onMount:(e,t,{renderState:n,latestValues:r})=>{Ke.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ke.render(()=>{C0(n,r,S0(t.tagName),e.transformTemplate),i_(t,n)})}})},S8={useVisualState:s_({applyWillChange:!0,scrapeMotionValuesFromProps:b0,createRenderState:T0})};function f_(e,t,n){for(const r in t)!Jt(t[r])&&!o_(r,n)&&(e[r]=t[r])}function A8({transformTemplate:e},t){return v.useMemo(()=>{const n=T0();return _0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function k8(e,t){const n=e.style||{},r={};return f_(r,n,e),Object.assign(r,A8(e,t)),r}function R8(e,t){const n={},r=k8(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 N8=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 ef(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||N8.has(e)}let p_=e=>!ef(e);function P8(e){e&&(p_=t=>t.startsWith("on")?!ef(t):e(t))}try{P8(require("@emotion/is-prop-valid").default)}catch{}function I8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(p_(i)||n===!0&&ef(i)||!t&&!ef(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function O8(e,t,n,r){const i=v.useMemo(()=>{const o=l_();return C0(o,t,S0(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};f_(o,e.style,e),i.style={...o,...i.style}}return i}function D8(e=!1){return(n,r,i,{latestValues:o},a)=>{const u=(w0(n)?O8:R8)(r,o,a,n),l=I8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>Jt(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function L8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...w0(r)?C8:S8,preloadedFeatures:e,useRender:D8(i),createVisualElement:t,Component:r};return c8(a)}}const A0={current:null},h_={current:!1};function M8(){if(h_.current=!0,!!x0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>A0.current=e.matches;e.addListener(t),t()}else A0.current=!1}function F8(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Jt(i))e.addValue(r,i);else if(Jt(o))e.addValue(r,Zu(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Zu(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const m_=new WeakMap,B8=[...ZE,Zt,Ji],j8=e=>B8.find(QE(e)),g_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class U8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Og,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 f=Mr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Ke.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=Jd(n),this.isVariantNode=J2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&Jt(p)&&p.set(u[f],!1)}}mount(t){this.current=t,m_.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)),h_.current||M8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:A0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){m_.delete(this.current),this.projection&&this.projection.unmount(),Xi(this.notifyUpdate),Xi(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=Ki.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),a&&a(),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 as){const n=as[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 o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wt()}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<g_.length;r++){const i=g_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=F8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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=Zu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(VE(i)||HE(i))?i=parseFloat(i):!j8(i)&&Ji.test(n)&&(i=lT(t,n)),this.setBaseTarget(t,Jt(i)?i.get():i)),Jt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Eg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Jt(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new t0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class y_ extends U8{constructor(){super(...arguments),this.KeyframeResolver=cT}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]}}function z8(e){return window.getComputedStyle(e)}class H8 extends y_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=n_}readValueFromInstance(t,n){if(Ki.has(n)){const r=Ug(n);return r&&r.default||0}else{const r=z8(t),i=(WE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return p2(t,n)}build(t,n,r){_0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return b0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class V8 extends y_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=wt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ki.has(n)){const r=Ug(n);return r&&r.default||0}return n=r_.has(n)?n:$d(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return a_(t,n,r)}build(t,n,r){C0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){i_(t,n,r,i)}mount(t){this.isSVGTag=S0(t.tagName),super.mount(t)}}const $8=(e,t)=>w0(e)?new V8(t):new H8(t,{allowProjection:e!==v.Fragment}),W8=L8({...OM,...t8,...$5,...n8},$8),ss=AL(W8);class Y8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function q8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=v.useContext(v0);return v.useInsertionEffect(()=>{const{width:a,height:s,top:u,left:l}=i.current;if(t||!r.current||!a||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
41
41
|
[data-motion-pop-id="${n}"] {
|
|
42
42
|
position: absolute !important;
|
|
43
43
|
width: ${a}px !important;
|
|
@@ -335,7 +335,7 @@ to {
|
|
|
335
335
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[XC]=this[XC]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=dl(a);r[s]||(Oj(i,a),r[s]=!0)}return V.isArray(t)?t.forEach(o):o(t),this}}bn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(bn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(bn);function ny(e,t){const n=this||cl,r=t||n,i=bn.from(r.headers);let o=r.data;return V.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function QC(e){return!!(e&&e.__CANCEL__)}function ps(e,t,n){_e.call(this,e??"canceled",_e.ERR_CANCELED,t,n),this.name="CanceledError"}V.inherits(ps,_e,{__CANCEL__:!0});function ZC(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new _e("Request failed with status code "+n.status,[_e.ERR_BAD_REQUEST,_e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Dj(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Lj(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a<t)return;const p=c&&l-c;return p?Math.round(f*1e3/p):void 0}}function Mj(e,t){let n=0,r=1e3/t,i,o;const a=(l,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const xf=(e,t,n=3)=>{let r=0;const i=Lj(50,250);return Mj(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},JC=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},eS=e=>(...t)=>V.asap(()=>e(...t)),Fj=en.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,en.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(en.origin),en.navigator&&/(msie|trident)/i.test(en.navigator.userAgent)):()=>!0,Bj=en.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];V.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),V.isString(r)&&a.push("path="+r),V.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jj(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Uj(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function tS(e,t){return e&&!jj(t)?Uj(e,t):t}const nS=e=>e instanceof bn?{...e}:e;function na(e,t){t=t||{};const n={};function r(l,c,d,f){return V.isPlainObject(l)&&V.isPlainObject(c)?V.merge.call({caseless:f},l,c):V.isPlainObject(c)?V.merge({},c):V.isArray(c)?c.slice():c}function i(l,c,d,f){if(V.isUndefined(c)){if(!V.isUndefined(l))return r(void 0,l,d,f)}else return r(l,c,d,f)}function o(l,c){if(!V.isUndefined(c))return r(void 0,c)}function a(l,c){if(V.isUndefined(c)){if(!V.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,d)=>i(nS(l),nS(c),d,!0)};return V.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=u[c]||i,f=d(e[c],t[c],c);V.isUndefined(f)&&d!==s||(n[c]=f)}),n}const rS=e=>{const t=na({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=bn.from(a),t.url=YC(tS(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(V.isFormData(n)){if(en.hasStandardBrowserEnv||en.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(en.hasStandardBrowserEnv&&(r&&V.isFunction(r)&&(r=r(t)),r||r!==!1&&Fj(t.url))){const l=i&&o&&Bj.read(o);l&&a.set(i,l)}return t},zj=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=rS(e);let o=i.data;const a=bn.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,d,f,p,m;function y(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function g(){if(!b)return;const w=bn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:w,config:e,request:b};ZC(function(A){n(A),y()},function(A){r(A),y()},C),b=null}"onloadend"in b?b.onloadend=g:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(g)},b.onabort=function(){b&&(r(new _e("Request aborted",_e.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new _e("Network Error",_e.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||GC;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new _e(T,C.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&V.forEach(a.toJSON(),function(T,C){b.setRequestHeader(C,T)}),V.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([f,m]=xf(l,!0),b.addEventListener("progress",f)),u&&b.upload&&([d,p]=xf(u),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=w=>{b&&(r(!w||w.type?new ps(null,e,b):w),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Dj(i.url);if(x&&en.protocols.indexOf(x)===-1){r(new _e("Unsupported protocol "+x+":",_e.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Hj=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof _e?c:new ps(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new _e(`timeout ${t} of ms exceeded`,_e.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>V.asap(s),u}},Vj=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},$j=async function*(e,t){for await(const n of Wj(e))yield*Vj(n,t)},Wj=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},iS=(e,t,n,r)=>{const i=$j(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let d=c.byteLength;if(n){let f=o+=d;n(f)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},wf=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",oS=wf&&typeof ReadableStream=="function",Yj=wf&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),aS=(e,...t)=>{try{return!!e(...t)}catch{return!1}},qj=oS&&aS(()=>{let e=!1;const t=new Request(en.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),sS=64*1024,ry=oS&&aS(()=>V.isReadableStream(new Response("").body)),bf={stream:ry&&(e=>e.body)};wf&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!bf[t]&&(bf[t]=V.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new _e(`Response type '${t}' is not supported`,_e.ERR_NOT_SUPPORT,r)})})})(new Response);const Gj=async e=>{if(e==null)return 0;if(V.isBlob(e))return e.size;if(V.isSpecCompliantForm(e))return(await new Request(en.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(V.isArrayBufferView(e)||V.isArrayBuffer(e))return e.byteLength;if(V.isURLSearchParams(e)&&(e=e+""),V.isString(e))return(await Yj(e)).byteLength},Kj=async(e,t)=>{const n=V.toFiniteNumber(e.getContentLength());return n??Gj(t)},iy={http:gj,xhr:zj,fetch:wf&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:f}=rS(e);l=l?(l+"").toLowerCase():"text";let p=Hj([i,o&&o.toAbortSignal()],a),m;const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&qj&&n!=="get"&&n!=="head"&&(b=await Kj(c,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(V.isFormData(r)&&(_=C.headers.get("content-type"))&&c.setContentType(_),C.body){const[A,I]=JC(b,xf(eS(u)));r=iS(C.body,sS,A,I)}}V.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let x=await fetch(m);const w=ry&&(l==="stream"||l==="response");if(ry&&(s||w&&y)){const C={};["status","statusText","headers"].forEach(U=>{C[U]=x[U]});const _=V.toFiniteNumber(x.headers.get("content-length")),[A,I]=s&&JC(_,xf(eS(s),!0))||[];x=new Response(iS(x.body,sS,A,()=>{I&&I(),y&&y()}),C)}l=l||"text";let T=await bf[V.findKey(bf,l)||"text"](x,e);return!w&&y&&y(),await new Promise((C,_)=>{ZC(C,_,{data:T,headers:bn.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(g){throw y&&y(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new _e("Network Error",_e.ERR_NETWORK,e,m),{cause:g.cause||g}):_e.from(g,g&&g.code,e,m)}})};V.forEach(iy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const uS=e=>`- ${e}`,Xj=e=>V.isFunction(e)||e===null||e===!1,lS={getAdapter:e=>{e=V.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let a;if(r=n,!Xj(n)&&(r=iy[(a=String(n)).toLowerCase()],r===void 0))throw new _e(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
|
|
336
336
|
`+o.map(uS).join(`
|
|
337
337
|
`):" "+uS(o[0]):"as no adapter specified";throw new _e("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:iy};function oy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ps(null,e)}function cS(e){return oy(e),e.headers=bn.from(e.headers),e.data=ny.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lS.getAdapter(e.adapter||cl.adapter)(e).then(function(r){return oy(e),r.data=ny.call(e,e.transformResponse,r),r.headers=bn.from(r.headers),r},function(r){return QC(r)||(oy(e),r&&r.response&&(r.response.data=ny.call(e,e.transformResponse,r.response),r.response.headers=bn.from(r.response.headers))),Promise.reject(r)})}const dS="1.7.9",Ef={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ef[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const fS={};Ef.transitional=function(t,n,r){function i(o,a){return"[Axios v"+dS+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new _e(i(a," has been removed"+(n?" in "+n:"")),_e.ERR_DEPRECATED);return n&&!fS[a]&&(fS[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}},Ef.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Qj(e,t,n){if(typeof e!="object")throw new _e("options must be an object",_e.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new _e("option "+o+" must be "+u,_e.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _e("Unknown option "+o,_e.ERR_BAD_OPTION)}}const Tf={assertOptions:Qj,validators:Ef},Br=Tf.validators;class ra{constructor(t){this.defaults=t,this.interceptors={request:new qC,response:new qC}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
338
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=na(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Tf.assertOptions(r,{silentJSONParsing:Br.transitional(Br.boolean),forcedJSONParsing:Br.transitional(Br.boolean),clarifyTimeoutError:Br.transitional(Br.boolean)},!1),i!=null&&(V.isFunction(i)?n.paramsSerializer={serialize:i}:Tf.assertOptions(i,{encode:Br.function,serialize:Br.function},!0)),Tf.assertOptions(n,{baseUrl:Br.spelling("baseURL"),withXsrfToken:Br.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&V.merge(o.common,o[n.method]);o&&V.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=bn.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[cS.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],y=s[d++];try{p=m(p)}catch(b){y.call(this,b);break}}try{c=cS.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=na(this.defaults,t);const n=tS(t.baseURL,t.url);return YC(n,t.params,t.paramsSerializer)}}V.forEach(["delete","get","head","options"],function(t){ra.prototype[t]=function(n,r){return this.request(na(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(na(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}ra.prototype[t]=n(),ra.prototype[t+"Form"]=n(!0)});class ay{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new ps(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ay(function(i){t=i}),cancel:t}}}function Zj(e){return function(n){return e.apply(null,n)}}function Jj(e){return V.isObject(e)&&e.isAxiosError===!0}const sy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sy).forEach(([e,t])=>{sy[t]=e});function pS(e){const t=new ra(e),n=NC(ra.prototype.request,t);return V.extend(n,ra.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return pS(na(e,i))},n}const Ct=pS(cl);Ct.Axios=ra,Ct.CanceledError=ps,Ct.CancelToken=ay,Ct.isCancel=QC,Ct.VERSION=dS,Ct.toFormData=yf,Ct.AxiosError=_e,Ct.Cancel=Ct.CanceledError,Ct.all=function(t){return Promise.all(t)},Ct.spread=Zj,Ct.isAxiosError=Jj,Ct.mergeConfig=na,Ct.AxiosHeaders=bn,Ct.formToJSON=e=>KC(V.isHTMLForm(e)?new FormData(e):e),Ct.getAdapter=lS.getAdapter,Ct.HttpStatusCode=sy,Ct.default=Ct;const e7=/\{[^{}]+\}/g,t7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function n7(){return Math.random().toString(36).slice(2,11)}function r7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:o,headers:a,requestInitExt:s=void 0,...u}={...e};s=t7()?s:void 0,t=yS(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:b,params:g={},parseAs:x="json",querySerializer:w,bodySerializer:T=o??o7,body:C,..._}=f||{};p&&(t=yS(p));let A=typeof i=="function"?i:gS(i);w&&(A=typeof w=="function"?w:gS({...typeof i=="object"?i:{},...w}));const I=C===void 0?void 0:T(C),U=I===void 0||I instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,..._,body:I,headers:s7(U,a,b,g.header)};let $,H,X=new n(a7(d,{baseUrl:t,params:g,querySerializer:A}),P);for(const re in _)re in X||(X[re]=_[re]);if(l.length){$=n7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:x,querySerializer:A,bodySerializer:T});for(const re of l)if(re&&typeof re=="object"&&typeof re.onRequest=="function"){const ee=await re.onRequest({request:X,schemaPath:d,params:g,options:H,id:$});if(ee){if(!(ee instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");X=ee}}}let Y;try{Y=await m(X,s)}catch(re){let ee=re;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const k=await B.onError({request:X,error:ee,schemaPath:d,params:g,options:H,id:$});if(k){if(k instanceof Response){ee=void 0,Y=k;break}if(k instanceof Error){ee=k;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ee)throw ee}if(l.length)for(let re=l.length-1;re>=0;re--){const ee=l[re];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:g,options:H,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return x==="stream"?{data:Y.body,response:Y}:{data:await Y[x](),response:Y};let ne=await Y.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function _f(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function hS(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const a=r.join(",");switch(n.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const s=n.style==="deepObject"?`${e}[${a}]`:a;r.push(_f(s,t[a],n))}const o=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${o}`:o}function mS(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",a=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(o);switch(n.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const o of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?o:encodeURIComponent(o)):i.push(_f(e,o,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function gS(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const o=n[i];if(o!=null){if(Array.isArray(o)){if(o.length===0)continue;r.push(mS(i,o,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof o=="object"){r.push(hS(i,o,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(_f(i,o,e))}}return r.join("&")}}function i7(e,t){let n=e;for(const r of e.match(e7)??[]){let i=r.substring(1,r.length-1),o=!1,a="simple";if(i.endsWith("*")&&(o=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,mS(i,s,{style:a,explode:o}));continue}if(typeof s=="object"){n=n.replace(r,hS(i,s,{style:a,explode:o}));continue}if(a==="matrix"){n=n.replace(r,`;${_f(i,s)}`);continue}n=n.replace(r,a==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function o7(e){return e instanceof FormData?e:JSON.stringify(e)}function a7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=i7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function s7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(const a of o)t.append(i,a);else o!==void 0&&t.set(i,o)}return t}function yS(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const u7=e=>{console.log(e.error)},l7=e=>{const t=r7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||u7};return t.use(n),t};class vS{constructor({config:t}){var i;this.constructClientOptions=o=>{const a=this.config.apiUrl||"https://api.open.cx",s={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:o?`Bearer ${o}`:void 0};return{baseUrl:a,headers:s}},this.createOpenAPIClient=({baseUrl:o,headers:a})=>l7({baseUrl:o,onRequest:({request:s})=>{Object.entries(a).forEach(([u,l])=>{l&&s.headers.set(u,l)})}}),this.createAxiosUploadClient=({baseUrl:o,headers:a})=>Ct.create({baseURL:`${o}/backend/widget/v2/upload`,headers:a}),this.setAuthToken=o=>{const{baseUrl:a,headers:s}=this.constructClientOptions(o);this.client=this.createOpenAPIClient({baseUrl:a,headers:s}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:a,headers:s})},this.getExternalWidgetConfig=async()=>await this.client.GET("/backend/widget/v2/config",{params:{header:{"X-Bot-Token":this.config.token}}}),this.widgetPrelude=async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}),this.sendMessage=async(o,a)=>await this.client.POST("/backend/widget/v2/chat/send",{body:o,signal:a}),this.createUnverifiedContact=async o=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:o}),this.createSession=async o=>await this.client.POST("/backend/widget/v2/create-session",{body:o}),this.pollSessionAndHistory=async({sessionId:o,lastMessageTimestamp:a,abortSignal:s})=>{const u=a?{lastMessageTimestamp:a}:void 0;return await this.client.GET("/backend/widget/v2/poll/{sessionId}",{params:{path:{sessionId:o},query:u},signal:s})},this.getSessions=async({cursor:o,filters:a,abortSignal:s})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:o,filters:JSON.stringify(a)}},signal:s}),this.uploadFile=async(o,a={})=>{const s=new FormData;s.append("file",o.file);const{data:u}=await this.uploadFileClient.post("",s,{headers:{"Content-Type":"multipart/form-data"},...a});return u},this.vote=async o=>await this.client.POST("/backend/widget/v2/chat/vote",{body:o}),this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Cf={exports:{}};Cf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",b="[object Number]",g="[object Null]",x="[object Object]",w="[object Promise]",T="[object Proxy]",C="[object RegExp]",_="[object Set]",A="[object String]",I="[object Symbol]",U="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",X="[object Float32Array]",Y="[object Float64Array]",ne="[object Int8Array]",re="[object Int16Array]",ee="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",k="[object Uint16Array]",ie="[object Uint32Array]",pe=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,Ie=/^(?:0|[1-9]\d*)$/,me={};me[X]=me[Y]=me[ne]=me[re]=me[ee]=me[F]=me[B]=me[k]=me[ie]=!0,me[s]=me[u]=me[$]=me[c]=me[H]=me[d]=me[f]=me[p]=me[y]=me[b]=me[x]=me[C]=me[_]=me[A]=me[P]=!1;var ve=typeof Ea=="object"&&Ea&&Ea.Object===Object&&Ea,Ve=typeof self=="object"&&self&&self.Object===Object&&self,He=ve||Ve||Function("return this")(),$e=t&&!t.nodeType&&t,qe=$e&&!0&&e&&!e.nodeType&&e,Tt=qe&&qe.exports===$e,Ee=Tt&&ve.process,we=function(){try{return Ee&&Ee.binding&&Ee.binding("util")}catch{}}(),We=we&&we.isTypedArray;function Ue(R,L){for(var W=-1,ue=R==null?0:R.length,rt=0,Ne=[];++W<ue;){var vt=R[W];L(vt,W,R)&&(Ne[rt++]=vt)}return Ne}function gt(R,L){for(var W=-1,ue=L.length,rt=R.length;++W<ue;)R[rt+W]=L[W];return R}function yt(R,L){for(var W=-1,ue=R==null?0:R.length;++W<ue;)if(L(R[W],W,R))return!0;return!1}function Ge(R,L){for(var W=-1,ue=Array(R);++W<R;)ue[W]=L(W);return ue}function Me(R){return function(L){return R(L)}}function It(R,L){return R.has(L)}function ko(R,L){return R==null?void 0:R[L]}function Ro(R){var L=-1,W=Array(R.size);return R.forEach(function(ue,rt){W[++L]=[rt,ue]}),W}function No(R,L){return function(W){return R(L(W))}}function te(R){var L=-1,W=Array(R.size);return R.forEach(function(ue){W[++L]=ue}),W}var ce=Array.prototype,j=Function.prototype,q=Object.prototype,le=He["__core-js_shared__"],Te=j.toString,be=q.hasOwnProperty,Bt=function(){var R=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),An=q.toString,hn=RegExp("^"+Te.call(be).replace(pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wn=Tt?He.Buffer:void 0,kn=He.Symbol,At=He.Uint8Array,Yn=q.propertyIsEnumerable,mn=ce.splice,Si=kn?kn.toStringTag:void 0,gO=Object.getOwnPropertySymbols,Rre=Wn?Wn.isBuffer:void 0,Nre=No(Object.keys,Object),Wv=Zs(He,"DataView"),pc=Zs(He,"Map"),Yv=Zs(He,"Promise"),qv=Zs(He,"Set"),Gv=Zs(He,"WeakMap"),hc=Zs(Object,"create"),Pre=wa(Wv),Ire=wa(pc),Ore=wa(Yv),Dre=wa(qv),Lre=wa(Gv),yO=kn?kn.prototype:void 0,Kv=yO?yO.valueOf:void 0;function va(R){var L=-1,W=R==null?0:R.length;for(this.clear();++L<W;){var ue=R[L];this.set(ue[0],ue[1])}}function Mre(){this.__data__=hc?hc(null):{},this.size=0}function Fre(R){var L=this.has(R)&&delete this.__data__[R];return this.size-=L?1:0,L}function Bre(R){var L=this.__data__;if(hc){var W=L[R];return W===r?void 0:W}return be.call(L,R)?L[R]:void 0}function jre(R){var L=this.__data__;return hc?L[R]!==void 0:be.call(L,R)}function Ure(R,L){var W=this.__data__;return this.size+=this.has(R)?0:1,W[R]=hc&&L===void 0?r:L,this}va.prototype.clear=Mre,va.prototype.delete=Fre,va.prototype.get=Bre,va.prototype.has=jre,va.prototype.set=Ure;function Ai(R){var L=-1,W=R==null?0:R.length;for(this.clear();++L<W;){var ue=R[L];this.set(ue[0],ue[1])}}function zre(){this.__data__=[],this.size=0}function Hre(R){var L=this.__data__,W=nh(L,R);if(W<0)return!1;var ue=L.length-1;return W==ue?L.pop():mn.call(L,W,1),--this.size,!0}function Vre(R){var L=this.__data__,W=nh(L,R);return W<0?void 0:L[W][1]}function $re(R){return nh(this.__data__,R)>-1}function Wre(R,L){var W=this.__data__,ue=nh(W,R);return ue<0?(++this.size,W.push([R,L])):W[ue][1]=L,this}Ai.prototype.clear=zre,Ai.prototype.delete=Hre,Ai.prototype.get=Vre,Ai.prototype.has=$re,Ai.prototype.set=Wre;function xa(R){var L=-1,W=R==null?0:R.length;for(this.clear();++L<W;){var ue=R[L];this.set(ue[0],ue[1])}}function Yre(){this.size=0,this.__data__={hash:new va,map:new(pc||Ai),string:new va}}function qre(R){var L=rh(this,R).delete(R);return this.size-=L?1:0,L}function Gre(R){return rh(this,R).get(R)}function Kre(R){return rh(this,R).has(R)}function Xre(R,L){var W=rh(this,R),ue=W.size;return W.set(R,L),this.size+=W.size==ue?0:1,this}xa.prototype.clear=Yre,xa.prototype.delete=qre,xa.prototype.get=Gre,xa.prototype.has=Kre,xa.prototype.set=Xre;function th(R){var L=-1,W=R==null?0:R.length;for(this.__data__=new xa;++L<W;)this.add(R[L])}function Qre(R){return this.__data__.set(R,r),this}function Zre(R){return this.__data__.has(R)}th.prototype.add=th.prototype.push=Qre,th.prototype.has=Zre;function Po(R){var L=this.__data__=new Ai(R);this.size=L.size}function Jre(){this.__data__=new Ai,this.size=0}function eie(R){var L=this.__data__,W=L.delete(R);return this.size=L.size,W}function tie(R){return this.__data__.get(R)}function nie(R){return this.__data__.has(R)}function rie(R,L){var W=this.__data__;if(W instanceof Ai){var ue=W.__data__;if(!pc||ue.length<n-1)return ue.push([R,L]),this.size=++W.size,this;W=this.__data__=new xa(ue)}return W.set(R,L),this.size=W.size,this}Po.prototype.clear=Jre,Po.prototype.delete=eie,Po.prototype.get=tie,Po.prototype.has=nie,Po.prototype.set=rie;function iie(R,L){var W=ih(R),ue=!W&&xie(R),rt=!W&&!ue&&Xv(R),Ne=!W&&!ue&&!rt&&SO(R),vt=W||ue||rt||Ne,jt=vt?Ge(R.length,String):[],Yt=jt.length;for(var ht in R)be.call(R,ht)&&!(vt&&(ht=="length"||rt&&(ht=="offset"||ht=="parent")||Ne&&(ht=="buffer"||ht=="byteLength"||ht=="byteOffset")||hie(ht,Yt)))&&jt.push(ht);return jt}function nh(R,L){for(var W=R.length;W--;)if(EO(R[W][0],L))return W;return-1}function oie(R,L,W){var ue=L(R);return ih(R)?ue:gt(ue,W(R))}function mc(R){return R==null?R===void 0?U:g:Si&&Si in Object(R)?fie(R):vie(R)}function vO(R){return gc(R)&&mc(R)==s}function xO(R,L,W,ue,rt){return R===L?!0:R==null||L==null||!gc(R)&&!gc(L)?R!==R&&L!==L:aie(R,L,W,ue,xO,rt)}function aie(R,L,W,ue,rt,Ne){var vt=ih(R),jt=ih(L),Yt=vt?u:Io(R),ht=jt?u:Io(L);Yt=Yt==s?x:Yt,ht=ht==s?x:ht;var qn=Yt==x,Rr=ht==x,an=Yt==ht;if(an&&Xv(R)){if(!Xv(L))return!1;vt=!0,qn=!1}if(an&&!qn)return Ne||(Ne=new Po),vt||SO(R)?wO(R,L,W,ue,rt,Ne):cie(R,L,Yt,W,ue,rt,Ne);if(!(W&i)){var lr=qn&&be.call(R,"__wrapped__"),cr=Rr&&be.call(L,"__wrapped__");if(lr||cr){var Oo=lr?R.value():R,ki=cr?L.value():L;return Ne||(Ne=new Po),rt(Oo,ki,W,ue,Ne)}}return an?(Ne||(Ne=new Po),die(R,L,W,ue,rt,Ne)):!1}function sie(R){if(!CO(R)||gie(R))return!1;var L=TO(R)?hn:D;return L.test(wa(R))}function uie(R){return gc(R)&&_O(R.length)&&!!me[mc(R)]}function lie(R){if(!yie(R))return Nre(R);var L=[];for(var W in Object(R))be.call(R,W)&&W!="constructor"&&L.push(W);return L}function wO(R,L,W,ue,rt,Ne){var vt=W&i,jt=R.length,Yt=L.length;if(jt!=Yt&&!(vt&&Yt>jt))return!1;var ht=Ne.get(R);if(ht&&Ne.get(L))return ht==L;var qn=-1,Rr=!0,an=W&o?new th:void 0;for(Ne.set(R,L),Ne.set(L,R);++qn<jt;){var lr=R[qn],cr=L[qn];if(ue)var Oo=vt?ue(cr,lr,qn,L,R,Ne):ue(lr,cr,qn,R,L,Ne);if(Oo!==void 0){if(Oo)continue;Rr=!1;break}if(an){if(!yt(L,function(ki,ba){if(!It(an,ba)&&(lr===ki||rt(lr,ki,W,ue,Ne)))return an.push(ba)})){Rr=!1;break}}else if(!(lr===cr||rt(lr,cr,W,ue,Ne))){Rr=!1;break}}return Ne.delete(R),Ne.delete(L),Rr}function cie(R,L,W,ue,rt,Ne,vt){switch(W){case H:if(R.byteLength!=L.byteLength||R.byteOffset!=L.byteOffset)return!1;R=R.buffer,L=L.buffer;case $:return!(R.byteLength!=L.byteLength||!Ne(new At(R),new At(L)));case c:case d:case b:return EO(+R,+L);case f:return R.name==L.name&&R.message==L.message;case C:case A:return R==L+"";case y:var jt=Ro;case _:var Yt=ue&i;if(jt||(jt=te),R.size!=L.size&&!Yt)return!1;var ht=vt.get(R);if(ht)return ht==L;ue|=o,vt.set(R,L);var qn=wO(jt(R),jt(L),ue,rt,Ne,vt);return vt.delete(R),qn;case I:if(Kv)return Kv.call(R)==Kv.call(L)}return!1}function die(R,L,W,ue,rt,Ne){var vt=W&i,jt=bO(R),Yt=jt.length,ht=bO(L),qn=ht.length;if(Yt!=qn&&!vt)return!1;for(var Rr=Yt;Rr--;){var an=jt[Rr];if(!(vt?an in L:be.call(L,an)))return!1}var lr=Ne.get(R);if(lr&&Ne.get(L))return lr==L;var cr=!0;Ne.set(R,L),Ne.set(L,R);for(var Oo=vt;++Rr<Yt;){an=jt[Rr];var ki=R[an],ba=L[an];if(ue)var AO=vt?ue(ba,ki,an,L,R,Ne):ue(ki,ba,an,R,L,Ne);if(!(AO===void 0?ki===ba||rt(ki,ba,W,ue,Ne):AO)){cr=!1;break}Oo||(Oo=an=="constructor")}if(cr&&!Oo){var oh=R.constructor,ah=L.constructor;oh!=ah&&"constructor"in R&&"constructor"in L&&!(typeof oh=="function"&&oh instanceof oh&&typeof ah=="function"&&ah instanceof ah)&&(cr=!1)}return Ne.delete(R),Ne.delete(L),cr}function bO(R){return oie(R,Eie,pie)}function rh(R,L){var W=R.__data__;return mie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Zs(R,L){var W=ko(R,L);return sie(W)?W:void 0}function fie(R){var L=be.call(R,Si),W=R[Si];try{R[Si]=void 0;var ue=!0}catch{}var rt=An.call(R);return ue&&(L?R[Si]=W:delete R[Si]),rt}var pie=gO?function(R){return R==null?[]:(R=Object(R),Ue(gO(R),function(L){return Yn.call(R,L)}))}:Tie,Io=mc;(Wv&&Io(new Wv(new ArrayBuffer(1)))!=H||pc&&Io(new pc)!=y||Yv&&Io(Yv.resolve())!=w||qv&&Io(new qv)!=_||Gv&&Io(new Gv)!=P)&&(Io=function(R){var L=mc(R),W=L==x?R.constructor:void 0,ue=W?wa(W):"";if(ue)switch(ue){case Pre:return H;case Ire:return y;case Ore:return w;case Dre:return _;case Lre:return P}return L});function hie(R,L){return L=L??a,!!L&&(typeof R=="number"||Ie.test(R))&&R>-1&&R%1==0&&R<L}function mie(R){var L=typeof R;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?R!=="__proto__":R===null}function gie(R){return!!Bt&&Bt in R}function yie(R){var L=R&&R.constructor,W=typeof L=="function"&&L.prototype||q;return R===W}function vie(R){return An.call(R)}function wa(R){if(R!=null){try{return Te.call(R)}catch{}try{return R+""}catch{}}return""}function EO(R,L){return R===L||R!==R&&L!==L}var xie=vO(function(){return arguments}())?vO:function(R){return gc(R)&&be.call(R,"callee")&&!Yn.call(R,"callee")},ih=Array.isArray;function wie(R){return R!=null&&_O(R.length)&&!TO(R)}var Xv=Rre||_ie;function bie(R,L){return xO(R,L)}function TO(R){if(!CO(R))return!1;var L=mc(R);return L==p||L==m||L==l||L==T}function _O(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=a}function CO(R){var L=typeof R;return R!=null&&(L=="object"||L=="function")}function gc(R){return R!=null&&typeof R=="object"}var SO=We?Me(We):uie;function Eie(R){return wie(R)?iie(R):lie(R)}function Tie(){return[]}function _ie(){return!1}e.exports=bie}(Cf,Cf.exports);var c7=Cf.exports;const d7=yc(c7);class hs{constructor(t){this.subscribers=new Set,this.get=()=>this.state,this.set=n=>{d7(this.state,n)||(this.state=n,this.notifySubscribers(n))},this.setPartial=n=>{if(n==null)return;const r={...this.state,...n};this.set(r)},this.reset=()=>{this.set(this.initialState)},this.notifySubscribers=n=>{Array.from(this.subscribers).forEach(i=>{try{i(n)}catch(o){console.error(o)}})},this.subscribe=n=>(this.subscribers.add(n),()=>{this.subscribers.delete(n)}),this.state=t,this.initialState=t}}class xS{constructor(){this.state=new hs({isPolling:!1,isError:!1}),this.abortController=new AbortController,this.reset=()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null},this.stopPolling=null,this.startPolling=(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(o){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",o),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}}}}class f7{constructor({api:t,config:n,sessionCtx:r,messageCtx:i,sessionPollingIntervalSeconds:o}){this.poller=new xS,this.registerPolling=()=>{this.sessionCtx.sessionState.subscribe(({session:a})=>{a!=null&&a.id?this.poller.startPolling(async s=>{this.hackAndSlash(a.id,s)},this.sessionPollingIntervalSeconds*1e3):this.poller.reset()})},this.hackAndSlash=async(a,s)=>{var d;this.messageCtx.state.get().messages.length===0&&this.messageCtx.state.setPartial({isInitialFetchLoading:!0});const u=this.messageCtx.state.get().messages,l=u.length>0?(d=u[u.length-1])==null?void 0:d.timestamp:void 0,{data:c}=await this.api.pollSessionAndHistory({sessionId:a,abortSignal:s,lastMessageTimestamp:l});if(c!=null&&c.session&&this.sessionCtx.sessionState.setPartial({session:c.session}),c!=null&&c.history&&c.history.length>0){const f=this.messageCtx.state.get().messages,p=c.history.map(this.mapHistoryToMessage).filter(m=>!f.some(y=>y.id===m.id));this.messageCtx.state.setPartial({messages:[...f,...p]})}this.messageCtx.state.get().isInitialFetchLoading&&this.messageCtx.state.setPartial({isInitialFetchLoading:!1})},this.mapHistoryToMessage=a=>{var l,c;const s={id:a.publicId,timestamp:a.sentAt||"",attachments:a.attachments||void 0};if(a.sender.kind==="user")return{...s,type:"FROM_USER",content:a.content.text||"",deliveredAt:a.sentAt||""};if(a.sender.kind==="agent")return{...s,type:"FROM_AGENT",component:"agent_message",data:{message:a.content.text||""},agent:{name:a.sender.name||"",avatar:a.sender.avatar||"",id:null,isAi:!1}};const u=a.actionCalls&&a.actionCalls.length>0?a.actionCalls[a.actionCalls.length-1]:void 0;return{...s,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((l=this.config.bot)==null?void 0:l.name)||"",isAi:!0,avatar:((c=this.config.bot)==null?void 0:c.avatar)||""},data:{message:a.content.text||"",action:u?{name:u.actionName,data:u.result}:void 0}}},this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=i,this.sessionPollingIntervalSeconds=o,this.registerPolling()}}const Wt=[];for(let e=0;e<256;++e)Wt.push((e+256).toString(16).slice(1));function p7(e,t=0){return(Wt[e[t+0]]+Wt[e[t+1]]+Wt[e[t+2]]+Wt[e[t+3]]+"-"+Wt[e[t+4]]+Wt[e[t+5]]+"-"+Wt[e[t+6]]+Wt[e[t+7]]+"-"+Wt[e[t+8]]+Wt[e[t+9]]+"-"+Wt[e[t+10]]+Wt[e[t+11]]+Wt[e[t+12]]+Wt[e[t+13]]+Wt[e[t+14]]+Wt[e[t+15]]).toLowerCase()}let uy;const h7=new Uint8Array(16);function m7(){if(!uy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");uy=crypto.getRandomValues.bind(crypto)}return uy(h7)}const wS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ly(e,t,n){var i;if(wS.randomUUID&&!t&&!e)return wS.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??m7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,p7(r)}class g7{constructor({config:t,api:n,storageCtx:r}){var i;this.shouldCollectData=()=>{var o;return!!(!((o=this.state.get().contact)!=null&&o.token)&&this.config.collectUserData)},this.autoCreateUnverifiedUserIfNotExists=async()=>{var o,a,s,u,l,c,d,f,p,m,y,b;if(!((o=this.config.user)!=null&&o.token)){if(this.config.collectUserData&&!((s=(a=this.config.user)==null?void 0:a.data)!=null&&s.email)){if((u=this.config.extraDataCollectionFields)!=null&&u.length)return;const g=await((l=this.storageCtx)==null?void 0:l.getContactToken());g&&await this.setUnverifiedContact(g);return}if(!((d=(c=this.config.user)==null?void 0:c.data)!=null&&d.email)){const g=await((f=this.storageCtx)==null?void 0:f.getContactToken());if(g){await this.setUnverifiedContact(g);return}}await this.createUnverifiedContact({name:((m=(p=this.config.user)==null?void 0:p.data)==null?void 0:m.name)||"Anonymous",email:(b=(y=this.config.user)==null?void 0:y.data)==null?void 0:b.email})}},this.createUnverifiedContact=async(o,a)=>{this.state.setPartial({extraCollectedData:a});try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:s}=await this.api.createUnverifiedContact(o);s!=null&&s.token?await this.setUnverifiedContact(s.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}},this.setUnverifiedContact=async o=>{var u,l,c,d;const a=await((u=this.storageCtx)==null?void 0:u.getExternalContactId()),s=((l=this.config.user)==null?void 0:l.externalId)||a||ly();this.api.setAuthToken(o),await((c=this.storageCtx)==null?void 0:c.setContactToken(o)),await((d=this.storageCtx)==null?void 0:d.setExternalContactId(s)),this.state.setPartial({contact:{token:o,externalId:s}})},this.config=t,this.storageCtx=r,this.api=n,this.state=new hs({contact:(i=t.user)!=null&&i.token?{token:t.user.token,externalId:t.user.externalId}:null,extraCollectedData:void 0,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function cy(){return ly()}class y7{constructor({api:t,contactCtx:n,sessionsPollingIntervalSeconds:r}){this.sessionsRefresher=new xS,this.sessionState=new hs({session:null,isCreatingSession:!1}),this.sessionsState=new hs({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}),this.reset=async()=>{this.sessionState.reset()},this.registerSessionsRefresherWrapper=()=>{var i;(i=this.contactCtx.state.get().contact)!=null&&i.token&&!this.sessionsState.get().didStartInitialFetch?this.registerSessionsRefresher():this.contactCtx.state.subscribe(({contact:o})=>{o!=null&&o.token&&!this.sessionsState.get().didStartInitialFetch&&this.registerSessionsRefresher()})},this.registerSessionsRefresher=()=>{this.sessionsRefresher.startPolling(async()=>{this.sessionsState.get().didStartInitialFetch===!1&&this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.refreshSessions(),this.sessionsState.get().isInitialFetchLoading===!0&&this.sessionsState.setPartial({isInitialFetchLoading:!1})},this.sessionsPollingIntervalSeconds*1e3)},this.createSession=async()=>{var s;this.sessionState.setPartial({session:null,isCreatingSession:!0});const i=(s=this.contactCtx.state.get().contact)==null?void 0:s.externalId,{data:o,error:a}=await this.api.createSession({customData:i?{external_id:i}:void 0});return o?(this.sessionState.setPartial({session:o,isCreatingSession:!1}),o):(console.error("Failed to create session:",a),null)},this.loadMoreSessions=async()=>{if(this.sessionsState.get().isLastPage)return;const{data:i}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(i){const a=[...this.sessionsState.get().data,...i.items].filter((s,u,l)=>u===l.findIndex(c=>s.id===c.id));this.sessionsState.setPartial({data:a,cursor:i.next||void 0,isLastPage:i.next===null})}},this.getSessions=async({cursor:i})=>{var a,s;if(!((a=this.contactCtx.state.get().contact)!=null&&a.token))return{data:null};const o=(s=this.contactCtx.state.get().contact)==null?void 0:s.externalId;return await this.api.getSessions({cursor:i,filters:o?{external_id:o}:{}})},this.refreshSessions=async()=>{const{data:i}=await this.getSessions({cursor:void 0});if(!i)return;const o=[...i.items,...this.sessionsState.get().data].filter((a,s,u)=>s===u.findIndex(l=>a.id===l.id));this.sessionsState.setPartial({data:o})},this.api=t,this.contactCtx=n,this.sessionsPollingIntervalSeconds=r,this.registerSessionsRefresherWrapper()}}class v7{constructor({config:t,api:n,sessionCtx:r,contactCtx:i}){this.state=new hs({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}),this.sendMessageAbortController=new AbortController,this.reset=()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()},this.sendMessage=async o=>{var c,d,f,p,m,y,b,g,x;if(!o.content.trim()&&(!o.attachments||o.attachments.length===0)){console.warn("Cannot send an empty message of no content or attachments");return}const a=this.state.get().isSendingMessage,s=((c=this.sessionCtx.sessionState.get().session)==null?void 0:c.assignee.kind)==="ai",u=this.state.get().messages,l=u.length>0?u[u.length-1]:void 0;if(s&&a||s&&(l==null?void 0:l.type)==="FROM_USER"){console.warn("Cannot send messages while awaiting AI response");return}this.sendMessageAbortController=new AbortController,this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const w=this.toUserMessage(o.content.trim(),o.attachments||void 0),T=this.state.get().messages;if(this.state.setPartial({messages:[...T,w]}),!((d=this.sessionCtx.sessionState.get().session)!=null&&d.id)){if(!await this.sessionCtx.createSession()){console.error("Failed to create session");return}this.sessionCtx.refreshSessions()}const C=(f=this.sessionCtx.sessionState.get().session)==null?void 0:f.id;if(!C)return;const{data:_}=await this.api.sendMessage({uuid:w.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:C,user:(p=this.config.user)==null?void 0:p.data,content:w.content,attachments:o.attachments},this.sendMessageAbortController.signal);if(_!=null&&_.success){const A=this.toBotMessage(_);if(A){const I=this.state.get().messages;if(!!I.some(P=>P.id===A.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((m=_.autopilotResponse)==null?void 0:m.mightSolveUserIssue)||((y=_.uiResponse)==null?void 0:y.mightSolveUserIssue)});return}this.state.setPartial({messages:[...I,A],lastAIResMightSolveUserIssue:((b=_.autopilotResponse)==null?void 0:b.mightSolveUserIssue)||((g=_.uiResponse)==null?void 0:g.mightSolveUserIssue)})}}else{const A=this.toBotErrorMessage(((x=_==null?void 0:_.error)==null?void 0:x.message)||"Unknown error occurred"),I=this.state.get().messages;this.state.setPartial({messages:[...I,A]})}}catch(w){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",w)}finally{this.state.setPartial({isSendingMessage:!1})}},this.toUserMessage=(o,a)=>{const s=(()=>{const u=this.contactCtx.state.get().extraCollectedData;return this.state.get().messages.length===0&&u&&Object.keys(u).length>0?`${Object.entries(u).filter(([c,d])=>!!d).map(([c,d])=>`${c}: ${d}`).join(`
|
|
338
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=na(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Tf.assertOptions(r,{silentJSONParsing:Br.transitional(Br.boolean),forcedJSONParsing:Br.transitional(Br.boolean),clarifyTimeoutError:Br.transitional(Br.boolean)},!1),i!=null&&(V.isFunction(i)?n.paramsSerializer={serialize:i}:Tf.assertOptions(i,{encode:Br.function,serialize:Br.function},!0)),Tf.assertOptions(n,{baseUrl:Br.spelling("baseURL"),withXsrfToken:Br.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&V.merge(o.common,o[n.method]);o&&V.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=bn.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[cS.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],y=s[d++];try{p=m(p)}catch(b){y.call(this,b);break}}try{c=cS.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=na(this.defaults,t);const n=tS(t.baseURL,t.url);return YC(n,t.params,t.paramsSerializer)}}V.forEach(["delete","get","head","options"],function(t){ra.prototype[t]=function(n,r){return this.request(na(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(na(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}ra.prototype[t]=n(),ra.prototype[t+"Form"]=n(!0)});class ay{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new ps(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ay(function(i){t=i}),cancel:t}}}function Zj(e){return function(n){return e.apply(null,n)}}function Jj(e){return V.isObject(e)&&e.isAxiosError===!0}const sy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sy).forEach(([e,t])=>{sy[t]=e});function pS(e){const t=new ra(e),n=NC(ra.prototype.request,t);return V.extend(n,ra.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return pS(na(e,i))},n}const Ct=pS(cl);Ct.Axios=ra,Ct.CanceledError=ps,Ct.CancelToken=ay,Ct.isCancel=QC,Ct.VERSION=dS,Ct.toFormData=yf,Ct.AxiosError=_e,Ct.Cancel=Ct.CanceledError,Ct.all=function(t){return Promise.all(t)},Ct.spread=Zj,Ct.isAxiosError=Jj,Ct.mergeConfig=na,Ct.AxiosHeaders=bn,Ct.formToJSON=e=>KC(V.isHTMLForm(e)?new FormData(e):e),Ct.getAdapter=lS.getAdapter,Ct.HttpStatusCode=sy,Ct.default=Ct;const e7=/\{[^{}]+\}/g,t7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function n7(){return Math.random().toString(36).slice(2,11)}function r7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:o,headers:a,requestInitExt:s=void 0,...u}={...e};s=t7()?s:void 0,t=yS(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:b,params:g={},parseAs:x="json",querySerializer:w,bodySerializer:T=o??o7,body:C,..._}=f||{};p&&(t=yS(p));let A=typeof i=="function"?i:gS(i);w&&(A=typeof w=="function"?w:gS({...typeof i=="object"?i:{},...w}));const I=C===void 0?void 0:T(C),U=I===void 0||I instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,..._,body:I,headers:s7(U,a,b,g.header)};let $,H,X=new n(a7(d,{baseUrl:t,params:g,querySerializer:A}),P);for(const re in _)re in X||(X[re]=_[re]);if(l.length){$=n7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:x,querySerializer:A,bodySerializer:T});for(const re of l)if(re&&typeof re=="object"&&typeof re.onRequest=="function"){const ee=await re.onRequest({request:X,schemaPath:d,params:g,options:H,id:$});if(ee){if(!(ee instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");X=ee}}}let Y;try{Y=await m(X,s)}catch(re){let ee=re;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const k=await B.onError({request:X,error:ee,schemaPath:d,params:g,options:H,id:$});if(k){if(k instanceof Response){ee=void 0,Y=k;break}if(k instanceof Error){ee=k;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ee)throw ee}if(l.length)for(let re=l.length-1;re>=0;re--){const ee=l[re];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:g,options:H,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return x==="stream"?{data:Y.body,response:Y}:{data:await Y[x](),response:Y};let ne=await Y.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function _f(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function hS(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const a=r.join(",");switch(n.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const s=n.style==="deepObject"?`${e}[${a}]`:a;r.push(_f(s,t[a],n))}const o=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${o}`:o}function mS(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const o={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",a=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(o);switch(n.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const o of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?o:encodeURIComponent(o)):i.push(_f(e,o,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function gS(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const o=n[i];if(o!=null){if(Array.isArray(o)){if(o.length===0)continue;r.push(mS(i,o,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof o=="object"){r.push(hS(i,o,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(_f(i,o,e))}}return r.join("&")}}function i7(e,t){let n=e;for(const r of e.match(e7)??[]){let i=r.substring(1,r.length-1),o=!1,a="simple";if(i.endsWith("*")&&(o=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,mS(i,s,{style:a,explode:o}));continue}if(typeof s=="object"){n=n.replace(r,hS(i,s,{style:a,explode:o}));continue}if(a==="matrix"){n=n.replace(r,`;${_f(i,s)}`);continue}n=n.replace(r,a==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function o7(e){return e instanceof FormData?e:JSON.stringify(e)}function a7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=i7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function s7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(const a of o)t.append(i,a);else o!==void 0&&t.set(i,o)}return t}function yS(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const u7=e=>{console.log(e.error)},l7=e=>{const t=r7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||u7};return t.use(n),t};class vS{constructor({config:t}){var i;this.constructClientOptions=o=>{const a=this.config.apiUrl||"https://api.open.cx",s={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:o?`Bearer ${o}`:void 0};return{baseUrl:a,headers:s}},this.createOpenAPIClient=({baseUrl:o,headers:a})=>l7({baseUrl:o,onRequest:({request:s})=>{Object.entries(a).forEach(([u,l])=>{l&&s.headers.set(u,l)})}}),this.createAxiosUploadClient=({baseUrl:o,headers:a})=>Ct.create({baseURL:`${o}/backend/widget/v2/upload`,headers:a}),this.setAuthToken=o=>{const{baseUrl:a,headers:s}=this.constructClientOptions(o);this.client=this.createOpenAPIClient({baseUrl:a,headers:s}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:a,headers:s})},this.getExternalWidgetConfig=async()=>await this.client.GET("/backend/widget/v2/config",{params:{header:{"X-Bot-Token":this.config.token}}}),this.widgetPrelude=async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}),this.sendMessage=async(o,a)=>await this.client.POST("/backend/widget/v2/chat/send",{body:o,signal:a}),this.createUnverifiedContact=async o=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:o}),this.createSession=async o=>await this.client.POST("/backend/widget/v2/create-session",{body:o}),this.pollSessionAndHistory=async({sessionId:o,lastMessageTimestamp:a,abortSignal:s})=>{const u=a?{lastMessageTimestamp:a}:void 0;return await this.client.GET("/backend/widget/v2/poll/{sessionId}",{params:{path:{sessionId:o},query:u},signal:s})},this.getSessions=async({cursor:o,filters:a,abortSignal:s})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:o,filters:JSON.stringify(a)}},signal:s}),this.uploadFile=async(o,a={})=>{const s=new FormData;s.append("file",o.file);const{data:u}=await this.uploadFileClient.post("",s,{headers:{"Content-Type":"multipart/form-data"},...a});return u},this.vote=async o=>await this.client.POST("/backend/widget/v2/chat/vote",{body:o}),this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Cf={exports:{}};Cf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",b="[object Number]",g="[object Null]",x="[object Object]",w="[object Promise]",T="[object Proxy]",C="[object RegExp]",_="[object Set]",A="[object String]",I="[object Symbol]",U="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",X="[object Float32Array]",Y="[object Float64Array]",ne="[object Int8Array]",re="[object Int16Array]",ee="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",k="[object Uint16Array]",ie="[object Uint32Array]",pe=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,Ie=/^(?:0|[1-9]\d*)$/,me={};me[X]=me[Y]=me[ne]=me[re]=me[ee]=me[F]=me[B]=me[k]=me[ie]=!0,me[s]=me[u]=me[$]=me[c]=me[H]=me[d]=me[f]=me[p]=me[y]=me[b]=me[x]=me[C]=me[_]=me[A]=me[P]=!1;var ve=typeof Ea=="object"&&Ea&&Ea.Object===Object&&Ea,Ve=typeof self=="object"&&self&&self.Object===Object&&self,He=ve||Ve||Function("return this")(),$e=t&&!t.nodeType&&t,qe=$e&&!0&&e&&!e.nodeType&&e,Tt=qe&&qe.exports===$e,Ee=Tt&&ve.process,we=function(){try{return Ee&&Ee.binding&&Ee.binding("util")}catch{}}(),We=we&&we.isTypedArray;function Ue(R,L){for(var W=-1,ue=R==null?0:R.length,rt=0,Ne=[];++W<ue;){var vt=R[W];L(vt,W,R)&&(Ne[rt++]=vt)}return Ne}function gt(R,L){for(var W=-1,ue=L.length,rt=R.length;++W<ue;)R[rt+W]=L[W];return R}function yt(R,L){for(var W=-1,ue=R==null?0:R.length;++W<ue;)if(L(R[W],W,R))return!0;return!1}function Ge(R,L){for(var W=-1,ue=Array(R);++W<R;)ue[W]=L(W);return ue}function Me(R){return function(L){return R(L)}}function It(R,L){return R.has(L)}function ko(R,L){return R==null?void 0:R[L]}function Ro(R){var L=-1,W=Array(R.size);return R.forEach(function(ue,rt){W[++L]=[rt,ue]}),W}function No(R,L){return function(W){return R(L(W))}}function te(R){var L=-1,W=Array(R.size);return R.forEach(function(ue){W[++L]=ue}),W}var ce=Array.prototype,j=Function.prototype,q=Object.prototype,le=He["__core-js_shared__"],Te=j.toString,be=q.hasOwnProperty,Bt=function(){var R=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),An=q.toString,hn=RegExp("^"+Te.call(be).replace(pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wn=Tt?He.Buffer:void 0,kn=He.Symbol,At=He.Uint8Array,Yn=q.propertyIsEnumerable,mn=ce.splice,Si=kn?kn.toStringTag:void 0,gO=Object.getOwnPropertySymbols,Rre=Wn?Wn.isBuffer:void 0,Nre=No(Object.keys,Object),Wv=Zs(He,"DataView"),pc=Zs(He,"Map"),Yv=Zs(He,"Promise"),qv=Zs(He,"Set"),Gv=Zs(He,"WeakMap"),hc=Zs(Object,"create"),Pre=wa(Wv),Ire=wa(pc),Ore=wa(Yv),Dre=wa(qv),Lre=wa(Gv),yO=kn?kn.prototype:void 0,Kv=yO?yO.valueOf:void 0;function va(R){var L=-1,W=R==null?0:R.length;for(this.clear();++L<W;){var ue=R[L];this.set(ue[0],ue[1])}}function Mre(){this.__data__=hc?hc(null):{},this.size=0}function Fre(R){var L=this.has(R)&&delete this.__data__[R];return this.size-=L?1:0,L}function Bre(R){var L=this.__data__;if(hc){var W=L[R];return W===r?void 0:W}return be.call(L,R)?L[R]:void 0}function jre(R){var L=this.__data__;return hc?L[R]!==void 0:be.call(L,R)}function Ure(R,L){var W=this.__data__;return this.size+=this.has(R)?0:1,W[R]=hc&&L===void 0?r:L,this}va.prototype.clear=Mre,va.prototype.delete=Fre,va.prototype.get=Bre,va.prototype.has=jre,va.prototype.set=Ure;function Ai(R){var L=-1,W=R==null?0:R.length;for(this.clear();++L<W;){var ue=R[L];this.set(ue[0],ue[1])}}function zre(){this.__data__=[],this.size=0}function Hre(R){var L=this.__data__,W=nh(L,R);if(W<0)return!1;var ue=L.length-1;return W==ue?L.pop():mn.call(L,W,1),--this.size,!0}function Vre(R){var L=this.__data__,W=nh(L,R);return W<0?void 0:L[W][1]}function $re(R){return nh(this.__data__,R)>-1}function Wre(R,L){var W=this.__data__,ue=nh(W,R);return ue<0?(++this.size,W.push([R,L])):W[ue][1]=L,this}Ai.prototype.clear=zre,Ai.prototype.delete=Hre,Ai.prototype.get=Vre,Ai.prototype.has=$re,Ai.prototype.set=Wre;function xa(R){var L=-1,W=R==null?0:R.length;for(this.clear();++L<W;){var ue=R[L];this.set(ue[0],ue[1])}}function Yre(){this.size=0,this.__data__={hash:new va,map:new(pc||Ai),string:new va}}function qre(R){var L=rh(this,R).delete(R);return this.size-=L?1:0,L}function Gre(R){return rh(this,R).get(R)}function Kre(R){return rh(this,R).has(R)}function Xre(R,L){var W=rh(this,R),ue=W.size;return W.set(R,L),this.size+=W.size==ue?0:1,this}xa.prototype.clear=Yre,xa.prototype.delete=qre,xa.prototype.get=Gre,xa.prototype.has=Kre,xa.prototype.set=Xre;function th(R){var L=-1,W=R==null?0:R.length;for(this.__data__=new xa;++L<W;)this.add(R[L])}function Qre(R){return this.__data__.set(R,r),this}function Zre(R){return this.__data__.has(R)}th.prototype.add=th.prototype.push=Qre,th.prototype.has=Zre;function Po(R){var L=this.__data__=new Ai(R);this.size=L.size}function Jre(){this.__data__=new Ai,this.size=0}function eie(R){var L=this.__data__,W=L.delete(R);return this.size=L.size,W}function tie(R){return this.__data__.get(R)}function nie(R){return this.__data__.has(R)}function rie(R,L){var W=this.__data__;if(W instanceof Ai){var ue=W.__data__;if(!pc||ue.length<n-1)return ue.push([R,L]),this.size=++W.size,this;W=this.__data__=new xa(ue)}return W.set(R,L),this.size=W.size,this}Po.prototype.clear=Jre,Po.prototype.delete=eie,Po.prototype.get=tie,Po.prototype.has=nie,Po.prototype.set=rie;function iie(R,L){var W=ih(R),ue=!W&&xie(R),rt=!W&&!ue&&Xv(R),Ne=!W&&!ue&&!rt&&SO(R),vt=W||ue||rt||Ne,jt=vt?Ge(R.length,String):[],Yt=jt.length;for(var ht in R)be.call(R,ht)&&!(vt&&(ht=="length"||rt&&(ht=="offset"||ht=="parent")||Ne&&(ht=="buffer"||ht=="byteLength"||ht=="byteOffset")||hie(ht,Yt)))&&jt.push(ht);return jt}function nh(R,L){for(var W=R.length;W--;)if(EO(R[W][0],L))return W;return-1}function oie(R,L,W){var ue=L(R);return ih(R)?ue:gt(ue,W(R))}function mc(R){return R==null?R===void 0?U:g:Si&&Si in Object(R)?fie(R):vie(R)}function vO(R){return gc(R)&&mc(R)==s}function xO(R,L,W,ue,rt){return R===L?!0:R==null||L==null||!gc(R)&&!gc(L)?R!==R&&L!==L:aie(R,L,W,ue,xO,rt)}function aie(R,L,W,ue,rt,Ne){var vt=ih(R),jt=ih(L),Yt=vt?u:Io(R),ht=jt?u:Io(L);Yt=Yt==s?x:Yt,ht=ht==s?x:ht;var qn=Yt==x,Rr=ht==x,an=Yt==ht;if(an&&Xv(R)){if(!Xv(L))return!1;vt=!0,qn=!1}if(an&&!qn)return Ne||(Ne=new Po),vt||SO(R)?wO(R,L,W,ue,rt,Ne):cie(R,L,Yt,W,ue,rt,Ne);if(!(W&i)){var lr=qn&&be.call(R,"__wrapped__"),cr=Rr&&be.call(L,"__wrapped__");if(lr||cr){var Oo=lr?R.value():R,ki=cr?L.value():L;return Ne||(Ne=new Po),rt(Oo,ki,W,ue,Ne)}}return an?(Ne||(Ne=new Po),die(R,L,W,ue,rt,Ne)):!1}function sie(R){if(!CO(R)||gie(R))return!1;var L=TO(R)?hn:D;return L.test(wa(R))}function uie(R){return gc(R)&&_O(R.length)&&!!me[mc(R)]}function lie(R){if(!yie(R))return Nre(R);var L=[];for(var W in Object(R))be.call(R,W)&&W!="constructor"&&L.push(W);return L}function wO(R,L,W,ue,rt,Ne){var vt=W&i,jt=R.length,Yt=L.length;if(jt!=Yt&&!(vt&&Yt>jt))return!1;var ht=Ne.get(R);if(ht&&Ne.get(L))return ht==L;var qn=-1,Rr=!0,an=W&o?new th:void 0;for(Ne.set(R,L),Ne.set(L,R);++qn<jt;){var lr=R[qn],cr=L[qn];if(ue)var Oo=vt?ue(cr,lr,qn,L,R,Ne):ue(lr,cr,qn,R,L,Ne);if(Oo!==void 0){if(Oo)continue;Rr=!1;break}if(an){if(!yt(L,function(ki,ba){if(!It(an,ba)&&(lr===ki||rt(lr,ki,W,ue,Ne)))return an.push(ba)})){Rr=!1;break}}else if(!(lr===cr||rt(lr,cr,W,ue,Ne))){Rr=!1;break}}return Ne.delete(R),Ne.delete(L),Rr}function cie(R,L,W,ue,rt,Ne,vt){switch(W){case H:if(R.byteLength!=L.byteLength||R.byteOffset!=L.byteOffset)return!1;R=R.buffer,L=L.buffer;case $:return!(R.byteLength!=L.byteLength||!Ne(new At(R),new At(L)));case c:case d:case b:return EO(+R,+L);case f:return R.name==L.name&&R.message==L.message;case C:case A:return R==L+"";case y:var jt=Ro;case _:var Yt=ue&i;if(jt||(jt=te),R.size!=L.size&&!Yt)return!1;var ht=vt.get(R);if(ht)return ht==L;ue|=o,vt.set(R,L);var qn=wO(jt(R),jt(L),ue,rt,Ne,vt);return vt.delete(R),qn;case I:if(Kv)return Kv.call(R)==Kv.call(L)}return!1}function die(R,L,W,ue,rt,Ne){var vt=W&i,jt=bO(R),Yt=jt.length,ht=bO(L),qn=ht.length;if(Yt!=qn&&!vt)return!1;for(var Rr=Yt;Rr--;){var an=jt[Rr];if(!(vt?an in L:be.call(L,an)))return!1}var lr=Ne.get(R);if(lr&&Ne.get(L))return lr==L;var cr=!0;Ne.set(R,L),Ne.set(L,R);for(var Oo=vt;++Rr<Yt;){an=jt[Rr];var ki=R[an],ba=L[an];if(ue)var AO=vt?ue(ba,ki,an,L,R,Ne):ue(ki,ba,an,R,L,Ne);if(!(AO===void 0?ki===ba||rt(ki,ba,W,ue,Ne):AO)){cr=!1;break}Oo||(Oo=an=="constructor")}if(cr&&!Oo){var oh=R.constructor,ah=L.constructor;oh!=ah&&"constructor"in R&&"constructor"in L&&!(typeof oh=="function"&&oh instanceof oh&&typeof ah=="function"&&ah instanceof ah)&&(cr=!1)}return Ne.delete(R),Ne.delete(L),cr}function bO(R){return oie(R,Eie,pie)}function rh(R,L){var W=R.__data__;return mie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Zs(R,L){var W=ko(R,L);return sie(W)?W:void 0}function fie(R){var L=be.call(R,Si),W=R[Si];try{R[Si]=void 0;var ue=!0}catch{}var rt=An.call(R);return ue&&(L?R[Si]=W:delete R[Si]),rt}var pie=gO?function(R){return R==null?[]:(R=Object(R),Ue(gO(R),function(L){return Yn.call(R,L)}))}:Tie,Io=mc;(Wv&&Io(new Wv(new ArrayBuffer(1)))!=H||pc&&Io(new pc)!=y||Yv&&Io(Yv.resolve())!=w||qv&&Io(new qv)!=_||Gv&&Io(new Gv)!=P)&&(Io=function(R){var L=mc(R),W=L==x?R.constructor:void 0,ue=W?wa(W):"";if(ue)switch(ue){case Pre:return H;case Ire:return y;case Ore:return w;case Dre:return _;case Lre:return P}return L});function hie(R,L){return L=L??a,!!L&&(typeof R=="number"||Ie.test(R))&&R>-1&&R%1==0&&R<L}function mie(R){var L=typeof R;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?R!=="__proto__":R===null}function gie(R){return!!Bt&&Bt in R}function yie(R){var L=R&&R.constructor,W=typeof L=="function"&&L.prototype||q;return R===W}function vie(R){return An.call(R)}function wa(R){if(R!=null){try{return Te.call(R)}catch{}try{return R+""}catch{}}return""}function EO(R,L){return R===L||R!==R&&L!==L}var xie=vO(function(){return arguments}())?vO:function(R){return gc(R)&&be.call(R,"callee")&&!Yn.call(R,"callee")},ih=Array.isArray;function wie(R){return R!=null&&_O(R.length)&&!TO(R)}var Xv=Rre||_ie;function bie(R,L){return xO(R,L)}function TO(R){if(!CO(R))return!1;var L=mc(R);return L==p||L==m||L==l||L==T}function _O(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=a}function CO(R){var L=typeof R;return R!=null&&(L=="object"||L=="function")}function gc(R){return R!=null&&typeof R=="object"}var SO=We?Me(We):uie;function Eie(R){return wie(R)?iie(R):lie(R)}function Tie(){return[]}function _ie(){return!1}e.exports=bie}(Cf,Cf.exports);var c7=Cf.exports;const d7=yc(c7);class hs{constructor(t){this.subscribers=new Set,this.get=()=>this.state,this.set=n=>{d7(this.state,n)||(this.state=n,this.notifySubscribers(n))},this.setPartial=n=>{if(n==null)return;const r={...this.state,...n};this.set(r)},this.reset=()=>{this.set(this.initialState)},this.notifySubscribers=n=>{Array.from(this.subscribers).forEach(i=>{try{i(n)}catch(o){console.error(o)}})},this.subscribe=n=>(this.subscribers.add(n),()=>{this.subscribers.delete(n)}),this.state=t,this.initialState=t}}class xS{constructor(){this.state=new hs({isPolling:!1,isError:!1}),this.abortController=new AbortController,this.reset=()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null},this.stopPolling=null,this.startPolling=(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(o){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",o),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}}}}class f7{constructor({api:t,config:n,sessionCtx:r,messageCtx:i,sessionPollingIntervalSeconds:o}){this.poller=new xS,this.registerPolling=()=>{this.sessionCtx.sessionState.subscribe(({session:a})=>{a!=null&&a.id?this.poller.startPolling(async s=>{this.hackAndSlash(a.id,s)},this.sessionPollingIntervalSeconds*1e3):this.poller.reset()})},this.hackAndSlash=async(a,s)=>{var d;this.messageCtx.state.get().messages.length===0&&this.messageCtx.state.setPartial({isInitialFetchLoading:!0});const u=this.messageCtx.state.get().messages,l=u.length>0?(d=u[u.length-1])==null?void 0:d.timestamp:void 0,{data:c}=await this.api.pollSessionAndHistory({sessionId:a,abortSignal:s,lastMessageTimestamp:l});if(c!=null&&c.session&&this.sessionCtx.sessionState.setPartial({session:c.session}),c!=null&&c.history&&c.history.length>0){const f=this.messageCtx.state.get().messages,p=c.history.map(this.mapHistoryToMessage).filter(m=>!f.some(y=>y.id===m.id));this.messageCtx.state.setPartial({messages:[...f,...p]})}this.messageCtx.state.get().isInitialFetchLoading&&this.messageCtx.state.setPartial({isInitialFetchLoading:!1})},this.mapHistoryToMessage=a=>{var l,c;const s={id:a.publicId,timestamp:a.sentAt||"",attachments:a.attachments||void 0};if(a.sender.kind==="user")return{...s,type:"FROM_USER",content:a.content.text||"",deliveredAt:a.sentAt||""};if(a.sender.kind==="agent")return{...s,type:"FROM_AGENT",component:"agent_message",data:{message:a.content.text||""},agent:{name:a.sender.name||"",avatar:a.sender.avatar||"",id:null,isAi:!1}};const u=a.actionCalls&&a.actionCalls.length>0?a.actionCalls[a.actionCalls.length-1]:void 0;return{...s,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((l=this.config.bot)==null?void 0:l.name)||"",isAi:!0,avatar:((c=this.config.bot)==null?void 0:c.avatar)||""},data:{message:a.content.text||"",action:u?{name:u.actionName,data:u.result}:void 0}}},this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=i,this.sessionPollingIntervalSeconds=o,this.registerPolling()}}const Wt=[];for(let e=0;e<256;++e)Wt.push((e+256).toString(16).slice(1));function p7(e,t=0){return(Wt[e[t+0]]+Wt[e[t+1]]+Wt[e[t+2]]+Wt[e[t+3]]+"-"+Wt[e[t+4]]+Wt[e[t+5]]+"-"+Wt[e[t+6]]+Wt[e[t+7]]+"-"+Wt[e[t+8]]+Wt[e[t+9]]+"-"+Wt[e[t+10]]+Wt[e[t+11]]+Wt[e[t+12]]+Wt[e[t+13]]+Wt[e[t+14]]+Wt[e[t+15]]).toLowerCase()}let uy;const h7=new Uint8Array(16);function m7(){if(!uy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");uy=crypto.getRandomValues.bind(crypto)}return uy(h7)}const wS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ly(e,t,n){var i;if(wS.randomUUID&&!t&&!e)return wS.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??m7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,p7(r)}class g7{constructor({config:t,api:n,storageCtx:r}){var i;this.shouldCollectData=()=>{var o;return!!(!((o=this.state.get().contact)!=null&&o.token)&&this.config.collectUserData)},this.autoCreateUnverifiedUserIfNotExists=async()=>{var o,a,s,u,l,c,d,f,p,m,y,b;if(!((o=this.config.user)!=null&&o.token)){if(this.config.collectUserData&&!((s=(a=this.config.user)==null?void 0:a.data)!=null&&s.email)){if((u=this.config.extraDataCollectionFields)!=null&&u.length)return;const g=await((l=this.storageCtx)==null?void 0:l.getContactToken());g&&await this.setUnverifiedContact(g);return}if(!((d=(c=this.config.user)==null?void 0:c.data)!=null&&d.email)){const g=await((f=this.storageCtx)==null?void 0:f.getContactToken());if(g){await this.setUnverifiedContact(g);return}}await this.createUnverifiedContact({name:((m=(p=this.config.user)==null?void 0:p.data)==null?void 0:m.name)||"Anonymous",email:(b=(y=this.config.user)==null?void 0:y.data)==null?void 0:b.email})}},this.createUnverifiedContact=async(o,a)=>{this.state.setPartial({extraCollectedData:a});try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:s}=await this.api.createUnverifiedContact(o);s!=null&&s.token?await this.setUnverifiedContact(s.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}},this.setUnverifiedContact=async o=>{var u,l,c,d;const a=await((u=this.storageCtx)==null?void 0:u.getExternalContactId()),s=((l=this.config.user)==null?void 0:l.externalId)||a||ly();this.api.setAuthToken(o),await((c=this.storageCtx)==null?void 0:c.setContactToken(o)),await((d=this.storageCtx)==null?void 0:d.setExternalContactId(s)),this.state.setPartial({contact:{token:o,externalId:s}})},this.config=t,this.storageCtx=r,this.api=n,this.state=new hs({contact:(i=t.user)!=null&&i.token?{token:t.user.token,externalId:t.user.externalId}:null,extraCollectedData:void 0,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function cy(){return ly()}class y7{constructor({api:t,contactCtx:n,sessionsPollingIntervalSeconds:r}){this.sessionsRefresher=new xS,this.sessionState=new hs({session:null,isCreatingSession:!1}),this.sessionsState=new hs({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}),this.reset=async()=>{this.sessionState.reset()},this.registerSessionsRefresherWrapper=()=>{var i;(i=this.contactCtx.state.get().contact)!=null&&i.token&&!this.sessionsState.get().didStartInitialFetch?this.registerSessionsRefresher():this.contactCtx.state.subscribe(({contact:o})=>{o!=null&&o.token&&!this.sessionsState.get().didStartInitialFetch&&this.registerSessionsRefresher()})},this.registerSessionsRefresher=()=>{this.sessionsRefresher.startPolling(async()=>{this.sessionsState.get().didStartInitialFetch===!1&&this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.refreshSessions(),this.sessionsState.get().isInitialFetchLoading===!0&&this.sessionsState.setPartial({isInitialFetchLoading:!1})},this.sessionsPollingIntervalSeconds*1e3)},this.createSession=async()=>{var s;this.sessionState.setPartial({session:null,isCreatingSession:!0});const i=(s=this.contactCtx.state.get().contact)==null?void 0:s.externalId,{data:o,error:a}=await this.api.createSession({customData:i?{external_id:i}:void 0});return o?(this.sessionState.setPartial({session:o,isCreatingSession:!1}),o):(console.error("Failed to create session:",a),null)},this.loadMoreSessions=async()=>{if(this.sessionsState.get().isLastPage)return;const{data:i}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(i){const a=[...this.sessionsState.get().data,...i.items].filter((s,u,l)=>u===l.findIndex(c=>s.id===c.id));this.sessionsState.setPartial({data:a,cursor:i.next||void 0,isLastPage:i.next===null})}},this.getSessions=async({cursor:i})=>{var a,s;if(!((a=this.contactCtx.state.get().contact)!=null&&a.token))return{data:null};const o=(s=this.contactCtx.state.get().contact)==null?void 0:s.externalId;return await this.api.getSessions({cursor:i,filters:o?{external_id:o}:{}})},this.refreshSessions=async()=>{const{data:i}=await this.getSessions({cursor:void 0});if(!i)return;const o=[...i.items,...this.sessionsState.get().data].filter((a,s,u)=>s===u.findIndex(l=>a.id===l.id));this.sessionsState.setPartial({data:o})},this.api=t,this.contactCtx=n,this.sessionsPollingIntervalSeconds=r,this.registerSessionsRefresherWrapper()}}class v7{constructor({config:t,api:n,sessionCtx:r,contactCtx:i}){this.state=new hs({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}),this.sendMessageAbortController=new AbortController,this.reset=()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()},this.sendMessage=async o=>{var c,d,f,p,m,y,b,g,x;if(!o.content.trim()&&(!o.attachments||o.attachments.length===0)){console.warn("Cannot send an empty message of no content or attachments");return}const a=this.state.get().isSendingMessage,s=((c=this.sessionCtx.sessionState.get().session)==null?void 0:c.assignee.kind)==="ai",u=this.state.get().messages,l=u.length>0?u[u.length-1]:void 0;if(s&&a||s&&(l==null?void 0:l.type)==="FROM_USER"){console.warn("Cannot send messages while awaiting AI response");return}this.sendMessageAbortController=new AbortController,this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const w=this.toUserMessage(o.content.trim(),o.attachments||void 0),T=this.state.get().messages;if(this.state.setPartial({messages:[...T,w]}),!((d=this.sessionCtx.sessionState.get().session)!=null&&d.id)){if(!await this.sessionCtx.createSession()){console.error("Failed to create session");return}this.sessionCtx.refreshSessions()}const C=(f=this.sessionCtx.sessionState.get().session)==null?void 0:f.id;if(!C)return;const{data:_}=await this.api.sendMessage({uuid:w.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:C,user:(p=this.config.user)==null?void 0:p.data,content:w.content,attachments:o.attachments,clientContext:this.config.context},this.sendMessageAbortController.signal);if(_!=null&&_.success){const A=this.toBotMessage(_);if(A){const I=this.state.get().messages;if(!!I.some(P=>P.id===A.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((m=_.autopilotResponse)==null?void 0:m.mightSolveUserIssue)||((y=_.uiResponse)==null?void 0:y.mightSolveUserIssue)});return}this.state.setPartial({messages:[...I,A],lastAIResMightSolveUserIssue:((b=_.autopilotResponse)==null?void 0:b.mightSolveUserIssue)||((g=_.uiResponse)==null?void 0:g.mightSolveUserIssue)})}}else{const A=this.toBotErrorMessage(((x=_==null?void 0:_.error)==null?void 0:x.message)||"Unknown error occurred"),I=this.state.get().messages;this.state.setPartial({messages:[...I,A]})}}catch(w){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",w)}finally{this.state.setPartial({isSendingMessage:!1})}},this.toUserMessage=(o,a)=>{const s=(()=>{const u=this.contactCtx.state.get().extraCollectedData;return this.state.get().messages.length===0&&u&&Object.keys(u).length>0?`${Object.entries(u).filter(([c,d])=>!!d).map(([c,d])=>`${c}: ${d}`).join(`
|
|
339
339
|
`)}
|
|
340
340
|
|
|
341
341
|
${o}`:o})();return{id:cy(),type:"FROM_USER",content:s,deliveredAt:new Date().toISOString(),attachments:a,timestamp:new Date().toISOString()}},this.toBotMessage=o=>{var a;return o.success&&o.autopilotResponse?{type:"FROM_BOT",id:o.autopilotResponse.id||cy(),timestamp:new Date().toISOString(),component:"bot_message",agent:this.config.bot?{name:this.config.bot.name||"",isAi:!0,avatar:this.config.bot.avatar||"",id:null}:void 0,data:{message:o.autopilotResponse.value.content,action:(a=o.uiResponse)!=null&&a.value.name?{name:o.uiResponse.value.name,data:o.uiResponse.value.request_response}:void 0}}:null},this.toBotErrorMessage=o=>({type:"FROM_BOT",id:cy(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:o,variant:"error",action:void 0}}),this.config=t,this.api=n,this.sessionCtx=r,this.contactCtx=i}}class x7{constructor({config:t,contactCtx:n,sessionCtx:r,resetChat:i}){this.registerRoutingListener=()=>{this.contactCtx.state.subscribe(({contact:o})=>{o!=null&&o.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})}),this.sessionCtx.sessionsState.subscribe(({isInitialFetchLoading:o,data:a})=>{var s;a.length||((s=this.config.router)==null?void 0:s.goToChatIfNoSessions)!==!1&&!o&&this.state.get().screen!=="chat"&&this.toChatScreen()})},this.toSessionsScreen=()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})},this.toChatScreen=o=>{if(this.resetChat(),o){const a=this.sessionCtx.sessionsState.get().data.find(s=>s.id===o);if(!a)return;this.sessionCtx.sessionState.setPartial({session:a})}this.state.setPartial({screen:"chat"})},this.state=new hs({screen:n.shouldCollectData()?"welcome":"sessions"}),this.config=t,this.contactCtx=n,this.sessionCtx=r,this.resetChat=i,this.registerRoutingListener()}}class w7{constructor({storage:t}){this.KEYS={contactToken:"opencx__widget__contactToken",externalContactId:"opencx__widget__externalContactId"},this.setContactToken=async n=>{await this.storage.set(this.KEYS.contactToken,n)},this.getContactToken=async()=>this.storage.get(this.KEYS.contactToken),this.setExternalContactId=async n=>{await this.storage.set(this.KEYS.externalContactId,n)},this.getExternalContactId=async()=>this.storage.get(this.KEYS.externalContactId),this.storage=t}}const Ci=class Ci{constructor({config:t,storage:n}){if(this.resetChat=()=>{this.sessionCtx.reset(),this.messageCtx.reset()},!Ci.pollingIntervalsSeconds)throw Error("Widget polling values are not defined, did you call WidgetCtx.initialize()");this.config=t,this.api=new vS({config:t}),this.storageCtx=n?new w7({storage:n}):void 0,this.contactCtx=new g7({api:this.api,config:this.config,storageCtx:this.storageCtx}),this.sessionCtx=new y7({api:this.api,contactCtx:this.contactCtx,sessionsPollingIntervalSeconds:Ci.pollingIntervalsSeconds.sessions}),this.messageCtx=new v7({config:this.config,api:this.api,sessionCtx:this.sessionCtx,contactCtx:this.contactCtx}),this.activeSessionPollingCtx=new f7({api:this.api,config:this.config,sessionCtx:this.sessionCtx,messageCtx:this.messageCtx,sessionPollingIntervalSeconds:Ci.pollingIntervalsSeconds.session}),this.routerCtx=new x7({config:this.config,contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}};Ci.pollingIntervalsSeconds=null,Ci.initialize=async({config:t,storage:n})=>{var i,o;const r=await new vS({config:t}).getExternalWidgetConfig();return Ci.pollingIntervalsSeconds={session:((i=r.data)==null?void 0:i.sessionPollingIntervalSeconds)||10,sessions:((o=r.data)==null?void 0:o.sessionsPollingIntervalSeconds)||60},new Ci({config:t,storage:n})};let dy=Ci;const[nr,b7]=NB();function E7({options:e,children:t,components:n,storage:r}){const i=v.useRef(!1),[o,a]=v.useState(null),s=v.useMemo(()=>new RB({components:n}),[n]);return v.useEffect(()=>{i.current||(i.current=!0,dy.initialize({config:e,storage:r}).then(a))},[]),o?E.jsx(b7,{value:{widgetCtx:o,components:n,componentStore:s,version:xE},children:t}):null}function ms(){const{widgetCtx:e}=nr();return e.config}function fl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function T7(){const{widgetCtx:e}=nr();return{contactState:fl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function gs(){const{widgetCtx:e}=nr();return{messagesState:fl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function pl(){const{widgetCtx:e}=nr(),t=fl(e.sessionCtx.sessionState),n=fl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n,loadMoreSessions:e.sessionCtx.loadMoreSessions}}function bS(){var a;const{sessionState:e}=pl(),{messagesState:t}=gs(),n=((a=e.session)==null?void 0:a.assignee.kind)==="ai",r=t.messages.length>0?t.messages[t.messages.length-1]:null,i=(r==null?void 0:r.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||i)}}var ES={exports:{}},TS={};/**
|