function Wy(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sp={exports:{}},vs={},Tp={exports:{}},B={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Io=Symbol.for("react.element"),Gy=Symbol.for("react.portal"),Ky=Symbol.for("react.fragment"),Yy=Symbol.for("react.strict_mode"),Qy=Symbol.for("react.profiler"),Xy=Symbol.for("react.provider"),qy=Symbol.for("react.context"),Zy=Symbol.for("react.forward_ref"),Jy=Symbol.for("react.suspense"),e0=Symbol.for("react.memo"),t0=Symbol.for("react.lazy"),_c=Symbol.iterator;function n0(e){return e===null||typeof e!="object"?null:(e=_c&&e[_c]||e["@@iterator"],typeof e=="function"?e:null)}var Cp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pp=Object.assign,Ep={};function br(e,t,n){this.props=e,this.context=t,this.refs=Ep,this.updater=n||Cp}br.prototype.isReactComponent={};br.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function kp(){}kp.prototype=br.prototype;function cu(e,t,n){this.props=e,this.context=t,this.refs=Ep,this.updater=n||Cp}var du=cu.prototype=new kp;du.constructor=cu;Pp(du,br.prototype);du.isPureReactComponent=!0;var Vc=Array.isArray,bp=Object.prototype.hasOwnProperty,fu={current:null},Np={key:!0,ref:!0,__self:!0,__source:!0};function Rp(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)bp.call(t,r)&&!Np.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,$=N[I];if(0>>1;Io(Wn,F))Ke<$&&0>o(yn,Wn)?(N[I]=yn,N[Ke]=F,I=Ke):(N[I]=Wn,N[Ge]=F,I=Ge);else if(Ke<$&&0>o(yn,F))N[I]=yn,N[Ke]=F,I=Ke;else break e}}return L}function o(N,L){var F=N.sortIndex-L.sortIndex;return F!==0?F:N.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],d=1,c=null,f=3,m=!1,x=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(N){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=N)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function T(N){if(y=!1,g(N),!x)if(n(l)!==null)x=!0,O(P);else{var L=n(u);L!==null&&Y(T,L.startTime-N)}}function P(N,L){x=!1,y&&(y=!1,v(k),k=-1),m=!0;var F=f;try{for(g(L),c=n(l);c!==null&&(!(c.expirationTime>L)||N&&!V());){var I=c.callback;if(typeof I=="function"){c.callback=null,f=c.priorityLevel;var $=I(c.expirationTime<=L);L=e.unstable_now(),typeof $=="function"?c.callback=$:c===n(l)&&r(l),g(L)}else r(l);c=n(l)}if(c!==null)var q=!0;else{var Ge=n(u);Ge!==null&&Y(T,Ge.startTime-L),q=!1}return q}finally{c=null,f=F,m=!1}}var C=!1,E=null,k=-1,M=5,R=-1;function V(){return!(e.unstable_now()-RN||125I?(N.sortIndex=F,t(u,N),n(l)===null&&N===n(u)&&(y?(v(k),k=-1):y=!0,Y(T,F-I))):(N.sortIndex=$,t(l,N),x||m||(x=!0,O(P))),N},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(N){var L=f;return function(){var F=f;f=L;try{return N.apply(this,arguments)}finally{f=F}}}})(Dp);Lp.exports=Dp;var p0=Lp.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var h0=w,qe=p0;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fa=Object.prototype.hasOwnProperty,m0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zc={},Bc={};function g0(e){return Fa.call(Bc,e)?!0:Fa.call(zc,e)?!1:m0.test(e)?Bc[e]=!0:(zc[e]=!0,!1)}function v0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function y0(e,t,n,r){if(t===null||typeof t>"u"||v0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _e(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new _e(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new _e(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new _e(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new _e(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ee[e]=new _e(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new _e(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new _e(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new _e(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new _e(e,5,!1,e.toLowerCase(),null,!1,!1)});var mu=/[\-:]([a-z])/g;function gu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mu,gu);Ee[t]=new _e(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mu,gu);Ee[t]=new _e(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mu,gu);Ee[t]=new _e(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new _e(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new _e("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new _e(e,1,!1,e.toLowerCase(),null,!0,!0)});function vu(e,t,n,r){var o=Ee.hasOwnProperty(t)?Ee[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{qs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Kr(e):""}function x0(e){switch(e.tag){case 5:return Kr(e.type);case 16:return Kr("Lazy");case 13:return Kr("Suspense");case 19:return Kr("SuspenseList");case 0:case 2:case 15:return e=Zs(e.type,!1),e;case 11:return e=Zs(e.type.render,!1),e;case 1:return e=Zs(e.type,!0),e;default:return""}}function $a(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 Qn:return"Fragment";case Yn:return"Portal";case za:return"Profiler";case yu:return"StrictMode";case Ba:return"Suspense";case Ua:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _p:return(e.displayName||"Context")+".Consumer";case Op:return(e._context.displayName||"Context")+".Provider";case xu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wu:return t=e.displayName||null,t!==null?t:$a(e.type)||"Memo";case Ht:t=e._payload,e=e._init;try{return $a(e(t))}catch{}}return null}function w0(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 $a(t);case 8:return t===yu?"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 un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function S0(e){var t=Fp(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xo(e){e._valueTracker||(e._valueTracker=S0(e))}function zp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Oi(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 Ha(e,t){var n=t.checked;return ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $c(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=un(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 Bp(e,t){t=t.checked,t!=null&&vu(e,"checked",t,!1)}function Wa(e,t){Bp(e,t);var n=un(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")?Ga(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ga(e,t.type,un(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hc(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 Ga(e,t,n){(t!=="number"||Oi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yr=Array.isArray;function cr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=qo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function po(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zr={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},T0=["Webkit","ms","Moz","O"];Object.keys(Zr).forEach(function(e){T0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zr[t]=Zr[e]})});function Wp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zr.hasOwnProperty(e)&&Zr[e]?(""+t).trim():t+"px"}function Gp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Wp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var C0=ce({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 Qa(e,t){if(t){if(C0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(b(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(b(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(b(61))}if(t.style!=null&&typeof t.style!="object")throw Error(b(62))}}function Xa(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 qa=null;function Su(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Za=null,dr=null,fr=null;function Kc(e){if(e=Vo(e)){if(typeof Za!="function")throw Error(b(280));var t=e.stateNode;t&&(t=Ts(t),Za(e.stateNode,e.type,t))}}function Kp(e){dr?fr?fr.push(e):fr=[e]:dr=e}function Yp(){if(dr){var e=dr,t=fr;if(fr=dr=null,Kc(e),t)for(e=0;e>>=0,e===0?32:31-(D0(e)/I0|0)|0}var Zo=64,Jo=4194304;function Qr(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 zi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Qr(a):(i&=s,i!==0&&(r=Qr(i)))}else s=n&~o,s!==0?r=Qr(s):i!==0&&(r=Qr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Oo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function F0(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=eo),nd=String.fromCharCode(32),rd=!1;function hh(e,t){switch(e){case"keyup":return px.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function mx(e,t){switch(e){case"compositionend":return mh(t);case"keypress":return t.which!==32?null:(rd=!0,nd);case"textInput":return e=t.data,e===nd&&rd?null:e;default:return null}}function gx(e,t){if(Xn)return e==="compositionend"||!Ru&&hh(e,t)?(e=fh(),Si=ku=Qt=null,Xn=!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)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=ad(n)}}function xh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wh(){for(var e=window,t=Oi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Oi(e.document)}return t}function ju(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 Ex(e){var t=wh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xh(n.ownerDocument.documentElement,n)){if(r!==null&&ju(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ld(n,i);var s=ld(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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=document.documentMode,qn=null,ol=null,no=null,il=!1;function ud(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;il||qn==null||qn!==Oi(r)||(r=qn,"selectionStart"in r&&ju(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}),no&&xo(no,r)||(no=r,r=$i(ol,"onSelect"),0er||(e.current=dl[er],dl[er]=null,er--)}function Z(e,t){er++,dl[er]=e.current,e.current=t}var cn={},je=mn(cn),Be=mn(!1),Dn=cn;function yr(e,t){var n=e.type.contextTypes;if(!n)return cn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ue(e){return e=e.childContextTypes,e!=null}function Wi(){te(Be),te(je)}function gd(e,t,n){if(je.current!==cn)throw Error(b(168));Z(je,t),Z(Be,n)}function Rh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(b(108,w0(e)||"Unknown",o));return ce({},n,r)}function Gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,Dn=je.current,Z(je,e),Z(Be,Be.current),!0}function vd(e,t,n){var r=e.stateNode;if(!r)throw Error(b(169));n?(e=Rh(e,t,Dn),r.__reactInternalMemoizedMergedChildContext=e,te(Be),te(je),Z(je,e)):te(Be),Z(Be,n)}var Nt=null,Cs=!1,fa=!1;function jh(e){Nt===null?Nt=[e]:Nt.push(e)}function _x(e){Cs=!0,jh(e)}function gn(){if(!fa&&Nt!==null){fa=!0;var e=0,t=K;try{var n=Nt;for(K=1;e>=s,o-=s,Rt=1<<32-mt(t)+o|n<k?(M=E,E=null):M=E.sibling;var R=f(v,E,g[k],T);if(R===null){E===null&&(E=M);break}e&&E&&R.alternate===null&&t(v,E),h=i(R,h,k),C===null?P=R:C.sibling=R,C=R,E=M}if(k===g.length)return n(v,E),ie&&Sn(v,k),P;if(E===null){for(;kk?(M=E,E=null):M=E.sibling;var V=f(v,E,R.value,T);if(V===null){E===null&&(E=M);break}e&&E&&V.alternate===null&&t(v,E),h=i(V,h,k),C===null?P=V:C.sibling=V,C=V,E=M}if(R.done)return n(v,E),ie&&Sn(v,k),P;if(E===null){for(;!R.done;k++,R=g.next())R=c(v,R.value,T),R!==null&&(h=i(R,h,k),C===null?P=R:C.sibling=R,C=R);return ie&&Sn(v,k),P}for(E=r(v,E);!R.done;k++,R=g.next())R=m(E,v,k,R.value,T),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?k:R.key),h=i(R,h,k),C===null?P=R:C.sibling=R,C=R);return e&&E.forEach(function(D){return t(v,D)}),ie&&Sn(v,k),P}function S(v,h,g,T){if(typeof g=="object"&&g!==null&&g.type===Qn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Qo:e:{for(var P=g.key,C=h;C!==null;){if(C.key===P){if(P=g.type,P===Qn){if(C.tag===7){n(v,C.sibling),h=o(C,g.props.children),h.return=v,v=h;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Ht&&wd(P)===C.type){n(v,C.sibling),h=o(C,g.props),h.ref=Vr(v,C,g),h.return=v,v=h;break e}n(v,C);break}else t(v,C);C=C.sibling}g.type===Qn?(h=An(g.props.children,v.mode,T,g.key),h.return=v,v=h):(T=Ri(g.type,g.key,g.props,null,v.mode,T),T.ref=Vr(v,h,g),T.return=v,v=T)}return s(v);case Yn:e:{for(C=g.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(v,h.sibling),h=o(h,g.children||[]),h.return=v,v=h;break e}else{n(v,h);break}else t(v,h);h=h.sibling}h=wa(g,v.mode,T),h.return=v,v=h}return s(v);case Ht:return C=g._init,S(v,h,C(g._payload),T)}if(Yr(g))return x(v,h,g,T);if(Lr(g))return y(v,h,g,T);si(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(v,h.sibling),h=o(h,g),h.return=v,v=h):(n(v,h),h=xa(g,v.mode,T),h.return=v,v=h),s(v)):n(v,h)}return S}var wr=Dh(!0),Ih=Dh(!1),Qi=mn(null),Xi=null,rr=null,Du=null;function Iu(){Du=rr=Xi=null}function Ou(e){var t=Qi.current;te(Qi),e._currentValue=t}function hl(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 hr(e,t){Xi=e,Du=rr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ze=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(Du!==e)if(e={context:e,memoizedValue:t,next:null},rr===null){if(Xi===null)throw Error(b(308));rr=e,Xi.dependencies={lanes:0,firstContext:e}}else rr=rr.next=e;return t}var kn=null;function _u(e){kn===null?kn=[e]:kn.push(e)}function Oh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,_u(t)):(n.next=o.next,o.next=n),t.interleaved=n,_t(e,r)}function _t(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 Wt=!1;function Vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _h(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 Mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,_t(e,n)}return o=r.interleaved,o===null?(t.next=t,_u(r)):(t.next=o.next,o.next=t),r.interleaved=t,_t(e,n)}function Ci(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,Cu(e,n)}}function Sd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,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 qi(e,t,n,r){var o=e.updateQueue;Wt=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var c=o.baseState;s=0,d=u=l=null,a=i;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,y=a;switch(f=t,m=n,y.tag){case 1:if(x=y.payload,typeof x=="function"){c=x.call(m,c,f);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,f=typeof x=="function"?x.call(m,c,f):x,f==null)break e;c=ce({},c,f);break e;case 2:Wt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,l=c):d=d.next=m,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(1);if(d===null&&(l=c),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);_n|=s,e.lanes=s,e.memoizedState=c}}function Td(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ha.transition;ha.transition={};try{e(!1),t()}finally{K=n,ha.transition=r}}function em(){return lt().memoizedState}function Bx(e,t,n){var r=on(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tm(e))nm(t,n);else if(n=Oh(e,t,n,r),n!==null){var o=Ie();gt(n,e,r,o),rm(n,t,r)}}function Ux(e,t,n){var r=on(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tm(e))nm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,vt(a,s)){var l=t.interleaved;l===null?(o.next=o,_u(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Oh(e,t,o,r),n!==null&&(o=Ie(),gt(n,e,r,o),rm(n,t,r))}}function tm(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function nm(e,t){ro=Ji=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cu(e,n)}}var es={readContext:at,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useInsertionEffect:ke,useLayoutEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useMutableSource:ke,useSyncExternalStore:ke,useId:ke,unstable_isNewReconciler:!1},$x={readContext:at,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Pd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ei(4194308,4,Qh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ei(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ei(4,2,e,t)},useMemo:function(e,t){var n=wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wt();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=Bx.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:Cd,useDebugValue:Gu,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=Cd(!1),t=e[0];return e=zx.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ue,o=wt();if(ie){if(n===void 0)throw Error(b(407));n=n()}else{if(n=t(),Se===null)throw Error(b(349));On&30||Bh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Pd($h.bind(null,r,i,e),[e]),r.flags|=2048,bo(9,Uh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wt(),t=Se.identifierPrefix;if(ie){var n=jt,r=Rt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Eo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[St]=t,e[To]=r,pm(e,t,!1,!1),t.stateNode=e;e:{switch(s=Xa(n,r),n){case"dialog":ee("cancel",e),ee("close",e),o=r;break;case"iframe":case"object":case"embed":ee("load",e),o=r;break;case"video":case"audio":for(o=0;oCr&&(t.flags|=128,r=!0,Fr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Zi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!ie)return be(t),null}else 2*pe()-i.renderingStartTime>Cr&&n!==1073741824&&(t.flags|=128,r=!0,Fr(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=pe(),t.sibling=null,n=ae.current,Z(ae,r?n&1|2:n&1),t):(be(t),null);case 22:case 23:return Zu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ye&1073741824&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(b(156,t.tag))}function qx(e,t){switch(Mu(t),t.tag){case 1:return Ue(t.type)&&Wi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sr(),te(Be),te(je),Bu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zu(t),null;case 13:if(te(ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(b(340));xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ae),null;case 4:return Sr(),null;case 10:return Ou(t.type._context),null;case 22:case 23:return Zu(),null;case 24:return null;default:return null}}var li=!1,Re=!1,Zx=typeof WeakSet=="function"?WeakSet:Set,j=null;function or(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(e,t,r)}else n.current=null}function Cl(e,t,n){try{n()}catch(r){de(e,t,r)}}var Id=!1;function Jx(e,t){if(sl=Bi,e=wh(),ju(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var m;c!==n||o!==0&&c.nodeType!==3||(a=s+o),c!==i||r!==0&&c.nodeType!==3||(l=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(m=c.firstChild)!==null;)f=c,c=m;for(;;){if(c===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++d===r&&(l=s),(m=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(al={focusedElem:e,selectionRange:n},Bi=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var y=x.memoizedProps,S=x.memoizedState,v=t.stateNode,h=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:dt(t.type,y),S);v.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(b(163))}}catch(T){de(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return x=Id,Id=!1,x}function oo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Cl(t,n,i)}o=o.next}while(o!==r)}}function ks(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 Pl(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 gm(e){var t=e.alternate;t!==null&&(e.alternate=null,gm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[To],delete t[cl],delete t[Ix],delete t[Ox])),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 vm(e){return e.tag===5||e.tag===3||e.tag===4}function Od(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vm(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 El(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=Hi));else if(r!==4&&(e=e.child,e!==null))for(El(e,t,n),e=e.sibling;e!==null;)El(e,t,n),e=e.sibling}function kl(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(kl(e,t,n),e=e.sibling;e!==null;)kl(e,t,n),e=e.sibling}var Te=null,ft=!1;function Bt(e,t,n){for(n=n.child;n!==null;)ym(e,t,n),n=n.sibling}function ym(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(ys,n)}catch{}switch(n.tag){case 5:Re||or(n,t);case 6:var r=Te,o=ft;Te=null,Bt(e,t,n),Te=r,ft=o,Te!==null&&(ft?(e=Te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Te.removeChild(n.stateNode));break;case 18:Te!==null&&(ft?(e=Te,n=n.stateNode,e.nodeType===8?da(e.parentNode,n):e.nodeType===1&&da(e,n),vo(e)):da(Te,n.stateNode));break;case 4:r=Te,o=ft,Te=n.stateNode.containerInfo,ft=!0,Bt(e,t,n),Te=r,ft=o;break;case 0:case 11:case 14:case 15:if(!Re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Cl(n,t,s),o=o.next}while(o!==r)}Bt(e,t,n);break;case 1:if(!Re&&(or(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){de(n,t,a)}Bt(e,t,n);break;case 21:Bt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Bt(e,t,n),Re=r):Bt(e,t,n);break;default:Bt(e,t,n)}}function _d(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Zx),t.forEach(function(r){var o=l1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*t1(r/1960))-r,10e?16:e,Xt===null)var r=!1;else{if(e=Xt,Xt=null,rs=0,H&6)throw Error(b(331));var o=H;for(H|=4,j=e.current;j!==null;){var i=j,s=i.child;if(j.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lpe()-Xu?jn(e,0):Qu|=n),$e(e,t)}function km(e,t){t===0&&(e.mode&1?(t=Jo,Jo<<=1,!(Jo&130023424)&&(Jo=4194304)):t=1);var n=Ie();e=_t(e,t),e!==null&&(Oo(e,t,n),$e(e,n))}function a1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),km(e,n)}function l1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(b(314))}r!==null&&r.delete(t),km(e,n)}var bm;bm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Be.current)ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ze=!1,Qx(e,t,n);ze=!!(e.flags&131072)}else ze=!1,ie&&t.flags&1048576&&Ah(t,Yi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ki(e,t),e=t.pendingProps;var o=yr(t,je.current);hr(t,n),o=$u(null,t,r,e,o,n);var i=Hu();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ue(r)?(i=!0,Gi(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Vu(t),o.updater=Es,t.stateNode=o,o._reactInternals=t,gl(t,r,e,n),t=xl(null,t,r,!0,i,n)):(t.tag=0,ie&&i&&Au(t),De(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ki(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=c1(r),e=dt(r,e),o){case 0:t=yl(null,t,r,e,n);break e;case 1:t=Md(null,t,r,e,n);break e;case 11:t=jd(null,t,r,e,n);break e;case 14:t=Ad(null,t,r,dt(r.type,e),n);break e}throw Error(b(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),yl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),Md(e,t,r,o,n);case 3:e:{if(cm(t),e===null)throw Error(b(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_h(e,t),qi(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Tr(Error(b(423)),t),t=Ld(e,t,r,n,o);break e}else if(r!==o){o=Tr(Error(b(424)),t),t=Ld(e,t,r,n,o);break e}else for(Qe=tn(t.stateNode.containerInfo.firstChild),Xe=t,ie=!0,pt=null,n=Ih(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xr(),r===o){t=Vt(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return Vh(t),e===null&&pl(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,ll(r,o)?s=null:i!==null&&ll(r,i)&&(t.flags|=32),um(e,t),De(e,t,s,n),t.child;case 6:return e===null&&pl(t),null;case 13:return dm(e,t,n);case 4:return Fu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wr(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),jd(e,t,r,o,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Z(Qi,r._currentValue),r._currentValue=s,i!==null)if(vt(i.value,s)){if(i.children===o.children&&!Be.current){t=Vt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Mt(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),hl(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(b(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),hl(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}De(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,hr(t,n),o=at(o),r=r(o),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,o=dt(r,t.pendingProps),o=dt(r.type,o),Ad(e,t,r,o,n);case 15:return am(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:dt(r,o),ki(e,t),t.tag=1,Ue(r)?(e=!0,Gi(t)):e=!1,hr(t,n),om(t,r,o),gl(t,r,o,n),xl(null,t,r,!0,e,n);case 19:return fm(e,t,n);case 22:return lm(e,t,n)}throw Error(b(156,t.tag))};function Nm(e,t){return th(e,t)}function u1(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 it(e,t,n,r){return new u1(e,t,n,r)}function ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function c1(e){if(typeof e=="function")return ec(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xu)return 11;if(e===wu)return 14}return 2}function sn(e,t){var n=e.alternate;return n===null?(n=it(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 Ri(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")ec(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Qn:return An(n.children,o,i,t);case yu:s=8,o|=8;break;case za:return e=it(12,n,t,o|2),e.elementType=za,e.lanes=i,e;case Ba:return e=it(13,n,t,o),e.elementType=Ba,e.lanes=i,e;case Ua:return e=it(19,n,t,o),e.elementType=Ua,e.lanes=i,e;case Vp:return Ns(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Op:s=10;break e;case _p:s=9;break e;case xu:s=11;break e;case wu:s=14;break e;case Ht:s=16,r=null;break e}throw Error(b(130,e==null?e:typeof e,""))}return t=it(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function An(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function Ns(e,t,n,r){return e=it(22,e,r,t),e.elementType=Vp,e.lanes=n,e.stateNode={isHidden:!1},e}function xa(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function wa(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function d1(e,t,n,r,o){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=ea(0),this.expirationTimes=ea(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ea(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function tc(e,t,n,r,o,i,s,a,l){return e=new d1(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=it(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vu(i),e}function f1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mm)}catch(e){console.error(e)}}Mm(),Mp.exports=Je;var Ls=Mp.exports;const v1=kr(Ls);var Wd=Ls;Va.createRoot=Wd.createRoot,Va.hydrateRoot=Wd.hydrateRoot;/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Lm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function x1(){return Math.random().toString(36).substr(2,8)}function Kd(e,t){return{usr:e.state,key:e.key,idx:t}}function Al(e,t,n,r){return n===void 0&&(n=null),Ro({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?jr(t):t,{state:n,key:t&&t.key||r||x1()})}function Dm(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function jr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function w1(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=qt.Pop,l=null,u=d();u==null&&(u=0,s.replaceState(Ro({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function c(){a=qt.Pop;let S=d(),v=S==null?null:S-u;u=S,l&&l({action:a,location:y.location,delta:v})}function f(S,v){a=qt.Push;let h=Al(y.location,S,v);n&&n(h,S),u=d()+1;let g=Kd(h,u),T=y.createHref(h);try{s.pushState(g,"",T)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(T)}i&&l&&l({action:a,location:y.location,delta:1})}function m(S,v){a=qt.Replace;let h=Al(y.location,S,v);n&&n(h,S),u=d();let g=Kd(h,u),T=y.createHref(h);s.replaceState(g,"",T),i&&l&&l({action:a,location:y.location,delta:0})}function x(S){let v=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof S=="string"?S:Dm(S);return h=h.replace(/ $/,"%20"),xe(v,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,v)}let y={get action(){return a},get location(){return e(o,s)},listen(S){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Gd,c),l=S,()=>{o.removeEventListener(Gd,c),l=null}},createHref(S){return t(o,S)},createURL:x,encodeLocation(S){let v=x(S);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:m,go(S){return s.go(S)}};return y}var Yd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Yd||(Yd={}));function S1(e,t,n){return n===void 0&&(n="/"),T1(e,t,n,!1)}function T1(e,t,n,r){let o=typeof t=="string"?jr(t):t,i=_m(o.pathname||"/",n);if(i==null)return null;let s=Im(e);C1(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(xe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Mn([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(xe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Im(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:j1(u,i.index),routesMeta:d})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of Om(i.path))o(i,s,l)}),t}function Om(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Om(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function C1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:A1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const P1=/^:[\w-]+$/,E1=3,k1=2,b1=1,N1=10,R1=-2,Qd=e=>e==="*";function j1(e,t){let n=e.split("/"),r=n.length;return n.some(Qd)&&(r+=R1),t&&(r+=k1),n.filter(o=>!Qd(o)).reduce((o,i)=>o+(P1.test(i)?E1:i===""?b1:N1),r)}function A1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function M1(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},i="/",s=[];for(let a=0;a{let{paramName:f,isOptional:m}=d;if(f==="*"){let y=a[c]||"";s=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const x=a[c];return m&&!x?u[f]=void 0:u[f]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function L1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Lm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function D1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Lm(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _m(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function I1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?jr(e):e;return{pathname:n?n.startsWith("/")?n:O1(n,t):t,search:B1(r),hash:U1(o)}}function O1(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Sa(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function _1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function V1(e,t){let n=_1(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function F1(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=jr(e):(o=Ro({},e),xe(!o.pathname||!o.pathname.includes("?"),Sa("?","pathname","search",o)),xe(!o.pathname||!o.pathname.includes("#"),Sa("#","pathname","hash",o)),xe(!o.search||!o.search.includes("#"),Sa("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),c-=1;o.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=I1(o,a),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Mn=e=>e.join("/").replace(/\/\/+/g,"/"),z1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,U1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Vm=["post","put","patch","delete"];new Set(Vm);const H1=["get",...Vm];new Set(H1);/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),w.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=F1(u,JSON.parse(s),i,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Mn([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,s,i,e])}function K1(e,t){return Y1(e,t)}function Y1(e,t,n,r){Os()||xe(!1);let{navigator:o}=w.useContext(Ds),{matches:i}=w.useContext(Ar),s=i[i.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=zm(),d;if(t){var c;let S=typeof t=="string"?jr(t):t;l==="/"||(c=S.pathname)!=null&&c.startsWith(l)||xe(!1),d=S}else d=u;let f=d.pathname||"/",m=f;if(l!=="/"){let S=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(S.length).join("/")}let x=S1(e,{pathname:m}),y=J1(x&&x.map(S=>Object.assign({},S,{params:Object.assign({},a,S.params),pathname:Mn([l,o.encodeLocation?o.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?l:Mn([l,o.encodeLocation?o.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),i,n,r);return t&&y?w.createElement(Is.Provider,{value:{location:jo({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:qt.Pop}},y):y}function Q1(){let e=rw(),t=$1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:o},n):null,i)}const X1=w.createElement(Q1,null);class q1 extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?w.createElement(Ar.Provider,{value:this.props.routeContext},w.createElement(Fm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z1(e){let{routeContext:t,match:n,children:r}=e,o=w.useContext(ic);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(Ar.Provider,{value:t},r)}function J1(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let d=s.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||xe(!1),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,c,f)=>{let m,x=!1,y=null,S=null;n&&(m=a&&c.route.id?a[c.route.id]:void 0,y=c.route.errorElement||X1,l&&(u<0&&f===0?(iw("route-fallback",!1),x=!0,S=null):u===f&&(x=!0,S=c.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,f+1)),h=()=>{let g;return m?g=y:x?g=S:c.route.Component?g=w.createElement(c.route.Component,null):c.route.element?g=c.route.element:g=d,w.createElement(Z1,{match:c,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:g})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?w.createElement(q1,{location:n.location,revalidation:n.revalidation,component:y,error:m,children:h(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):h()},null)}var $m=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($m||{}),ss=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ss||{});function ew(e){let t=w.useContext(ic);return t||xe(!1),t}function tw(e){let t=w.useContext(W1);return t||xe(!1),t}function nw(e){let t=w.useContext(Ar);return t||xe(!1),t}function Hm(e){let t=nw(),n=t.matches[t.matches.length-1];return n.route.id||xe(!1),n.route.id}function rw(){var e;let t=w.useContext(Fm),n=tw(ss.UseRouteError),r=Hm(ss.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ow(){let{router:e}=ew($m.UseNavigateStable),t=Hm(ss.UseNavigateStable),n=w.useRef(!1);return Bm(()=>{n.current=!0}),w.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,jo({fromRouteId:t},i)))},[e,t])}const qd={};function iw(e,t,n){!t&&!qd[e]&&(qd[e]=!0)}function sw(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function Ml(e){xe(!1)}function aw(e){let{basename:t="/",children:n=null,location:r,navigationType:o=qt.Pop,navigator:i,static:s=!1,future:a}=e;Os()&&xe(!1);let l=t.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:l,navigator:i,static:s,future:jo({v7_relativeSplatPath:!1},a)}),[l,a,i,s]);typeof r=="string"&&(r=jr(r));let{pathname:d="/",search:c="",hash:f="",state:m=null,key:x="default"}=r,y=w.useMemo(()=>{let S=_m(d,l);return S==null?null:{location:{pathname:S,search:c,hash:f,state:m,key:x},navigationType:o}},[l,d,c,f,m,x,o]);return y==null?null:w.createElement(Ds.Provider,{value:u},w.createElement(Is.Provider,{children:n,value:y}))}function lw(e){let{children:t,location:n}=e;return K1(Ll(t),n)}new Promise(()=>{});function Ll(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(r,o)=>{if(!w.isValidElement(r))return;let i=[...t,o];if(r.type===w.Fragment){n.push.apply(n,Ll(r.props.children,i));return}r.type!==Ml&&xe(!1),!r.props.index||!r.props.children||xe(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Ll(r.props.children,i)),n.push(s)}),n}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const uw="6";try{window.__reactRouterVersion=uw}catch{}const cw="startTransition",Zd=hu[cw];function dw(e){let{basename:t,children:n,future:r,window:o}=e,i=w.useRef();i.current==null&&(i.current=y1({window:o,v5Compat:!0}));let s=i.current,[a,l]=w.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=w.useCallback(c=>{u&&Zd?Zd(()=>l(c)):l(c)},[l,u]);return w.useLayoutEffect(()=>s.listen(d),[s,d]),w.useEffect(()=>sw(r),[r]),w.createElement(aw,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var Jd;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Jd||(Jd={}));var ef;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ef||(ef={}));var Wm={exports:{}},fw="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",pw=fw,hw=pw;function Gm(){}function Km(){}Km.resetWarningCache=Gm;var mw=function(){function e(r,o,i,s,a,l){if(l!==hw){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Km,resetWarningCache:Gm};return n.PropTypes=n,n};Wm.exports=mw();var gw=Wm.exports;const re=kr(gw);function vw(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var Ym=w,yw=vw(Ym);function tf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var ww=!!(typeof window<"u"&&window.document&&window.document.createElement);function Sw(e,t,n){if(typeof e!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof t!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof n<"u"&&typeof n!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function r(o){return o.displayName||o.name||"Component"}return function(i){if(typeof i!="function")throw new Error("Expected WrappedComponent to be a React component.");var s=[],a;function l(){a=e(s.map(function(d){return d.props})),u.canUseDOM?t(a):n&&(a=n(a))}var u=function(d){xw(c,d);function c(){return d.apply(this,arguments)||this}c.peek=function(){return a},c.rewind=function(){if(c.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var x=a;return a=void 0,s=[],x};var f=c.prototype;return f.UNSAFE_componentWillMount=function(){s.push(this),l()},f.componentDidUpdate=function(){l()},f.componentWillUnmount=function(){var x=s.indexOf(this);s.splice(x,1),l()},f.render=function(){return yw.createElement(i,this.props)},c}(Ym.PureComponent);return tf(u,"displayName","SideEffect("+r(i)+")"),tf(u,"canUseDOM",ww),u}}var Tw=Sw;const Cw=kr(Tw);var Pw=typeof Element<"u",Ew=typeof Map=="function",kw=typeof Set=="function",bw=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ji(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ji(e[r],t[r]))return!1;return!0}var i;if(Ew&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!ji(r.value[1],t.get(r.value[0])))return!1;return!0}if(kw&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(bw&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(Pw&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((o[r]==="_owner"||o[r]==="__v"||o[r]==="__o")&&e.$$typeof)&&!ji(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}var Nw=function(t,n){try{return ji(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const Rw=kr(Nw);/* object-assign (c) Sindre Sorhus @license MIT */var nf=Object.getOwnPropertySymbols,jw=Object.prototype.hasOwnProperty,Aw=Object.prototype.propertyIsEnumerable;function Mw(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Lw(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Dw=Lw()?Object.assign:function(e,t){for(var n,r=Mw(e),o,i=1;i=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Uw=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},Dl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(t):String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},$w=function(t){var n=gr(t,z.TITLE),r=gr(t,Ao.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var o=gr(t,Ao.DEFAULT_TITLE);return n||o||void 0},Hw=function(t){return gr(t,Ao.ON_CHANGE_CLIENT_STATE)||function(){}},Ta=function(t,n){return n.filter(function(r){return typeof r[t]<"u"}).map(function(r){return r[t]}).reduce(function(r,o){return Ve({},r,o)},{})},Ww=function(t,n){return n.filter(function(r){return typeof r[z.BASE]<"u"}).map(function(r){return r[z.BASE]}).reverse().reduce(function(r,o){if(!r.length)for(var i=Object.keys(o),s=0;s=0;r--){var o=t[r];if(o.hasOwnProperty(n))return o[n]}return null},Gw=function(t){return{baseTag:Ww([oe.HREF,oe.TARGET],t),bodyAttributes:Ta(Ln.BODY,t),defer:gr(t,Ao.DEFER),encode:gr(t,Ao.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Ta(Ln.HTML,t),linkTags:Br(z.LINK,[oe.REL,oe.HREF],t),metaTags:Br(z.META,[oe.NAME,oe.CHARSET,oe.HTTPEQUIV,oe.PROPERTY,oe.ITEM_PROP],t),noscriptTags:Br(z.NOSCRIPT,[oe.INNER_HTML],t),onChangeClientState:Hw(t),scriptTags:Br(z.SCRIPT,[oe.SRC,oe.INNER_HTML],t),styleTags:Br(z.STYLE,[oe.CSS_TEXT],t),title:$w(t),titleAttributes:Ta(Ln.TITLE,t)}},Il=function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){Il(t)},0)}}(),of=function(t){return clearTimeout(t)},Kw=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Il:global.requestAnimationFrame||Il,Yw=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||of:global.cancelAnimationFrame||of,Qw=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},Ur=null,Xw=function(t){Ur&&Yw(Ur),t.defer?Ur=Kw(function(){sf(t,function(){Ur=null})}):(sf(t),Ur=null)},sf=function(t,n){var r=t.baseTag,o=t.bodyAttributes,i=t.htmlAttributes,s=t.linkTags,a=t.metaTags,l=t.noscriptTags,u=t.onChangeClientState,d=t.scriptTags,c=t.styleTags,f=t.title,m=t.titleAttributes;Ol(z.BODY,o),Ol(z.HTML,i),qw(f,m);var x={baseTag:Kn(z.BASE,r),linkTags:Kn(z.LINK,s),metaTags:Kn(z.META,a),noscriptTags:Kn(z.NOSCRIPT,l),scriptTags:Kn(z.SCRIPT,d),styleTags:Kn(z.STYLE,c)},y={},S={};Object.keys(x).forEach(function(v){var h=x[v],g=h.newTags,T=h.oldTags;g.length&&(y[v]=g),T.length&&(S[v]=x[v].oldTags)}),n&&n(),u(t,y,S)},Qm=function(t){return Array.isArray(t)?t.join(""):t},qw=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=Qm(t)),Ol(z.TITLE,n)},Ol=function(t,n){var r=document.getElementsByTagName(t)[0];if(r){for(var o=r.getAttribute(ht),i=o?o.split(","):[],s=[].concat(i),a=Object.keys(n),l=0;l=0;f--)r.removeAttribute(s[f]);i.length===s.length?r.removeAttribute(ht):r.getAttribute(ht)!==a.join(",")&&r.setAttribute(ht,a.join(","))}},Kn=function(t,n){var r=document.head||document.querySelector(z.HEAD),o=r.querySelectorAll(t+"["+ht+"]"),i=Array.prototype.slice.call(o),s=[],a=void 0;return n&&n.length&&n.forEach(function(l){var u=document.createElement(t);for(var d in l)if(l.hasOwnProperty(d))if(d===oe.INNER_HTML)u.innerHTML=l.innerHTML;else if(d===oe.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText));else{var c=typeof l[d]>"u"?"":l[d];u.setAttribute(d,c)}u.setAttribute(ht,"true"),i.some(function(f,m){return a=m,u.isEqualNode(f)})?i.splice(a,1):s.push(u)}),i.forEach(function(l){return l.parentNode.removeChild(l)}),s.forEach(function(l){return r.appendChild(l)}),{oldTags:i,newTags:s}},Xm=function(t){return Object.keys(t).reduce(function(n,r){var o=typeof t[r]<"u"?r+'="'+t[r]+'"':""+r;return n?n+" "+o:o},"")},Zw=function(t,n,r,o){var i=Xm(r),s=Qm(n);return i?"<"+t+" "+ht+'="true" '+i+">"+Dl(s,o)+"":"<"+t+" "+ht+'="true">'+Dl(s,o)+""},Jw=function(t,n,r){return n.reduce(function(o,i){var s=Object.keys(i).filter(function(u){return!(u===oe.INNER_HTML||u===oe.CSS_TEXT)}).reduce(function(u,d){var c=typeof i[d]>"u"?d:d+'="'+Dl(i[d],r)+'"';return u?u+" "+c:c},""),a=i.innerHTML||i.cssText||"",l=_w.indexOf(t)===-1;return o+"<"+t+" "+ht+'="true" '+s+(l?"/>":">"+a+"")},"")},qm=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[as[o]||o]=t[o],r},n)},eS=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[Ow[o]||o]=t[o],r},n)},tS=function(t,n,r){var o,i=(o={key:n},o[ht]=!0,o),s=qm(r,i);return[X.createElement(z.TITLE,s,n)]},nS=function(t,n){return n.map(function(r,o){var i,s=(i={key:o},i[ht]=!0,i);return Object.keys(r).forEach(function(a){var l=as[a]||a;if(l===oe.INNER_HTML||l===oe.CSS_TEXT){var u=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:u}}else s[l]=r[a]}),X.createElement(t,s)})},Et=function(t,n,r){switch(t){case z.TITLE:return{toComponent:function(){return tS(t,n.title,n.titleAttributes)},toString:function(){return Zw(t,n.title,n.titleAttributes,r)}};case Ln.BODY:case Ln.HTML:return{toComponent:function(){return qm(n)},toString:function(){return Xm(n)}};default:return{toComponent:function(){return nS(t,n)},toString:function(){return Jw(t,n,r)}}}},Zm=function(t){var n=t.baseTag,r=t.bodyAttributes,o=t.encode,i=t.htmlAttributes,s=t.linkTags,a=t.metaTags,l=t.noscriptTags,u=t.scriptTags,d=t.styleTags,c=t.title,f=c===void 0?"":c,m=t.titleAttributes;return{base:Et(z.BASE,n,o),bodyAttributes:Et(Ln.BODY,r,o),htmlAttributes:Et(Ln.HTML,i,o),link:Et(z.LINK,s,o),meta:Et(z.META,a,o),noscript:Et(z.NOSCRIPT,l,o),script:Et(z.SCRIPT,u,o),style:Et(z.STYLE,d,o),title:Et(z.TITLE,{title:f,titleAttributes:m},o)}},rS=function(t){var n,r;return r=n=function(o){Bw(i,o);function i(){return Fw(this,i),Uw(this,o.apply(this,arguments))}return i.prototype.shouldComponentUpdate=function(a){return!Rw(this.props,a)},i.prototype.mapNestedChildrenToProps=function(a,l){if(!l)return null;switch(a.type){case z.SCRIPT:case z.NOSCRIPT:return{innerHTML:l};case z.STYLE:return{cssText:l}}throw new Error("<"+a.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},i.prototype.flattenArrayTypeChildren=function(a){var l,u=a.child,d=a.arrayTypeChildren,c=a.newChildProps,f=a.nestedChildren;return Ve({},d,(l={},l[u.type]=[].concat(d[u.type]||[],[Ve({},c,this.mapNestedChildrenToProps(u,f))]),l))},i.prototype.mapObjectTypeChildren=function(a){var l,u,d=a.child,c=a.newProps,f=a.newChildProps,m=a.nestedChildren;switch(d.type){case z.TITLE:return Ve({},c,(l={},l[d.type]=m,l.titleAttributes=Ve({},f),l));case z.BODY:return Ve({},c,{bodyAttributes:Ve({},f)});case z.HTML:return Ve({},c,{htmlAttributes:Ve({},f)})}return Ve({},c,(u={},u[d.type]=Ve({},f),u))},i.prototype.mapArrayTypeChildrenToProps=function(a,l){var u=Ve({},l);return Object.keys(a).forEach(function(d){var c;u=Ve({},u,(c={},c[d]=a[d],c))}),u},i.prototype.warnOnInvalidChildren=function(a,l){return!0},i.prototype.mapChildrenToProps=function(a,l){var u=this,d={};return X.Children.forEach(a,function(c){if(!(!c||!c.props)){var f=c.props,m=f.children,x=rf(f,["children"]),y=eS(x);switch(u.warnOnInvalidChildren(c,m),c.type){case z.LINK:case z.META:case z.NOSCRIPT:case z.SCRIPT:case z.STYLE:d=u.flattenArrayTypeChildren({child:c,arrayTypeChildren:d,newChildProps:y,nestedChildren:m});break;default:l=u.mapObjectTypeChildren({child:c,newProps:l,newChildProps:y,nestedChildren:m});break}}}),l=this.mapArrayTypeChildrenToProps(d,l),l},i.prototype.render=function(){var a=this.props,l=a.children,u=rf(a,["children"]),d=Ve({},u);return l&&(d=this.mapChildrenToProps(l,d)),X.createElement(t,d)},zw(i,null,[{key:"canUseDOM",set:function(a){t.canUseDOM=a}}]),i}(X.Component),n.propTypes={base:re.object,bodyAttributes:re.object,children:re.oneOfType([re.arrayOf(re.node),re.node]),defaultTitle:re.string,defer:re.bool,encodeSpecialCharacters:re.bool,htmlAttributes:re.object,link:re.arrayOf(re.object),meta:re.arrayOf(re.object),noscript:re.arrayOf(re.object),onChangeClientState:re.func,script:re.arrayOf(re.object),style:re.arrayOf(re.object),title:re.string,titleAttributes:re.object,titleTemplate:re.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var o=t.rewind();return o||(o=Zm({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},r},oS=function(){return null},iS=Cw(Gw,Xw,Zm)(oS),_l=rS(iS);_l.renderStatic=_l.rewind;const Jm=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),_s=w.createContext({}),sc=w.createContext(null),Vs=typeof document<"u",sS=Vs?w.useLayoutEffect:w.useEffect,eg=w.createContext({strict:!1}),ac=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),aS="framerAppearId",tg="data-"+ac(aS);function lS(e,t,n,r){const{visualElement:o}=w.useContext(_s),i=w.useContext(eg),s=w.useContext(sc),a=w.useContext(Jm).reducedMotion,l=w.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;w.useInsertionEffect(()=>{u&&u.update(n,s)});const d=w.useRef(!!(n[tg]&&!window.HandoffComplete));return sS(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),u}function sr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function uS(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):sr(n)&&(n.current=r))},[t])}function Mo(e){return typeof e=="string"||Array.isArray(e)}function Fs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const lc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uc=["initial",...lc];function zs(e){return Fs(e.animate)||uc.some(t=>Mo(e[t]))}function ng(e){return!!(zs(e)||e.variants)}function cS(e,t){if(zs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Mo(n)?n:void 0,animate:Mo(r)?r:void 0}}return e.inherit!==!1?t:{}}function dS(e){const{initial:t,animate:n}=cS(e,w.useContext(_s));return w.useMemo(()=>({initial:t,animate:n}),[af(t),af(n)])}function af(e){return Array.isArray(e)?e.join(" "):e}const lf={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"]},Lo={};for(const e in lf)Lo[e]={isEnabled:t=>lf[e].some(n=>!!t[n])};function fS(e){for(const t in e)Lo[t]={...Lo[t],...e[t]}}const rg=w.createContext({}),og=w.createContext({}),pS=Symbol.for("motionComponentSymbol");function hS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&fS(e);function i(a,l){let u;const d={...w.useContext(Jm),...a,layoutId:mS(a)},{isStatic:c}=d,f=dS(a),m=r(a,c);if(!c&&Vs){f.visualElement=lS(o,m,d,t);const x=w.useContext(og),y=w.useContext(eg).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,y,e,x))}return w.createElement(_s.Provider,{value:f},u&&f.visualElement?w.createElement(u,{visualElement:f.visualElement,...d}):null,n(o,a,uS(m,f.visualElement,l),m,c,f.visualElement))}const s=w.forwardRef(i);return s[pS]=o,s}function mS({layoutId:e}){const t=w.useContext(rg).id;return t&&e!==void 0?t+"-"+e:e}function gS(e){function t(r,o={}){return hS(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const vS=["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 cc(e){return typeof e!="string"||e.includes("-")?!1:!!(vS.indexOf(e)>-1||/[A-Z]/.test(e))}const ls={};function yS(e){Object.assign(ls,e)}const zo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Un=new Set(zo);function ig(e,{layout:t,layoutId:n}){return Un.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ls[e]||e==="opacity")}const He=e=>!!(e&&e.getVelocity),xS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wS=zo.length;function SS(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;st=>typeof t=="string"&&t.startsWith(e),ag=sg("--"),Vl=sg("var(--"),TS=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,CS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,dn=(e,t,n)=>Math.min(Math.max(n,e),t),$n={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ao={...$n,transform:e=>dn(0,1,e)},di={...$n,default:1},lo=e=>Math.round(e*1e5)/1e5,Bs=/(-)?([\d]*\.?[\d])+/g,lg=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,PS=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Bo(e){return typeof e=="string"}const Uo=e=>({test:t=>Bo(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$t=Uo("deg"),Pt=Uo("%"),_=Uo("px"),ES=Uo("vh"),kS=Uo("vw"),uf={...Pt,parse:e=>Pt.parse(e)/100,transform:e=>Pt.transform(e*100)},cf={...$n,transform:Math.round},ug={borderWidth:_,borderTopWidth:_,borderRightWidth:_,borderBottomWidth:_,borderLeftWidth:_,borderRadius:_,radius:_,borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomRightRadius:_,borderBottomLeftRadius:_,width:_,maxWidth:_,height:_,maxHeight:_,size:_,top:_,right:_,bottom:_,left:_,padding:_,paddingTop:_,paddingRight:_,paddingBottom:_,paddingLeft:_,margin:_,marginTop:_,marginRight:_,marginBottom:_,marginLeft:_,rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:di,scaleX:di,scaleY:di,scaleZ:di,skew:$t,skewX:$t,skewY:$t,distance:_,translateX:_,translateY:_,translateZ:_,x:_,y:_,z:_,perspective:_,transformPerspective:_,opacity:ao,originX:uf,originY:uf,originZ:_,zIndex:cf,fillOpacity:ao,strokeOpacity:ao,numOctaves:cf};function dc(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let l=!1,u=!1,d=!0;for(const c in t){const f=t[c];if(ag(c)){i[c]=f;continue}const m=ug[c],x=CS(f,m);if(Un.has(c)){if(l=!0,s[c]=x,!d)continue;f!==(m.default||0)&&(d=!1)}else c.startsWith("origin")?(u=!0,a[c]=x):o[c]=x}if(t.transform||(l||r?o.transform=SS(e.transform,n,d,r):o.transform&&(o.transform="none")),u){const{originX:c="50%",originY:f="50%",originZ:m=0}=a;o.transformOrigin=`${c} ${f} ${m}`}}const fc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cg(e,t,n){for(const r in t)!He(t[r])&&!ig(r,n)&&(e[r]=t[r])}function bS({transformTemplate:e},t,n){return w.useMemo(()=>{const r=fc();return dc(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function NS(e,t,n){const r=e.style||{},o={};return cg(o,r,e),Object.assign(o,bS(e,t,n)),e.transformValues?e.transformValues(o):o}function RS(e,t,n){const r={},o=NS(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const jS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function us(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jS.has(e)}let dg=e=>!us(e);function AS(e){e&&(dg=t=>t.startsWith("on")?!us(t):e(t))}try{AS(require("@emotion/is-prop-valid").default)}catch{}function MS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(dg(o)||n===!0&&us(o)||!t&&!us(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function df(e,t,n){return typeof e=="string"?e:_.transform(t+n*e)}function LS(e,t,n){const r=df(t,e.x,e.width),o=df(n,e.y,e.height);return`${r} ${o}`}const DS={offset:"stroke-dashoffset",array:"stroke-dasharray"},IS={offset:"strokeDashoffset",array:"strokeDasharray"};function OS(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?DS:IS;e[i.offset]=_.transform(-r);const s=_.transform(t),a=_.transform(n);e[i.array]=`${s} ${a}`}function pc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},d,c,f){if(dc(e,u,d,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:x,dimensions:y}=e;m.transform&&(y&&(x.transform=m.transform),delete m.transform),y&&(o!==void 0||i!==void 0||x.transform)&&(x.transformOrigin=LS(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),s!==void 0&&OS(m,s,a,l,!1)}const fg=()=>({...fc(),attrs:{}}),hc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _S(e,t,n,r){const o=w.useMemo(()=>{const i=fg();return pc(i,t,{enableHardwareAcceleration:!1},hc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};cg(i,e.style,e),o.style={...i,...o.style}}return o}function VS(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(cc(n)?_S:RS)(r,i,s,n),d={...MS(r,typeof n=="string",e),...l,ref:o},{children:c}=r,f=w.useMemo(()=>He(c)?c.get():c,[c]);return w.createElement(n,{...d,children:f})}}function pg(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const hg=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 mg(e,t,n,r){pg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(hg.has(o)?o:ac(o),t.attrs[o])}function mc(e,t){const{style:n}=e,r={};for(const o in n)(He(n[o])||t.style&&He(t.style[o])||ig(o,e))&&(r[o]=n[o]);return r}function gg(e,t){const n=mc(e,t);for(const r in e)if(He(e[r])||He(t[r])){const o=zo.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function gc(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function FS(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const cs=e=>Array.isArray(e),zS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),BS=e=>cs(e)?e[e.length-1]||0:e;function Ai(e){const t=He(e)?e.get():e;return zS(t)?t.toValue():t}function US({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:$S(r,o,i,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const vg=e=>(t,n)=>{const r=w.useContext(_s),o=w.useContext(sc),i=()=>US(e,t,r,o);return n?i():FS(i)};function $S(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Ai(i[f]);let{initial:s,animate:a}=e;const l=zs(e),u=ng(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const c=d?a:s;return c&&typeof c!="boolean"&&!Fs(c)&&(Array.isArray(c)?c:[c]).forEach(m=>{const x=gc(e,m);if(!x)return;const{transitionEnd:y,transition:S,...v}=x;for(const h in v){let g=v[h];if(Array.isArray(g)){const T=d?g.length-1:0;g=g[T]}g!==null&&(o[h]=g)}for(const h in y)o[h]=y[h]}),o}const fe=e=>e;class ff{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function HS(e){let t=new ff,n=new ff,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,u=!1,d=!1)=>{const c=d&&o,f=c?t:n;return u&&s.add(l),f.add(l)&&c&&o&&(r=t.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(c[f]=HS(()=>n=!0),c),{}),s=c=>i[c].process(o),a=()=>{const c=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(c-o.timestamp,WS),1),o.timestamp=c,o.isProcessing=!0,fi.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,o.isProcessing||e(a)};return{schedule:fi.reduce((c,f)=>{const m=i[f];return c[f]=(x,y=!1,S=!1)=>(n||l(),m.schedule(x,y,S)),c},{}),cancel:c=>fi.forEach(f=>i[f].cancel(c)),state:o,steps:i}}const{schedule:ne,cancel:Ft,state:Ne,steps:Ca}=GS(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0),KS={useVisualState:vg({scrapeMotionValuesFromProps:gg,createRenderState:fg,onMount:(e,t,{renderState:n,latestValues:r})=>{ne.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ne.render(()=>{pc(n,r,{enableHardwareAcceleration:!1},hc(t.tagName),e.transformTemplate),mg(t,n)})}})},YS={useVisualState:vg({scrapeMotionValuesFromProps:mc,createRenderState:fc})};function QS(e,{forwardMotionProps:t=!1},n,r){return{...cc(e)?KS:YS,preloadedFeatures:n,useRender:VS(t),createVisualElement:r,Component:e}}function At(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const yg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Us(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const XS=e=>t=>yg(t)&&e(t,Us(t));function Lt(e,t,n,r){return At(e,t,XS(n),r)}const qS=(e,t)=>n=>t(e(n)),an=(...e)=>e.reduce(qS);function xg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const pf=xg("dragHorizontal"),hf=xg("dragVertical");function wg(e){let t=!1;if(e==="y")t=hf();else if(e==="x")t=pf();else{const n=pf(),r=hf();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Sg(){const e=wg(!0);return e?(e(),!1):!0}class vn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function mf(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(i,s)=>{if(i.pointerType==="touch"||Sg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ne.update(()=>a[r](i,s))};return Lt(e.current,n,o,{passive:!e.getProps()[r]})}class ZS extends vn{mount(){this.unmount=an(mf(this.node,!0),mf(this.node,!1))}unmount(){}}class JS extends vn{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=an(At(this.node.current,"focus",()=>this.onFocus()),At(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Tg=(e,t)=>t?e===t?!0:Tg(e,t.parentElement):!1;function Pa(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Us(n))}class eT extends vn{constructor(){super(...arguments),this.removeStartListeners=fe,this.removeEndListeners=fe,this.removeAccessibleListeners=fe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Lt(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d,globalTapTarget:c}=this.node.getProps();ne.update(()=>{!c&&!Tg(this.node.current,a.target)?d&&d(a,l):u&&u(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Lt(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=an(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Pa("up",(l,u)=>{const{onTap:d}=this.node.getProps();d&&ne.update(()=>d(l,u))})};this.removeEndListeners(),this.removeEndListeners=At(this.node.current,"keyup",s),Pa("down",(a,l)=>{this.startPress(a,l)})},n=At(this.node.current,"keydown",t),r=()=>{this.isPressing&&Pa("cancel",(i,s)=>this.cancelPress(i,s))},o=At(this.node.current,"blur",r);this.removeAccessibleListeners=an(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ne.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Sg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ne.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Lt(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=At(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=an(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Fl=new WeakMap,Ea=new WeakMap,tT=e=>{const t=Fl.get(e.target);t&&t(e)},nT=e=>{e.forEach(tT)};function rT({root:e,...t}){const n=e||document;Ea.has(n)||Ea.set(n,{});const r=Ea.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(nT,{root:e,...t})),r[o]}function oT(e,t,n){const r=rT(t);return Fl.set(e,n),r.observe(e),()=>{Fl.delete(e),r.unobserve(e)}}const iT={some:0,all:1};class sT extends vn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:iT[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return oT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(aT(t,n))&&this.startObserver()}unmount(){}}function aT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const lT={inView:{Feature:sT},tap:{Feature:eT},focus:{Feature:JS},hover:{Feature:ZS}};function Cg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function cT(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function $s(e,t,n){const r=e.getProps();return gc(r,t,n!==void 0?n:r.custom,uT(e),cT(e))}let dT=fe,vc=fe;const ln=e=>e*1e3,Dt=e=>e/1e3,fT={current:!1},Pg=e=>Array.isArray(e)&&typeof e[0]=="number";function Eg(e){return!!(!e||typeof e=="string"&&kg[e]||Pg(e)||Array.isArray(e)&&e.every(Eg))}const qr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,kg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:qr([0,.65,.55,1]),circOut:qr([.55,0,1,.45]),backIn:qr([.31,.01,.66,-.59]),backOut:qr([.33,1.53,.69,.99])};function bg(e){if(e)return Pg(e)?qr(e):Array.isArray(e)?e.map(bg):kg[e]}function pT(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=bg(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function hT(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Ng=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mT=1e-7,gT=12;function vT(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Ng(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>mT&&++avT(i,0,1,e,n);return i=>i===0||i===1?i:Ng(o(i),t,r)}const yT=$o(.42,0,1,1),xT=$o(0,0,.58,1),Rg=$o(.42,0,.58,1),wT=e=>Array.isArray(e)&&typeof e[0]!="number",jg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ag=e=>t=>1-e(1-t),yc=e=>1-Math.sin(Math.acos(e)),Mg=Ag(yc),ST=jg(yc),Lg=$o(.33,1.53,.69,.99),xc=Ag(Lg),TT=jg(xc),CT=e=>(e*=2)<1?.5*xc(e):.5*(2-Math.pow(2,-10*(e-1))),PT={linear:fe,easeIn:yT,easeInOut:Rg,easeOut:xT,circIn:yc,circInOut:ST,circOut:Mg,backIn:xc,backInOut:TT,backOut:Lg,anticipate:CT},gf=e=>{if(Array.isArray(e)){vc(e.length===4);const[t,n,r,o]=e;return $o(t,n,r,o)}else if(typeof e=="string")return PT[e];return e},wc=(e,t)=>n=>!!(Bo(n)&&PS.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Dg=(e,t,n)=>r=>{if(!Bo(r))return r;const[o,i,s,a]=r.match(Bs);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},ET=e=>dn(0,255,e),ka={...$n,transform:e=>Math.round(ET(e))},Nn={test:wc("rgb","red"),parse:Dg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ka.transform(e)+", "+ka.transform(t)+", "+ka.transform(n)+", "+lo(ao.transform(r))+")"};function kT(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const zl={test:wc("#"),parse:kT,transform:Nn.transform},ar={test:wc("hsl","hue"),parse:Dg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pt.transform(lo(t))+", "+Pt.transform(lo(n))+", "+lo(ao.transform(r))+")"},Me={test:e=>Nn.test(e)||zl.test(e)||ar.test(e),parse:e=>Nn.test(e)?Nn.parse(e):ar.test(e)?ar.parse(e):zl.parse(e),transform:e=>Bo(e)?e:e.hasOwnProperty("red")?Nn.transform(e):ar.transform(e)},le=(e,t,n)=>-n*e+n*t+e;function ba(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 bT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ba(l,a,e+1/3),i=ba(l,a,e),s=ba(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const Na=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},NT=[zl,Nn,ar],RT=e=>NT.find(t=>t.test(e));function vf(e){const t=RT(e);let n=t.parse(e);return t===ar&&(n=bT(n)),n}const Ig=(e,t)=>{const n=vf(e),r=vf(t),o={...n};return i=>(o.red=Na(n.red,r.red,i),o.green=Na(n.green,r.green,i),o.blue=Na(n.blue,r.blue,i),o.alpha=le(n.alpha,r.alpha,i),Nn.transform(o))};function jT(e){var t,n;return isNaN(e)&&Bo(e)&&(((t=e.match(Bs))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(lg))===null||n===void 0?void 0:n.length)||0)>0}const Og={regex:TS,countKey:"Vars",token:"${v}",parse:fe},_g={regex:lg,countKey:"Colors",token:"${c}",parse:Me.parse},Vg={regex:Bs,countKey:"Numbers",token:"${n}",parse:$n.parse};function Ra(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function ds(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ra(n,Og),Ra(n,_g),Ra(n,Vg),n}function Fg(e){return ds(e).values}function zg(e){const{values:t,numColors:n,numVars:r,tokenised:o}=ds(e),i=t.length;return s=>{let a=o;for(let l=0;ltypeof e=="number"?0:e;function MT(e){const t=Fg(e);return zg(e)(t.map(AT))}const fn={test:jT,parse:Fg,createTransformer:zg,getAnimatableNone:MT},Bg=(e,t)=>n=>`${n>0?t:e}`;function Ug(e,t){return typeof e=="number"?n=>le(e,t,n):Me.test(e)?Ig(e,t):e.startsWith("var(")?Bg(e,t):Hg(e,t)}const $g=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>Ug(i,t[s]));return i=>{for(let s=0;s{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Ug(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}},Hg=(e,t)=>{const n=fn.createTransformer(t),r=ds(e),o=ds(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?an($g(r.values,o.values),n):Bg(e,t)},Do=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},yf=(e,t)=>n=>le(e,t,n);function DT(e){return typeof e=="number"?yf:typeof e=="string"?Me.test(e)?Ig:Hg:Array.isArray(e)?$g:typeof e=="object"?LT:yf}function IT(e,t,n){const r=[],o=n||DT(e[0]),i=e.length-1;for(let s=0;st[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=IT(t,r,o),a=s.length,l=u=>{let d=0;if(a>1)for(;dl(dn(e[0],e[i-1],u)):l}function OT(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Do(0,t,r);e.push(le(n,1,o))}}function _T(e){const t=[0];return OT(t,e.length-1),t}function VT(e,t){return e.map(n=>n*t)}function FT(e,t){return e.map(()=>t||Rg).splice(0,e.length-1)}function fs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=wT(r)?r.map(gf):gf(r),i={done:!1,value:t[0]},s=VT(n&&n.length===t.length?n:_T(t),e),a=Wg(s,t,{ease:Array.isArray(o)?o:FT(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function Gg(e,t){return t?e*(1e3/t):0}const zT=5;function Kg(e,t,n){const r=Math.max(t-zT,0);return Gg(n-e(r),t-r)}const ja=.001,BT=.01,xf=10,UT=.05,$T=1;function HT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;dT(e<=ln(xf));let s=1-t;s=dn(UT,$T,s),e=dn(BT,xf,Dt(e)),s<1?(o=u=>{const d=u*s,c=d*e,f=d-n,m=Bl(u,s),x=Math.exp(-c);return ja-f/m*x},i=u=>{const c=u*s*e,f=c*n+n,m=Math.pow(s,2)*Math.pow(u,2)*e,x=Math.exp(-c),y=Bl(Math.pow(u,2),s);return(-o(u)+ja>0?-1:1)*((f-m)*x)/y}):(o=u=>{const d=Math.exp(-u*e),c=(u-n)*e+1;return-ja+d*c},i=u=>{const d=Math.exp(-u*e),c=(n-u)*(e*e);return d*c});const a=5/e,l=GT(o,i,a);if(e=ln(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const WT=12;function GT(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function QT(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!wf(e,YT)&&wf(e,KT)){const n=HT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Yg({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:u,duration:d,velocity:c,isResolvedFromDuration:f}=QT({...r,velocity:-Dt(r.velocity||0)}),m=c||0,x=l/(2*Math.sqrt(a*u)),y=i-o,S=Dt(Math.sqrt(a/u)),v=Math.abs(y)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let h;if(x<1){const g=Bl(S,x);h=T=>{const P=Math.exp(-x*S*T);return i-P*((m+x*S*y)/g*Math.sin(g*T)+y*Math.cos(g*T))}}else if(x===1)h=g=>i-Math.exp(-S*g)*(y+(m+S*y)*g);else{const g=S*Math.sqrt(x*x-1);h=T=>{const P=Math.exp(-x*S*T),C=Math.min(g*T,300);return i-P*((m+x*S*y)*Math.sinh(C)+g*y*Math.cosh(C))/g}}return{calculatedDuration:f&&d||null,next:g=>{const T=h(g);if(f)s.done=g>=d;else{let P=m;g!==0&&(x<1?P=Kg(h,g,T):P=0);const C=Math.abs(P)<=n,E=Math.abs(i-T)<=t;s.done=C&&E}return s.value=s.done?i:T,s}}}function Sf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:d}){const c=e[0],f={done:!1,value:c},m=k=>a!==void 0&&kl,x=k=>a===void 0?l:l===void 0||Math.abs(a-k)-y*Math.exp(-k/r),g=k=>v+h(k),T=k=>{const M=h(k),R=g(k);f.done=Math.abs(M)<=u,f.value=f.done?v:R};let P,C;const E=k=>{m(f.value)&&(P=k,C=Yg({keyframes:[f.value,x(f.value)],velocity:Kg(g,k,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:k=>{let M=!1;return!C&&P===void 0&&(M=!0,T(k),E(k)),P!==void 0&&k>P?C.next(k-P):(!M&&T(k),f)}}}const XT=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ne.update(t,!0),stop:()=>Ft(t),now:()=>Ne.isProcessing?Ne.timestamp:performance.now()}},Tf=2e4;function Cf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Tf?1/0:t}const qT={decay:Sf,inertia:Sf,tween:fs,keyframes:fs,spring:Yg};function ps({autoplay:e=!0,delay:t=0,driver:n=XT,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:d,onUpdate:c,...f}){let m=1,x=!1,y,S;const v=()=>{S=new Promise(I=>{y=I})};v();let h;const g=qT[o]||fs;let T;g!==fs&&typeof r[0]!="number"&&(T=Wg([0,100],r,{clamp:!1}),r=[0,100]);const P=g({...f,keyframes:r});let C;a==="mirror"&&(C=g({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let E="idle",k=null,M=null,R=null;P.calculatedDuration===null&&i&&(P.calculatedDuration=Cf(P));const{calculatedDuration:V}=P;let D=1/0,W=1/0;V!==null&&(D=V+s,W=D*(i+1)-s);let A=0;const G=I=>{if(M===null)return;m>0&&(M=Math.min(M,I)),m<0&&(M=Math.min(I-W/m,M)),k!==null?A=k:A=Math.round(I-M)*m;const $=A-t*(m>=0?1:-1),q=m>=0?$<0:$>W;A=Math.max($,0),E==="finished"&&k===null&&(A=W);let Ge=A,Wn=P;if(i){const Ys=Math.min(A,W)/D;let Ko=Math.floor(Ys),xn=Ys%1;!xn&&Ys>=1&&(xn=1),xn===1&&Ko--,Ko=Math.min(Ko,i+1),!!(Ko%2)&&(a==="reverse"?(xn=1-xn,s&&(xn-=s/D)):a==="mirror"&&(Wn=C)),Ge=dn(0,1,xn)*D}const Ke=q?{done:!1,value:r[0]}:Wn.next(Ge);T&&(Ke.value=T(Ke.value));let{done:yn}=Ke;!q&&V!==null&&(yn=m>=0?A>=W:A<=0);const Hy=k===null&&(E==="finished"||E==="running"&&yn);return c&&c(Ke.value),Hy&&N(),Ke},O=()=>{h&&h.stop(),h=void 0},Y=()=>{E="idle",O(),y(),v(),M=R=null},N=()=>{E="finished",d&&d(),O(),y()},L=()=>{if(x)return;h||(h=n(G));const I=h.now();l&&l(),k!==null?M=I-k:(!M||E==="finished")&&(M=I),E==="finished"&&v(),R=M,k=null,E="running",h.start()};e&&L();const F={then(I,$){return S.then(I,$)},get time(){return Dt(A)},set time(I){I=ln(I),A=I,k!==null||!h||m===0?k=I:M=h.now()-I/m},get duration(){const I=P.calculatedDuration===null?Cf(P):P.calculatedDuration;return Dt(I)},get speed(){return m},set speed(I){I===m||!h||(m=I,F.time=Dt(A))},get state(){return E},play:L,pause:()=>{E="paused",k=A},stop:()=>{x=!0,E!=="idle"&&(E="idle",u&&u(),Y())},cancel:()=>{R!==null&&G(R),Y()},complete:()=>{E="finished"},sample:I=>(M=0,G(I))};return F}function ZT(e){let t;return()=>(t===void 0&&(t=e()),t)}const JT=ZT(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),eC=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),pi=10,tC=2e4,nC=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Eg(t.ease);function rC(e,t,{onUpdate:n,onComplete:r,...o}){if(!(JT()&&eC.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let s=!1,a,l,u=!1;const d=()=>{l=new Promise(g=>{a=g})};d();let{keyframes:c,duration:f=300,ease:m,times:x}=o;if(nC(t,o)){const g=ps({...o,repeat:0,delay:0});let T={done:!1,value:c[0]};const P=[];let C=0;for(;!T.done&&C{u=!1,y.cancel()},v=()=>{u=!0,ne.update(S),a(),d()};return y.onfinish=()=>{u||(e.set(hT(c,o)),r&&r(),v())},{then(g,T){return l.then(g,T)},attachTimeline(g){return y.timeline=g,y.onfinish=null,fe},get time(){return Dt(y.currentTime||0)},set time(g){y.currentTime=ln(g)},get speed(){return y.playbackRate},set speed(g){y.playbackRate=g},get duration(){return Dt(f)},play:()=>{s||(y.play(),Ft(S))},pause:()=>y.pause(),stop:()=>{if(s=!0,y.playState==="idle")return;const{currentTime:g}=y;if(g){const T=ps({...o,autoplay:!1});e.setWithVelocity(T.sample(g-pi).value,T.sample(g).value,pi)}v()},complete:()=>{u||y.finish()},cancel:v}}function oC({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:fe,pause:fe,stop:fe,then:i=>(i(),Promise.resolve()),cancel:fe,complete:fe});return t?ps({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const iC={type:"spring",stiffness:500,damping:25,restSpeed:10},sC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),aC={type:"keyframes",duration:.8},lC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uC=(e,{keyframes:t})=>t.length>2?aC:Un.has(e)?e.startsWith("scale")?sC(t[1]):iC:lC,Ul=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(fn.test(t)||t==="0")&&!t.startsWith("url(")),cC=new Set(["brightness","contrast","saturate","opacity"]);function dC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Bs)||[];if(!r)return e;const o=n.replace(r,"");let i=cC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const fC=/([a-z-]*)\(.*?\)/g,$l={...fn,getAnimatableNone:e=>{const t=e.match(fC);return t?t.map(dC).join(" "):e}},pC={...ug,color:Me,backgroundColor:Me,outlineColor:Me,fill:Me,stroke:Me,borderColor:Me,borderTopColor:Me,borderRightColor:Me,borderBottomColor:Me,borderLeftColor:Me,filter:$l,WebkitFilter:$l},Sc=e=>pC[e];function Qg(e,t){let n=Sc(e);return n!==$l&&(n=fn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Xg=e=>/^0[^.\s]+$/.test(e);function hC(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Xg(e)}function mC(e,t,n,r){const o=Ul(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;uo=>{const i=Tc(r,e)||{},s=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-ln(s);const l=mC(t,e,n,i),u=l[0],d=l[l.length-1],c=Ul(e,u),f=Ul(e,d);let m={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:x=>{t.set(x),i.onUpdate&&i.onUpdate(x)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(gC(i)||(m={...m,...uC(e,m)}),m.duration&&(m.duration=ln(m.duration)),m.repeatDelay&&(m.repeatDelay=ln(m.repeatDelay)),!c||!f||fT.current||i.type===!1||vC.skipAnimations)return oC(m);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const x=rC(t,e,m);if(x)return x}return ps(m)};function hs(e){return!!(He(e)&&e.add)}const qg=e=>/^\-?\d*\.?\d+$/.test(e);function Pc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ec(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class kc{constructor(){this.subscriptions=[]}add(t){return Pc(this.subscriptions,t),()=>Ec(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class xC{constructor(t,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:s}=Ne;this.lastUpdated!==s&&(this.timeDelta=i,this.lastUpdated=s,ne.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ne.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=yC(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new kc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ne.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=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Gg(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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 Pr(e,t){return new xC(e,t)}const Zg=e=>t=>t.test(e),wC={test:e=>e==="auto",parse:e=>e},Jg=[$n,_,Pt,$t,kS,ES,wC],$r=e=>Jg.find(Zg(e)),SC=[...Jg,Me,fn],TC=e=>SC.find(Zg(e));function CC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pr(n))}function PC(e,t){const n=$s(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const s in i){const a=BS(i[s]);CC(e,s,a)}}function EC(e,t,n){var r,o;const i=Object.keys(t).filter(a=>!e.hasValue(a)),s=i.length;if(s)for(let a=0;al.remove(c))),u.push(S)}return s&&Promise.all(u).then(()=>{s&&PC(e,s)}),u}function Hl(e,t,n={}){const r=$s(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(ev(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:c}=o;return jC(e,t,u+l,d,c,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,u]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>u())}else return Promise.all([i(),s(n.delay)])}function jC(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(AC).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Hl(u,t,{...i,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function AC(e,t){return e.sortNodePosition(t)}function MC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Hl(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Hl(e,t,n);else{const o=typeof t=="function"?$s(e,t,n.custom):t;r=Promise.all(ev(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const LC=[...lc].reverse(),DC=lc.length;function IC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>MC(e,n,r)))}function OC(e){let t=IC(e);const n=VC();let r=!0;const o=(l,u)=>{const d=$s(e,u);if(d){const{transition:c,transitionEnd:f,...m}=d;l={...l,...m,...f}}return l};function i(l){t=l(e)}function s(l,u){const d=e.getProps(),c=e.getVariantContext(!0)||{},f=[],m=new Set;let x={},y=1/0;for(let v=0;vy&&P,R=!1;const V=Array.isArray(T)?T:[T];let D=V.reduce(o,{});C===!1&&(D={});const{prevResolvedValues:W={}}=g,A={...W,...D},G=O=>{M=!0,m.has(O)&&(R=!0,m.delete(O)),g.needsAnimating[O]=!0};for(const O in A){const Y=D[O],N=W[O];if(x.hasOwnProperty(O))continue;let L=!1;cs(Y)&&cs(N)?L=!Cg(Y,N):L=Y!==N,L?Y!==void 0?G(O):m.add(O):Y!==void 0&&m.has(O)?G(O):g.protectedKeys[O]=!0}g.prevProp=T,g.prevResolvedValues=D,g.isActive&&(x={...x,...D}),r&&e.blockInitialAnimation&&(M=!1),M&&(!E||R)&&f.push(...V.map(O=>({animation:O,options:{type:h,...l}})))}if(m.size){const v={};m.forEach(h=>{const g=e.getBaseTarget(h);g!==void 0&&(v[h]=g)}),f.push({animation:v})}let S=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(f):Promise.resolve()}function a(l,u,d){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(m=>{var x;return(x=m.animationState)===null||x===void 0?void 0:x.setActive(l,u)}),n[l].isActive=u;const f=s(d,l);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n}}function _C(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cg(t,e):!1}function wn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function VC(){return{animate:wn(!0),whileInView:wn(),whileHover:wn(),whileTap:wn(),whileDrag:wn(),whileFocus:wn(),exit:wn()}}class FC extends vn{constructor(t){super(t),t.animationState||(t.animationState=OC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Fs(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let zC=0;class BC extends vn{constructor(){super(...arguments),this.id=zC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const UC={animation:{Feature:FC},exit:{Feature:BC}},Pf=(e,t)=>Math.abs(e-t);function $C(e,t){const n=Pf(e.x,t.x),r=Pf(e.y,t.y);return Math.sqrt(n**2+r**2)}class tv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Ma(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=$C(c.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:x}=c,{timestamp:y}=Ne;this.history.push({...x,timestamp:y});const{onStart:S,onMove:v}=this.handlers;f||(S&&S(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Aa(f,this.transformPagePoint),ne.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{this.end();const{onEnd:m,onSessionEnd:x,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Ma(c.type==="pointercancel"?this.lastMoveEventInfo:Aa(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(c,S),x&&x(c,S)},!yg(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Us(t),a=Aa(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ne;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Ma(a,this.history)),this.removeListeners=an(Lt(this.contextWindow,"pointermove",this.handlePointerMove),Lt(this.contextWindow,"pointerup",this.handlePointerUp),Lt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ft(this.updatePoint)}}function Aa(e,t){return t?{point:t(e.point)}:e}function Ef(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ma({point:e},t){return{point:e,delta:Ef(e,nv(t)),offset:Ef(e,HC(t)),velocity:WC(t,.1)}}function HC(e){return e[0]}function nv(e){return e[e.length-1]}function WC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=nv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const i=Dt(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Ze(e){return e.max-e.min}function Wl(e,t=0,n=.01){return Math.abs(e-t)<=n}function kf(e,t,n,r=.5){e.origin=r,e.originPoint=le(t.min,t.max,e.origin),e.scale=Ze(n)/Ze(t),(Wl(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=le(n.min,n.max,e.origin)-e.originPoint,(Wl(e.translate)||isNaN(e.translate))&&(e.translate=0)}function uo(e,t,n,r){kf(e.x,t.x,n.x,r?r.originX:void 0),kf(e.y,t.y,n.y,r?r.originY:void 0)}function bf(e,t,n){e.min=n.min+t.min,e.max=e.min+Ze(t)}function GC(e,t,n){bf(e.x,t.x,n.x),bf(e.y,t.y,n.y)}function Nf(e,t,n){e.min=t.min-n.min,e.max=e.min+Ze(t)}function co(e,t,n){Nf(e.x,t.x,n.x),Nf(e.y,t.y,n.y)}function KC(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?le(n,e,r.max):Math.min(e,n)),e}function Rf(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 YC(e,{top:t,left:n,bottom:r,right:o}){return{x:Rf(e.x,n,o),y:Rf(e.y,t,r)}}function jf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Do(t.min,t.max-r,e.min):r>o&&(n=Do(e.min,e.max-o,t.min)),dn(0,1,n)}function qC(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 Gl=.35;function ZC(e=Gl){return e===!1?e=0:e===!0&&(e=Gl),{x:Af(e,"left","right"),y:Af(e,"top","bottom")}}function Af(e,t,n){return{min:Mf(e,t),max:Mf(e,n)}}function Mf(e,t){return typeof e=="number"?e:e[t]||0}const Lf=()=>({translate:0,scale:1,origin:0,originPoint:0}),lr=()=>({x:Lf(),y:Lf()}),Df=()=>({min:0,max:0}),me=()=>({x:Df(),y:Df()});function nt(e){return[e("x"),e("y")]}function rv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function JC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eP(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 La(e){return e===void 0||e===1}function Kl({scale:e,scaleX:t,scaleY:n}){return!La(e)||!La(t)||!La(n)}function Cn(e){return Kl(e)||ov(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ov(e){return If(e.x)||If(e.y)}function If(e){return e&&e!=="0%"}function ms(e,t,n){const r=e-n,o=t*r;return n+o}function Of(e,t,n,r,o){return o!==void 0&&(e=ms(e,o,r)),ms(e,n,r)+t}function Yl(e,t=0,n=1,r,o){e.min=Of(e.min,t,n,r,o),e.max=Of(e.max,t,n,r,o)}function iv(e,{x:t,y:n}){Yl(e.x,t.translate,t.scale,t.originPoint),Yl(e.y,n.translate,n.scale,n.originPoint)}function tP(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a1.0000000000001||e<.999999999999?e:1}function Gt(e,t){e.min=e.min+t,e.max=e.max+t}function Vf(e,t,[n,r,o]){const i=t[o]!==void 0?t[o]:.5,s=le(e.min,e.max,i);Yl(e,t[n],t[r],s,t.scale)}const nP=["x","scaleX","originX"],rP=["y","scaleY","originY"];function ur(e,t){Vf(e.x,t,nP),Vf(e.y,t,rP)}function sv(e,t){return rv(eP(e.getBoundingClientRect(),t))}function oP(e,t,n){const r=sv(e,n),{scroll:o}=t;return o&&(Gt(r.x,o.offset.x),Gt(r.y,o.offset.y)),r}const av=({current:e})=>e?e.ownerDocument.defaultView:null,iP=new WeakMap;class sP{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=me(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Us(d,"page").point)},i=(d,c)=>{const{drag:f,dragPropagation:m,onDragStart:x}=this.getProps();if(f&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=wg(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),nt(S=>{let v=this.getAxisMotionValue(S).get()||0;if(Pt.test(v)){const{projection:h}=this.visualElement;if(h&&h.layout){const g=h.layout.layoutBox[S];g&&(v=Ze(g)*(parseFloat(v)/100))}}this.originPoint[S]=v}),x&&ne.update(()=>x(d,c),!1,!0);const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},s=(d,c)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:x,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:S}=c;if(m&&this.currentDirection===null){this.currentDirection=aP(S),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",c.point,S),this.updateAxis("y",c.point,S),this.visualElement.render(),y&&y(d,c)},a=(d,c)=>this.stop(d,c),l=()=>nt(d=>{var c;return this.getAnimationState(d)==="paused"&&((c=this.getAxisMotionValue(d).animation)===null||c===void 0?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new tv(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:av(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ne.update(()=>i(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:o}=this.getProps();if(!r||!hi(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=KC(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&sr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=YC(o.layoutBox,n):this.constraints=!1,this.elastic=ZC(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&nt(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=qC(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!sr(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=oP(r,o.root,this.visualElement.getTransformPagePoint());let s=QC(o.layout.layoutBox,i);if(n){const a=n(JC(s));this.hasMutatedConstraints=!!a,a&&(s=rv(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=nt(d=>{if(!hi(d,n,this.currentDirection))return;let c=l&&l[d]||{};s&&(c={min:0,max:0});const f=o?200:1e6,m=o?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Cc(t,r,0,n))}stopAnimation(){nt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nt(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(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){nt(n=>{const{drag:r}=this.getProps();if(!hi(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-le(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!sr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};nt(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();o[s]=XC({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),nt(s=>{if(!hi(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(le(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;iP.set(this.visualElement,this);const t=this.visualElement.current,n=Lt(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();sr(l)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const s=At(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(nt(d=>{const c=this.getAxisMotionValue(d);c&&(this.originPoint[d]+=l[d].translate,c.set(c.get()+l[d].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Gl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function hi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lP extends vn{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new sP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ff=e=>(t,n)=>{e&&ne.update(()=>e(t,n))};class uP extends vn{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new tv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:av(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ff(t),onStart:Ff(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&ne.update(()=>o(i,s))}}}mount(){this.removePointerDownListener=Lt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function cP(){const e=w.useContext(sc);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Mi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Hr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_.test(e))e=parseFloat(e);else return e;const n=zf(e,t.target.x),r=zf(e,t.target.y);return`${n}% ${r}%`}},dP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=fn.parse(e);if(o.length>5)return r;const i=fn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const u=le(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),i(o)}};class fP extends X.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;yS(pP),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Mi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||ne.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function lv(e){const[t,n]=cP(),r=w.useContext(rg);return X.createElement(fP,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(og),isPresent:t,safeToRemove:n})}const pP={borderRadius:{...Hr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hr,borderTopRightRadius:Hr,borderBottomLeftRadius:Hr,borderBottomRightRadius:Hr,boxShadow:dP},uv=["TopLeft","TopRight","BottomLeft","BottomRight"],hP=uv.length,Bf=e=>typeof e=="string"?parseFloat(e):e,Uf=e=>typeof e=="number"||_.test(e);function mP(e,t,n,r,o,i){o?(e.opacity=le(0,n.opacity!==void 0?n.opacity:1,gP(r)),e.opacityExit=le(t.opacity!==void 0?t.opacity:1,0,vP(r))):i&&(e.opacity=le(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(Do(e,t,r))}function Hf(e,t){e.min=t.min,e.max=t.max}function tt(e,t){Hf(e.x,t.x),Hf(e.y,t.y)}function Wf(e,t,n,r,o){return e-=t,e=ms(e,1/n,r),o!==void 0&&(e=ms(e,1/o,r)),e}function yP(e,t=0,n=1,r=.5,o,i=e,s=e){if(Pt.test(t)&&(t=parseFloat(t),t=le(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=le(i.min,i.max,r);e===i&&(a-=t),e.min=Wf(e.min,t,n,a,o),e.max=Wf(e.max,t,n,a,o)}function Gf(e,t,[n,r,o],i,s){yP(e,t[n],t[r],t[o],t.scale,i,s)}const xP=["x","scaleX","originX"],wP=["y","scaleY","originY"];function Kf(e,t,n,r){Gf(e.x,t,xP,n?n.x:void 0,r?r.x:void 0),Gf(e.y,t,wP,n?n.y:void 0,r?r.y:void 0)}function Yf(e){return e.translate===0&&e.scale===1}function dv(e){return Yf(e.x)&&Yf(e.y)}function SP(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function fv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Qf(e){return Ze(e.x)/Ze(e.y)}class TP{constructor(){this.members=[]}add(t){Pc(this.members,t),t.scheduleRender()}remove(t){if(Ec(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;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:o}=t.options;o===!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 Xf(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:d}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const CP=(e,t)=>e.depth-t.depth;class PP{constructor(){this.children=[],this.isDirty=!1}add(t){Pc(this.children,t),this.isDirty=!0}remove(t){Ec(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(CP),this.isDirty=!1,this.children.forEach(t)}}function EP(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Ft(r),e(i-t))};return ne.read(r,!0),()=>Ft(r)}function kP(e){window.MotionDebug&&window.MotionDebug.record(e)}function bP(e){return e instanceof SVGElement&&e.tagName!=="svg"}function NP(e,t,n){const r=He(e)?e:Pr(e);return r.start(Cc("",r,t,n)),r.animation}const qf=["","X","Y","Z"],RP={visibility:"hidden"},Zf=1e3;let jP=0;const Pn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function pv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=jP++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Pn.totalNodes=Pn.resolvedTargetDeltas=Pn.recalculatedProjection=0,this.nodes.forEach(LP),this.nodes.forEach(VP),this.nodes.forEach(FP),this.nodes.forEach(DP),kP(Pn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=EP(f,250),Mi.hasAnimatedSinceResize&&(Mi.hasAnimatedSinceResize=!1,this.nodes.forEach(ep))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeTargetChanged:m,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||HP,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=d.getProps(),h=!this.targetLayout||!fv(this.targetLayout,x)||m,g=!f&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,g);const T={...Tc(y,"layout"),onPlay:S,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||ep(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ft(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(zP),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;dthis.update()))}clearAllSnapshots(){this.nodes.forEach(IP),this.sharedNodes.forEach(BP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ne.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ne.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 l=0;l{const P=T/1e3;tp(c.x,s.x,P),tp(c.y,s.y,P),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(co(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),UP(this.relativeTarget,this.relativeTargetOrigin,f,P),g&&SP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=me()),tt(g,this.relativeTarget)),y&&(this.animationValues=d,mP(d,u,this.latestValues,P,h,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ne.update(()=>{Mi.hasAnimatedSinceResize=!0,this.currentAnimation=NP(0,Zf,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&hv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||me();const c=Ze(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+c;const f=Ze(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}tt(a,l),ur(a,d),uo(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new TP),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let d=0;d{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Jf),this.root.sharedNodes.clear()}}}function AP(e){e.updateLayout()}function MP(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:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?nt(c=>{const f=s?n.measuredBox[c]:n.layoutBox[c],m=Ze(f);f.min=r[c].min,f.max=f.min+m}):hv(i,n.layoutBox,r)&&nt(c=>{const f=s?n.measuredBox[c]:n.layoutBox[c],m=Ze(r[c]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+m)});const a=lr();uo(a,r,n.layoutBox);const l=lr();s?uo(l,e.applyTransform(o,!0),n.measuredBox):uo(l,r,n.layoutBox);const u=!dv(a);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:m}=c;if(f&&m){const x=me();co(x,n.layoutBox,f.layoutBox);const y=me();co(y,r,m.layoutBox),fv(x,y)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function LP(e){Pn.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 DP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function IP(e){e.clearSnapshot()}function Jf(e){e.clearMeasurements()}function OP(e){e.isLayoutDirty=!1}function _P(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ep(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function VP(e){e.resolveTargetDelta()}function FP(e){e.calcProjection()}function zP(e){e.resetRotation()}function BP(e){e.removeLeadSnapshot()}function tp(e,t,n){e.translate=le(t.translate,0,n),e.scale=le(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function np(e,t,n,r){e.min=le(t.min,n.min,r),e.max=le(t.max,n.max,r)}function UP(e,t,n,r){np(e.x,t.x,n.x,r),np(e.y,t.y,n.y,r)}function $P(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const HP={duration:.45,ease:[.4,0,.1,1]},rp=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),op=rp("applewebkit/")&&!rp("chrome/")?Math.round:fe;function ip(e){e.min=op(e.min),e.max=op(e.max)}function WP(e){ip(e.x),ip(e.y)}function hv(e,t,n){return e==="position"||e==="preserve-aspect"&&!Wl(Qf(t),Qf(n),.2)}const GP=pv({attachResizeListener:(e,t)=>At(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Da={current:void 0},mv=pv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Da.current){const e=new GP({});e.mount(window),e.setOptions({layoutScroll:!0}),Da.current=e}return Da.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KP={pan:{Feature:uP},drag:{Feature:lP,ProjectionNode:mv,MeasureLayout:lv}},YP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function QP(e){const t=YP.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Ql(e,t,n=1){const[r,o]=QP(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return qg(s)?parseFloat(s):s}else return Vl(o)?Ql(o,t,n+1):o}function XP(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const i=o.get();if(!Vl(i))return;const s=Ql(i,r);s&&o.set(s)});for(const o in t){const i=t[o];if(!Vl(i))continue;const s=Ql(i,r);s&&(t[o]=s,n||(n={}),n[o]===void 0&&(n[o]=i))}return{target:t,transitionEnd:n}}const qP=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),gv=e=>qP.has(e),ZP=e=>Object.keys(e).some(gv),sp=e=>e===$n||e===_,ap=(e,t)=>parseFloat(e.split(", ")[t]),lp=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return ap(o[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?ap(i[1],e):0}},JP=new Set(["x","y","z"]),eE=zo.filter(e=>!JP.has(e));function tE(e){const t=[];return eE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Er={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:lp(4,13),y:lp(5,14)};Er.translateX=Er.x;Er.translateY=Er.y;const nE=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Er[u](r,i)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Er[u](l,i)}),e},rE=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(gv);let i=[],s=!1;const a=[];if(o.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],c=$r(d);const f=t[l];let m;if(cs(f)){const x=f.length,y=f[0]===null?1:0;d=f[y],c=$r(d);for(let S=y;S=0?window.pageYOffset:null,u=nE(t,e,a);return i.length&&i.forEach(([d,c])=>{e.getValue(d).set(c)}),e.render(),Vs&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function oE(e,t,n,r){return ZP(t)?rE(e,t,n,r):{target:t,transitionEnd:r}}const iE=(e,t,n,r)=>{const o=XP(e,t,r);return t=o.target,r=o.transitionEnd,oE(e,t,n,r)},Xl={current:null},vv={current:!1};function sE(){if(vv.current=!0,!!Vs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xl.current=e.matches;e.addListener(t),t()}else Xl.current=!1}function aE(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(He(i))e.addValue(o,i),hs(r)&&r.add(o);else if(He(s))e.addValue(o,Pr(i,{owner:e})),hs(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const a=e.getValue(o);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(o);e.addValue(o,Pr(a!==void 0?a:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const up=new WeakMap,yv=Object.keys(Lo),lE=yv.length,cp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],uE=uc.length;class cE{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>ne.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.isControllingVariants=zs(n),this.isVariantNode=ng(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const c in d){const f=d[c];a[c]!==void 0&&He(f)&&(f.set(a[c],!1),hs(u)&&u.add(c))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,up.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)),vv.current||sE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){up.delete(this.current),this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Un.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ne.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,i){let s,a;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:f,layoutRoot:m})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):me()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(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=Pr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=gc(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!He(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new kc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class xv extends cE{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},i){let s=bC(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),s&&(s=o(s))),i){EC(this,r,s);const a=iE(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function dE(e){return window.getComputedStyle(e)}class fE extends xv{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(Un.has(n)){const r=Sc(n);return r&&r.default||0}else{const r=dE(t),o=(ag(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return sv(t,n)}build(t,n,r,o){dc(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return mc(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;He(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){pg(t,n,r,o)}}class pE extends xv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Un.has(n)){const r=Sc(n);return r&&r.default||0}return n=hg.has(n)?n:ac(n),t.getAttribute(n)}measureInstanceViewportBox(){return me()}scrapeMotionValuesFromProps(t,n){return gg(t,n)}build(t,n,r,o){pc(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){mg(t,n,r,o)}mount(t){this.isSVGTag=hc(t.tagName),super.mount(t)}}const hE=(e,t)=>cc(e)?new pE(t,{enableHardwareAcceleration:!1}):new fE(t,{enableHardwareAcceleration:!0}),mE={layout:{ProjectionNode:mv,MeasureLayout:lv}},gE={...UC,...lT,...KP,...mE},Ae=gS((e,t)=>QS(e,t,gE,hE));function wv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;te&&(t=0,r=n,n=new Map)}return{get:function(s){var a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set:function(s,a){n.has(s)?n.set(s,a):o(s,a)}}}var Pv="!";function PE(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(s){for(var a=[],l=0,u=0,d,c=0;cu?d-u:void 0;return{modifiers:a,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:S}}}function EE(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function kE(e){return{cache:CE(e.cacheSize),splitModifiers:PE(e),...yE(e)}}var bE=/\s+/;function NE(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(bE).map(function(s){var a=n(s),l=a.modifiers,u=a.hasImportantModifier,d=a.baseClassName,c=a.maybePostfixModifierPosition,f=r(c?d.substring(0,c):d),m=!!c;if(!f){if(!c)return{isTailwindClass:!1,originalClassName:s};if(f=r(d),!f)return{isTailwindClass:!1,originalClassName:s};m=!1}var x=EE(l).join(":"),y=u?x+Pv:x;return{isTailwindClass:!0,modifierId:y,classGroupId:f,originalClassName:s,hasPostfixModifier:m}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var a=s.modifierId,l=s.classGroupId,u=s.hasPostfixModifier,d=a+l;return i.has(d)?!1:(i.add(d),o(l,u).forEach(function(c){return i.add(a+c)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function RE(){for(var e=arguments.length,t=new Array(e),n=0;n{let n=!1;const r=e.map(o=>{const i=hp(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{const{children:i,...s}=r,a=w.Children.toArray(i),l=a.find(YE);if(l){const u=l.props.children,d=a.map(c=>c===l?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:c);return p.jsx(t,{...s,ref:o,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var WE=gs("Slot");function GE(e){const t=w.forwardRef((n,r)=>{const{children:o,...i}=n;if(w.isValidElement(o)){const s=XE(o),a=QE(i,o.props);return o.type!==w.Fragment&&(a.ref=r?bv(r,s):s),w.cloneElement(o,a)}return w.Children.count(o)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var KE=Symbol("radix.slottable");function YE(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===KE}function QE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function XE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const mp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gp=Sv,Nv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],c=i==null?void 0:i[u];if(d===null)return null;const f=mp(d)||mp(c);return o[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:f,...m}=d;return Object.entries(m).every(x=>{let[y,S]=x;return Array.isArray(S)?S.includes({...i,...a}[y]):{...i,...a}[y]===S})?[...u,c,f]:u},[]);return gp(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},qE=Nv("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ce=X.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?WE:"button";return p.jsx(s,{className:yt(qE({variant:t,size:n,className:e})),ref:i,...o})});Ce.displayName="Button";var ZE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const JE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),se=(e,t)=>{const n=w.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:s,children:a,...l},u)=>w.createElement("svg",{ref:u,...ZE,width:o,height:o,stroke:r,strokeWidth:s?Number(i)*24/Number(o):i,className:`lucide lucide-${JE(e)}`,...l},[...t.map(([d,c])=>w.createElement(d,c)),...(Array.isArray(a)?a:[a])||[]]));return n.displayName=`${e}`,n},ek=se("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),vp=se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),tk=se("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),nk=se("Coffee",[["path",{d:"M17 8h1a4 4 0 1 1 0 8h-1",key:"jx4kbh"}],["path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z",key:"1bxrl0"}],["line",{x1:"6",x2:"6",y1:"2",y2:"4",key:"1cr9l3"}],["line",{x1:"10",x2:"10",y1:"2",y2:"4",key:"170wym"}],["line",{x1:"14",x2:"14",y1:"2",y2:"4",key:"1c5f70"}]]),Jl=se("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),Rv=se("FileImage",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["circle",{cx:"10",cy:"13",r:"2",key:"6v46hv"}],["path",{d:"m20 17-1.09-1.09a2 2 0 0 0-2.82 0L10 22",key:"17vly1"}]]),rk=se("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),eu=se("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),ok=se("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]),jv=se("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",key:"1xcu5"}],["circle",{cx:"17.5",cy:"10.5",r:".5",key:"736e4u"}],["circle",{cx:"8.5",cy:"7.5",r:".5",key:"clrty"}],["circle",{cx:"6.5",cy:"12.5",r:".5",key:"1s4xz9"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]),ik=se("Printer",[["polyline",{points:"6 9 6 2 18 2 18 9",key:"1306q4"}],["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["rect",{width:"12",height:"8",x:"6",y:"14",key:"5ipwut"}]]),sk=se("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),ak=se("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]),lk=se("Shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]),tu=se("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]),uk=se("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]),ck=se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),dk=se("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),fk=se("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),pk=se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),hk=se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),mk=se("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),gk=se("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),vk=se("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),yk=1;let Ia=0;function xk(){return Ia=(Ia+1)%Number.MAX_VALUE,Ia.toString()}const Le={state:{toasts:[]},listeners:[],getState:()=>Le.state,setState:e=>{typeof e=="function"?Le.state=e(Le.state):Le.state={...Le.state,...e},Le.listeners.forEach(t=>t(Le.state))},subscribe:e=>(Le.listeners.push(e),()=>{Le.listeners=Le.listeners.filter(t=>t!==e)})},bt=({...e})=>{const t=xk(),n=o=>Le.setState(i=>({...i,toasts:i.toasts.map(s=>s.id===t?{...s,...o}:s)})),r=()=>Le.setState(o=>({...o,toasts:o.toasts.filter(i=>i.id!==t)}));return Le.setState(o=>({...o,toasts:[{...e,id:t,dismiss:r},...o.toasts].slice(0,yk)})),{id:t,dismiss:r,update:n}};function wk(){const[e,t]=w.useState(Le.getState());return w.useEffect(()=>Le.subscribe(r=>{t(r)}),[]),w.useEffect(()=>{const n=[];return e.toasts.forEach(r=>{if(r.duration===1/0)return;const o=setTimeout(()=>{r.dismiss()},r.duration||5e3);n.push(o)}),()=>{n.forEach(r=>clearTimeout(r))}},[e.toasts]),{toast:bt,toasts:e.toasts}}const Sk=()=>{const e=Um(),t=()=>{e("/studio")},n=s=>{bt({title:"🚧 Feature Coming Soon!",description:`${s} isn't implemented yet—but don't worry! You can request it in your next prompt! 🚀`})},r=[{icon:p.jsx(eu,{className:"w-8 h-8"}),title:"High-Resolution Output",description:"Generate designs at 1200+ DPI with pixel widths from 3,600 to 14,000 pixels for professional print quality."},{icon:p.jsx(Rv,{className:"w-8 h-8"}),title:"Multiple Export Formats",description:"Export in TIFF, SVG, PDF, PNG, AI, JPG, and JPEG formats to meet any POD service requirements."},{icon:p.jsx(jv,{className:"w-8 h-8"}),title:"Design Templates",description:"Choose from logos, seamless patterns, and text-based designs with professional styling options."},{icon:p.jsx(ik,{className:"w-8 h-8"}),title:"Product Visualization",description:"Preview your designs on t-shirts, mugs, posters, and other POD items before finalizing."},{icon:p.jsx(mk,{className:"w-8 h-8"}),title:"Real-time Editing",description:"Make instant changes with our intuitive design editor and see results immediately."},{icon:p.jsx(Jl,{className:"w-8 h-8"}),title:"Cloud Storage",description:"Save, edit, and access your designs from anywhere with automatic cloud synchronization."}],o=[{name:"Sarah Chen",role:"POD Entrepreneur",content:"This tool revolutionized my design workflow. The high-resolution exports are perfect for my print-on-demand business!",rating:5},{name:"Mike Rodriguez",role:"Graphic Designer",content:"Finally, a design tool that understands print requirements. The multiple export formats save me hours of work.",rating:5},{name:"Emma Thompson",role:"Creative Director",content:"The product visualization feature is incredible. I can show clients exactly how designs will look on products.",rating:5}],i=[{name:"Starter",price:"$9",period:"/month",description:"Perfect for beginners",features:["10 designs per month","Basic templates","Standard resolution (1200 DPI)","5 export formats","Email support"],popular:!1},{name:"Professional",price:"$29",period:"/month",description:"For serious creators",features:["Unlimited designs","Premium templates","Ultra-high resolution (up to 14K pixels)","All export formats","Product visualization","Priority support","Cloud storage"],popular:!0},{name:"Enterprise",price:"$99",period:"/month",description:"For teams and agencies",features:["Everything in Professional","Team collaboration","Custom templates","API access","White-label options","Dedicated support","Advanced analytics"],popular:!1}];return p.jsxs("div",{className:"min-h-screen",children:[p.jsx("nav",{className:"fixed top-0 w-full z-50 glass-effect",children:p.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:p.jsxs("div",{className:"flex justify-between items-center h-16",children:[p.jsxs(Ae.div,{className:"flex items-center space-x-2",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5},children:[p.jsx(tu,{className:"w-8 h-8 text-blue-400"}),p.jsx("span",{className:"text-xl font-bold gradient-text",children:"POD Studio"})]}),p.jsxs(Ae.div,{className:"flex items-center space-x-4",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.2},children:[p.jsx(Ce,{variant:"ghost",onClick:()=>n("Login"),className:"text-white hover:text-blue-400",children:"Login"}),p.jsx(Ce,{onClick:t,className:"cta-button text-white font-semibold px-6",children:"Get Started"})]})]})})}),p.jsx("section",{className:"pt-32 pb-20 px-4 sm:px-6 lg:px-8",children:p.jsxs("div",{className:"max-w-7xl mx-auto text-center",children:[p.jsxs(Ae.h1,{className:"text-5xl md:text-7xl font-black mb-8 leading-tight",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8},children:["Create ",p.jsx("span",{className:"hero-gradient",children:"Print-Ready"}),p.jsx("br",{}),"Designs That Sell"]}),p.jsx(Ae.p,{className:"text-xl md:text-2xl text-gray-300 mb-12 max-w-3xl mx-auto leading-relaxed",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},children:"Professional design studio for print-on-demand creators. Generate high-resolution designs, export in multiple formats, and visualize on real products."}),p.jsxs(Ae.div,{className:"flex flex-col sm:flex-row gap-4 justify-center items-center",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.4},children:[p.jsxs(Ce,{onClick:t,size:"lg",className:"cta-button text-white font-semibold px-8 py-4 text-lg",children:["Start Creating ",p.jsx(vp,{className:"ml-2 w-5 h-5"})]}),p.jsx(Ce,{variant:"outline",size:"lg",onClick:()=>n("Demo"),className:"border-white/20 text-white hover:bg-white/10 px-8 py-4 text-lg",children:"Watch Demo"})]})]})}),p.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:p.jsxs("div",{className:"max-w-7xl mx-auto",children:[p.jsxs(Ae.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:[p.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 gradient-text",children:"Everything You Need to Succeed"}),p.jsx("p",{className:"text-xl text-gray-300 max-w-2xl mx-auto",children:"Professional tools designed specifically for print-on-demand creators"})]}),p.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:r.map((s,a)=>p.jsxs(Ae.div,{className:"glass-effect p-8 rounded-2xl hover:bg-white/10 transition-all duration-300",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:a*.1},viewport:{once:!0},whileHover:{y:-5},children:[p.jsx("div",{className:"feature-icon mb-4",children:s.icon}),p.jsx("h3",{className:"text-xl font-semibold mb-3 text-white",children:s.title}),p.jsx("p",{className:"text-gray-300 leading-relaxed",children:s.description})]},a))})]})}),p.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:p.jsx("div",{className:"max-w-7xl mx-auto",children:p.jsx("div",{className:"grid md:grid-cols-4 gap-8 text-center",children:[{icon:p.jsx(pk,{className:"w-8 h-8"}),number:"50K+",label:"Active Creators"},{icon:p.jsx(eu,{className:"w-8 h-8"}),number:"2M+",label:"Designs Created"},{icon:p.jsx(Jl,{className:"w-8 h-8"}),number:"500K+",label:"Downloads"},{icon:p.jsx(dk,{className:"w-8 h-8"}),number:"99.9%",label:"Uptime"}].map((s,a)=>p.jsxs(Ae.div,{className:"glass-effect p-6 rounded-xl",initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},transition:{duration:.6,delay:a*.1},viewport:{once:!0},children:[p.jsx("div",{className:"feature-icon mb-3 flex justify-center",children:s.icon}),p.jsx("div",{className:"text-3xl font-bold text-white mb-2",children:s.number}),p.jsx("div",{className:"text-gray-300",children:s.label})]},a))})})}),p.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:p.jsxs("div",{className:"max-w-7xl mx-auto",children:[p.jsx(Ae.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:p.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 gradient-text",children:"Loved by Creators Worldwide"})}),p.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:o.map((s,a)=>p.jsxs(Ae.div,{className:"testimonial-card p-8 rounded-2xl",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:a*.1},viewport:{once:!0},children:[p.jsx("div",{className:"flex mb-4",children:[...Array(s.rating)].map((l,u)=>p.jsx(uk,{className:"w-5 h-5 text-yellow-400 fill-current"},u))}),p.jsxs("p",{className:"text-gray-300 mb-6 leading-relaxed",children:['"',s.content,'"']}),p.jsxs("div",{children:[p.jsx("div",{className:"font-semibold text-white",children:s.name}),p.jsx("div",{className:"text-gray-400",children:s.role})]})]},a))})]})}),p.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:p.jsxs("div",{className:"max-w-7xl mx-auto",children:[p.jsxs(Ae.div,{className:"text-center mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:[p.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 gradient-text",children:"Simple, Transparent Pricing"}),p.jsx("p",{className:"text-xl text-gray-300",children:"Choose the plan that fits your creative needs"})]}),p.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:i.map((s,a)=>p.jsxs(Ae.div,{className:`pricing-card p-8 rounded-2xl relative ${s.popular?"ring-2 ring-blue-500":""}`,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:a*.1},viewport:{once:!0},children:[s.popular&&p.jsx("div",{className:"absolute -top-4 left-1/2 transform -translate-x-1/2",children:p.jsx("span",{className:"bg-gradient-to-r from-blue-500 to-purple-600 text-white px-4 py-1 rounded-full text-sm font-semibold",children:"Most Popular"})}),p.jsxs("div",{className:"text-center mb-8",children:[p.jsx("h3",{className:"text-2xl font-bold text-white mb-2",children:s.name}),p.jsx("p",{className:"text-gray-400 mb-4",children:s.description}),p.jsxs("div",{className:"flex items-baseline justify-center",children:[p.jsx("span",{className:"text-5xl font-bold text-white",children:s.price}),p.jsx("span",{className:"text-gray-400 ml-1",children:s.period})]})]}),p.jsx("ul",{className:"space-y-4 mb-8",children:s.features.map((l,u)=>p.jsxs("li",{className:"flex items-center",children:[p.jsx(tk,{className:"w-5 h-5 text-green-400 mr-3 flex-shrink-0"}),p.jsx("span",{className:"text-gray-300",children:l})]},u))}),p.jsx(Ce,{className:`w-full py-3 ${s.popular?"cta-button text-white font-semibold":"border border-white/20 text-white hover:bg-white/10"}`,variant:s.popular?"default":"outline",onClick:()=>n(`${s.name} Plan`),children:"Get Started"})]},a))})]})}),p.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:p.jsx("div",{className:"max-w-4xl mx-auto text-center",children:p.jsxs(Ae.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:[p.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 gradient-text",children:"Ready to Create Amazing Designs?"}),p.jsx("p",{className:"text-xl text-gray-300 mb-8",children:"Join thousands of creators who trust POD Studio for their print-on-demand success"}),p.jsxs(Ce,{onClick:t,size:"lg",className:"cta-button text-white font-semibold px-12 py-4 text-lg",children:["Start Your Free Trial ",p.jsx(vp,{className:"ml-2 w-5 h-5"})]})]})})}),p.jsx("footer",{className:"py-12 px-4 sm:px-6 lg:px-8 border-t border-white/10",children:p.jsxs("div",{className:"max-w-7xl mx-auto",children:[p.jsxs("div",{className:"grid md:grid-cols-4 gap-8",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[p.jsx(tu,{className:"w-6 h-6 text-blue-400"}),p.jsx("span",{className:"text-lg font-bold gradient-text",children:"POD Studio"})]}),p.jsx("p",{className:"text-gray-400",children:"Professional design tools for print-on-demand success."})]}),p.jsxs("div",{children:[p.jsx("span",{className:"font-semibold text-white mb-4 block",children:"Product"}),p.jsxs("ul",{className:"space-y-2 text-gray-400",children:[p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Features"),className:"hover:text-white transition-colors",children:"Features"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Templates"),className:"hover:text-white transition-colors",children:"Templates"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Pricing"),className:"hover:text-white transition-colors",children:"Pricing"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("API"),className:"hover:text-white transition-colors",children:"API"})})]})]}),p.jsxs("div",{children:[p.jsx("span",{className:"font-semibold text-white mb-4 block",children:"Support"}),p.jsxs("ul",{className:"space-y-2 text-gray-400",children:[p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Help Center"),className:"hover:text-white transition-colors",children:"Help Center"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Contact"),className:"hover:text-white transition-colors",children:"Contact"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Community"),className:"hover:text-white transition-colors",children:"Community"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Status"),className:"hover:text-white transition-colors",children:"Status"})})]})]}),p.jsxs("div",{children:[p.jsx("span",{className:"font-semibold text-white mb-4 block",children:"Company"}),p.jsxs("ul",{className:"space-y-2 text-gray-400",children:[p.jsx("li",{children:p.jsx("button",{onClick:()=>n("About"),className:"hover:text-white transition-colors",children:"About"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Blog"),className:"hover:text-white transition-colors",children:"Blog"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Careers"),className:"hover:text-white transition-colors",children:"Careers"})}),p.jsx("li",{children:p.jsx("button",{onClick:()=>n("Privacy"),className:"hover:text-white transition-colors",children:"Privacy"})})]})]})]}),p.jsx("div",{className:"border-t border-white/10 mt-8 pt-8 text-center text-gray-400",children:p.jsx("p",{children:"© 2024 POD Studio. All rights reserved."})})]})})]})};function Q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ho(e,t=[]){let n=[];function r(i,s){const a=w.createContext(s),l=n.length;n=[...n,s];const u=c=>{var v;const{scope:f,children:m,...x}=c,y=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,S=w.useMemo(()=>x,Object.values(x));return p.jsx(y.Provider,{value:S,children:m})};u.displayName=i+"Provider";function d(c,f){var y;const m=((y=f==null?void 0:f[e])==null?void 0:y[l])||a,x=w.useContext(m);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>w.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Tk(o,...t)]}function Tk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...a,...c}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Nc(e){const t=e+"CollectionProvider",[n,r]=Ho(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:S,children:v}=y,h=X.useRef(null),g=X.useRef(new Map).current;return p.jsx(o,{scope:S,itemMap:g,collectionRef:h,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=gs(a),u=X.forwardRef((y,S)=>{const{scope:v,children:h}=y,g=i(a,v),T=We(S,g.collectionRef);return p.jsx(l,{ref:T,children:h})});u.displayName=a;const d=e+"CollectionItemSlot",c="data-radix-collection-item",f=gs(d),m=X.forwardRef((y,S)=>{const{scope:v,children:h,...g}=y,T=X.useRef(null),P=We(S,T),C=i(d,v);return X.useEffect(()=>(C.itemMap.set(T,{ref:T,...g}),()=>void C.itemMap.delete(T))),p.jsx(f,{[c]:"",ref:P,children:h})});m.displayName=d;function x(y){const S=i(e+"CollectionConsumer",y);return X.useCallback(()=>{const h=S.collectionRef.current;if(!h)return[];const g=Array.from(h.querySelectorAll(`[${c}]`));return Array.from(S.itemMap.values()).sort((C,E)=>g.indexOf(C.ref.current)-g.indexOf(E.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},x,r]}var Fn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Ck=hu[" useId ".trim().toString()]||(()=>{}),Pk=0;function Av(e){const[t,n]=w.useState(Ck());return Fn(()=>{e||n(r=>r??String(Pk++))},[e]),e||(t?`radix-${t}`:"")}var Ek=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],he=Ek.reduce((e,t)=>{const n=gs(`Primitive.${t}`),r=w.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mv(e,t){e&&Ls.flushSync(()=>e.dispatchEvent(t))}function pn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var kk=hu[" useInsertionEffect ".trim().toString()]||Fn;function Hs({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=bk({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=w.useRef(e!==void 0);w.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=w.useCallback(d=>{var c;if(a){const f=Nk(d)?d(e):d;f!==e&&((c=s.current)==null||c.call(s,f))}else i(d)},[a,e,i,s]);return[l,u]}function bk({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),o=w.useRef(n),i=w.useRef(t);return kk(()=>{i.current=t},[t]),w.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Nk(e){return typeof e=="function"}var Rk=w.createContext(void 0);function Rc(e){const t=w.useContext(Rk);return e||t||"ltr"}var Oa="rovingFocusGroup.onEntryFocus",jk={bubbles:!1,cancelable:!0},Wo="RovingFocusGroup",[nu,Lv,Ak]=Nc(Wo),[Mk,Dv]=Ho(Wo,[Ak]),[Lk,Dk]=Mk(Wo),Iv=w.forwardRef((e,t)=>p.jsx(nu.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(nu.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ik,{...e,ref:t})})}));Iv.displayName=Wo;var Ik=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,f=w.useRef(null),m=We(t,f),x=Rc(i),[y,S]=Hs({prop:s,defaultProp:a??null,onChange:l,caller:Wo}),[v,h]=w.useState(!1),g=pn(u),T=Lv(n),P=w.useRef(!1),[C,E]=w.useState(0);return w.useEffect(()=>{const k=f.current;if(k)return k.addEventListener(Oa,g),()=>k.removeEventListener(Oa,g)},[g]),p.jsx(Lk,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:y,onItemFocus:w.useCallback(k=>S(k),[S]),onItemShiftTab:w.useCallback(()=>h(!0),[]),onFocusableItemAdd:w.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:w.useCallback(()=>E(k=>k-1),[]),children:p.jsx(he.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...c,ref:m,style:{outline:"none",...e.style},onMouseDown:Q(e.onMouseDown,()=>{P.current=!0}),onFocus:Q(e.onFocus,k=>{const M=!P.current;if(k.target===k.currentTarget&&M&&!v){const R=new CustomEvent(Oa,jk);if(k.currentTarget.dispatchEvent(R),!R.defaultPrevented){const V=T().filter(O=>O.focusable),D=V.find(O=>O.active),W=V.find(O=>O.id===y),G=[D,W,...V].filter(Boolean).map(O=>O.ref.current);Vv(G,d)}}P.current=!1}),onBlur:Q(e.onBlur,()=>h(!1))})})}),Ov="RovingFocusGroupItem",_v=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=Av(),u=i||l,d=Dk(Ov,n),c=d.currentTabStopId===u,f=Lv(n),{onFocusableItemAdd:m,onFocusableItemRemove:x,currentTabStopId:y}=d;return w.useEffect(()=>{if(r)return m(),()=>x()},[r,m,x]),p.jsx(nu.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:p.jsx(he.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Q(e.onMouseDown,S=>{r?d.onItemFocus(u):S.preventDefault()}),onFocus:Q(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Q(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){d.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const v=Vk(S,d.orientation,d.dir);if(v!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let g=f().filter(T=>T.focusable).map(T=>T.ref.current);if(v==="last")g.reverse();else if(v==="prev"||v==="next"){v==="prev"&&g.reverse();const T=g.indexOf(S.currentTarget);g=d.loop?Fk(g,T+1):g.slice(T+1)}setTimeout(()=>Vv(g))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:y!=null}):s})})});_v.displayName=Ov;var Ok={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _k(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Vk(e,t,n){const r=_k(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ok[r]}function Vv(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Fk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zk=Iv,Bk=_v;function Uk(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var jc=e=>{const{present:t,children:n}=e,r=$k(t),o=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),i=We(r.ref,Hk(o));return typeof n=="function"||r.isPresent?w.cloneElement(o,{ref:i}):null};jc.displayName="Presence";function $k(e){const[t,n]=w.useState(),r=w.useRef(null),o=w.useRef(e),i=w.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Uk(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=gi(r.current);i.current=a==="mounted"?u:"none"},[a]),Fn(()=>{const u=r.current,d=o.current;if(d!==e){const f=i.current,m=gi(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Fn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=m=>{const y=gi(r.current).includes(m.animationName);if(m.target===t&&y&&(l("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},f=m=>{m.target===t&&(i.current=gi(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function gi(e){return(e==null?void 0:e.animationName)||"none"}function Hk(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ws="Tabs",[Wk,J2]=Ho(Ws,[Dv]),Fv=Dv(),[Gk,Ac]=Wk(Ws),zv=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=Rc(a),[c,f]=Hs({prop:r,onChange:o,defaultProp:i??"",caller:Ws});return p.jsx(Gk,{scope:n,baseId:Av(),value:c,onValueChange:f,orientation:s,dir:d,activationMode:l,children:p.jsx(he.div,{dir:d,"data-orientation":s,...u,ref:t})})});zv.displayName=Ws;var Bv="TabsList",Uv=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Ac(Bv,n),s=Fv(n);return p.jsx(zk,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:p.jsx(he.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Uv.displayName=Bv;var $v="TabsTrigger",Hv=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=Ac($v,n),a=Fv(n),l=Kv(s.baseId,r),u=Yv(s.baseId,r),d=r===s.value;return p.jsx(Bk,{asChild:!0,...a,focusable:!o,active:d,children:p.jsx(he.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:Q(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:Q(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:Q(e.onFocus,()=>{const c=s.activationMode!=="manual";!d&&!o&&c&&s.onValueChange(r)})})})});Hv.displayName=$v;var Wv="TabsContent",Gv=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=Ac(Wv,n),l=Kv(a.baseId,r),u=Yv(a.baseId,r),d=r===a.value,c=w.useRef(d);return w.useEffect(()=>{const f=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(f)},[]),p.jsx(jc,{present:o||d,children:({present:f})=>p.jsx(he.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:f&&i})})});Gv.displayName=Wv;function Kv(e,t){return`${e}-trigger-${t}`}function Yv(e,t){return`${e}-content-${t}`}var Kk=zv,Qv=Uv,Xv=Hv,qv=Gv;const Yk=Kk,Zv=X.forwardRef(({className:e,...t},n)=>p.jsx(Qv,{ref:n,className:yt("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Zv.displayName=Qv.displayName;const Li=X.forwardRef(({className:e,...t},n)=>p.jsx(Xv,{ref:n,className:yt("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Li.displayName=Xv.displayName;const Di=X.forwardRef(({className:e,...t},n)=>p.jsx(qv,{ref:n,className:yt("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Di.displayName=qv.displayName;function Jv(e,[t,n]){return Math.min(n,Math.max(t,e))}function Qk(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Xk(e){const[t,n]=w.useState(void 0);return Fn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ey=["PageUp","PageDown"],ty=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ny={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Mr="Slider",[ru,qk,Zk]=Nc(Mr),[ry,eb]=Ho(Mr,[Zk]),[Jk,Gs]=ry(Mr),oy=w.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:d,onValueChange:c=()=>{},onValueCommit:f=()=>{},inverted:m=!1,form:x,...y}=e,S=w.useRef(new Set),v=w.useRef(0),g=s==="horizontal"?e2:t2,[T=[],P]=Hs({prop:d,defaultProp:u,onChange:V=>{var W;(W=[...S.current][v.current])==null||W.focus(),c(V)}}),C=w.useRef(T);function E(V){const D=s2(T,V);R(V,D)}function k(V){R(V,v.current)}function M(){const V=C.current[v.current];T[v.current]!==V&&f(T)}function R(V,D,{commit:W}={commit:!1}){const A=c2(i),G=d2(Math.round((V-r)/i)*i+r,A),O=Jv(G,[r,o]);P((Y=[])=>{const N=o2(Y,O,D);if(u2(N,l*i)){v.current=N.indexOf(O);const L=String(N)!==String(Y);return L&&W&&f(N),L?N:Y}else return Y})}return p.jsx(Jk,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:v,thumbs:S.current,values:T,orientation:s,form:x,children:p.jsx(ru.Provider,{scope:e.__scopeSlider,children:p.jsx(ru.Slot,{scope:e.__scopeSlider,children:p.jsx(g,{"aria-disabled":a,"data-disabled":a?"":void 0,...y,ref:t,onPointerDown:Q(y.onPointerDown,()=>{a||(C.current=T)}),min:r,max:o,inverted:m,onSlideStart:a?void 0:E,onSlideMove:a?void 0:k,onSlideEnd:a?void 0:M,onHomeKeyDown:()=>!a&&R(r,0,{commit:!0}),onEndKeyDown:()=>!a&&R(o,T.length-1,{commit:!0}),onStepKeyDown:({event:V,direction:D})=>{if(!a){const G=ey.includes(V.key)||V.shiftKey&&ty.includes(V.key)?10:1,O=v.current,Y=T[O],N=i*G*D;R(Y+N,O,{commit:!0})}}})})})})});oy.displayName=Mr;var[iy,sy]=ry(Mr,{startEdge:"left",endEdge:"right",size:"width",direction:1}),e2=w.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:s,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...d}=e,[c,f]=w.useState(null),m=We(t,g=>f(g)),x=w.useRef(void 0),y=Rc(o),S=y==="ltr",v=S&&!i||!S&&i;function h(g){const T=x.current||c.getBoundingClientRect(),P=[0,T.width],E=Mc(P,v?[n,r]:[r,n]);return x.current=T,E(g-T.left)}return p.jsx(iy,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:p.jsx(ay,{dir:y,"data-orientation":"horizontal",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:g=>{const T=h(g.clientX);s==null||s(T)},onSlideMove:g=>{const T=h(g.clientX);a==null||a(T)},onSlideEnd:()=>{x.current=void 0,l==null||l()},onStepKeyDown:g=>{const P=ny[v?"from-left":"from-right"].includes(g.key);u==null||u({event:g,direction:P?-1:1})}})})}),t2=w.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:s,onSlideEnd:a,onStepKeyDown:l,...u}=e,d=w.useRef(null),c=We(t,d),f=w.useRef(void 0),m=!o;function x(y){const S=f.current||d.current.getBoundingClientRect(),v=[0,S.height],g=Mc(v,m?[r,n]:[n,r]);return f.current=S,g(y-S.top)}return p.jsx(iy,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:p.jsx(ay,{"data-orientation":"vertical",...u,ref:c,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const S=x(y.clientY);i==null||i(S)},onSlideMove:y=>{const S=x(y.clientY);s==null||s(S)},onSlideEnd:()=>{f.current=void 0,a==null||a()},onStepKeyDown:y=>{const v=ny[m?"from-bottom":"from-top"].includes(y.key);l==null||l({event:y,direction:v?-1:1})}})})}),ay=w.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:l,...u}=e,d=Gs(Mr,n);return p.jsx(he.span,{...u,ref:t,onKeyDown:Q(e.onKeyDown,c=>{c.key==="Home"?(s(c),c.preventDefault()):c.key==="End"?(a(c),c.preventDefault()):ey.concat(ty).includes(c.key)&&(l(c),c.preventDefault())}),onPointerDown:Q(e.onPointerDown,c=>{const f=c.target;f.setPointerCapture(c.pointerId),c.preventDefault(),d.thumbs.has(f)?f.focus():r(c)}),onPointerMove:Q(e.onPointerMove,c=>{c.target.hasPointerCapture(c.pointerId)&&o(c)}),onPointerUp:Q(e.onPointerUp,c=>{const f=c.target;f.hasPointerCapture(c.pointerId)&&(f.releasePointerCapture(c.pointerId),i(c))})})}),ly="SliderTrack",uy=w.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Gs(ly,n);return p.jsx(he.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});uy.displayName=ly;var ou="SliderRange",cy=w.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Gs(ou,n),i=sy(ou,n),s=w.useRef(null),a=We(t,s),l=o.values.length,u=o.values.map(f=>py(f,o.min,o.max)),d=l>1?Math.min(...u):0,c=100-Math.max(...u);return p.jsx(he.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:c+"%"}})});cy.displayName=ou;var iu="SliderThumb",dy=w.forwardRef((e,t)=>{const n=qk(e.__scopeSlider),[r,o]=w.useState(null),i=We(t,a=>o(a)),s=w.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return p.jsx(n2,{...e,ref:i,index:s})}),n2=w.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,s=Gs(iu,n),a=sy(iu,n),[l,u]=w.useState(null),d=We(t,h=>u(h)),c=l?s.form||!!l.closest("form"):!0,f=Xk(l),m=s.values[r],x=m===void 0?0:py(m,s.min,s.max),y=i2(r,s.values.length),S=f==null?void 0:f[a.size],v=S?a2(S,x,a.direction):0;return w.useEffect(()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}},[l,s.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${x}% + ${v}px)`},children:[p.jsx(ru.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(he.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":s.min,"aria-valuenow":m,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...i,ref:d,style:m===void 0?{display:"none"}:e.style,onFocus:Q(e.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),c&&p.jsx(fy,{name:o??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:m},r)]})});dy.displayName=iu;var r2="RadioBubbleInput",fy=w.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=w.useRef(null),i=We(o,r),s=Qk(t);return w.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&d){const c=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(c)}},[s,t]),p.jsx(he.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});fy.displayName=r2;function o2(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function py(e,t,n){const i=100/(n-t)*(e-t);return Jv(i,[0,100])}function i2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function s2(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function a2(e,t,n){const r=e/2,i=Mc([0,50],[0,r]);return(r-i(t)*n)*n}function l2(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function u2(e,t){if(t>0){const n=l2(e);return Math.min(...n)>=t}return!0}function Mc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function c2(e){return(String(e).split(".")[1]||"").length}function d2(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var hy=oy,f2=uy,p2=cy,h2=dy;const Ii=X.forwardRef(({className:e,...t},n)=>p.jsxs(hy,{ref:n,className:yt("relative flex w-full touch-none select-none items-center",e),...t,children:[p.jsx(f2,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:p.jsx(p2,{className:"absolute h-full bg-primary"})}),p.jsx(h2,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Ii.displayName=hy.displayName;const m2=()=>{const e=Um(),t=w.useRef(null),[n,r]=w.useState("text"),[o,i]=w.useState({width:4e3,height:4e3}),[s,a]=w.useState(25),[l,u]=w.useState("tshirt"),[d,c]=w.useState([]),[f,m]=w.useState(null),[x,y]=w.useState({text:"Your Text Here",fontSize:48,color:"#ffffff",fontFamily:"Inter"});w.useEffect(()=>{const C=localStorage.getItem("podDesigns");C&&c(JSON.parse(C))},[]);const S=()=>{const C={id:Date.now(),name:`Design ${d.length+1}`,elements:[],canvasSize:o,createdAt:new Date().toISOString()},E=[...d,C];c(E),localStorage.setItem("podDesigns",JSON.stringify(E)),bt({title:"Design Saved!",description:"Your design has been saved successfully."})},v=C=>{bt({title:`Exporting as ${C.toUpperCase()}`,description:"🚧 Export functionality isn't implemented yet—but don't worry! You can request it in your next prompt! 🚀"})},h=C=>{r(C),bt({title:`${C.charAt(0).toUpperCase()+C.slice(1)} Tool Selected`,description:"🚧 This tool isn't fully implemented yet—but don't worry! You can request it in your next prompt! 🚀"})},g=[{id:1,name:"Minimalist Logo",category:"logo",preview:"Modern clean logo design"},{id:2,name:"Vintage Badge",category:"logo",preview:"Retro style badge design"},{id:3,name:"Geometric Pattern",category:"pattern",preview:"Abstract geometric pattern"},{id:4,name:"Floral Pattern",category:"pattern",preview:"Beautiful floral seamless pattern"},{id:5,name:"Typography Quote",category:"text",preview:"Inspirational quote design"},{id:6,name:"Bold Statement",category:"text",preview:"Eye-catching text design"}],T=[{id:"tshirt",name:"T-Shirt",icon:p.jsx(lk,{className:"w-5 h-5"})},{id:"mug",name:"Mug",icon:p.jsx(nk,{className:"w-5 h-5"})},{id:"poster",name:"Poster",icon:p.jsx(Rv,{className:"w-5 h-5"})}],P=["TIFF","SVG","PDF","PNG","AI","JPG","JPEG"];return p.jsxs("div",{className:"min-h-screen flex flex-col",children:[p.jsx("header",{className:"glass-effect border-b border-white/10 p-4",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center space-x-4",children:[p.jsxs(Ce,{variant:"ghost",onClick:()=>e("/"),className:"text-white hover:text-blue-400",children:[p.jsx(ek,{className:"w-5 h-5 mr-2"}),"Back to Home"]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(tu,{className:"w-6 h-6 text-blue-400"}),p.jsx("span",{className:"text-lg font-bold gradient-text",children:"Design Studio"})]})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsxs(Ce,{variant:"outline",onClick:S,className:"border-white/20 text-white hover:bg-white/10",children:[p.jsx(ak,{className:"w-4 h-4 mr-2"}),"Save"]}),p.jsxs("div",{className:"relative",children:[p.jsxs(Ce,{className:"export-button text-white font-semibold",onClick:()=>document.getElementById("export-menu").classList.toggle("hidden"),children:[p.jsx(Jl,{className:"w-4 h-4 mr-2"}),"Export"]}),p.jsx("div",{id:"export-menu",className:"hidden absolute right-0 mt-2 w-48 glass-effect rounded-lg border border-white/10 p-2 z-50",children:P.map(C=>p.jsxs("button",{onClick:()=>v(C),className:"w-full text-left px-3 py-2 text-white hover:bg-white/10 rounded transition-colors",children:["Export as ",C]},C))})]})]})]})}),p.jsxs("div",{className:"flex flex-1",children:[p.jsx("div",{className:"w-80 design-tool-panel border-r border-white/10 p-4",children:p.jsxs(Yk,{defaultValue:"templates",className:"w-full",children:[p.jsxs(Zv,{className:"grid w-full grid-cols-3 bg-white/5",children:[p.jsx(Li,{value:"templates",className:"text-white data-[state=active]:bg-blue-600",children:"Templates"}),p.jsx(Li,{value:"tools",className:"text-white data-[state=active]:bg-blue-600",children:"Tools"}),p.jsx(Li,{value:"settings",className:"text-white data-[state=active]:bg-blue-600",children:"Settings"})]}),p.jsx(Di,{value:"templates",className:"mt-4",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-white font-semibold mb-3",children:"Design Templates"}),p.jsx("div",{className:"grid grid-cols-2 gap-3",children:g.map(C=>p.jsxs(Ae.div,{className:"template-card p-3 rounded-lg cursor-pointer",whileHover:{scale:1.05},onClick:()=>bt({title:"Template Selected",description:"🚧 Template loading isn't implemented yet—but don't worry! You can request it in your next prompt! 🚀"}),children:[p.jsx("div",{className:"w-full h-20 bg-gradient-to-br from-blue-500/20 to-purple-500/20 rounded mb-2 flex items-center justify-center",children:p.jsx("span",{className:"text-xs text-white/70",children:C.preview})}),p.jsx("p",{className:"text-white text-sm font-medium",children:C.name}),p.jsx("p",{className:"text-gray-400 text-xs capitalize",children:C.category})]},C.id))})]})}),p.jsx(Di,{value:"tools",className:"mt-4",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-white font-semibold mb-3",children:"Design Tools"}),p.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{id:"text",icon:p.jsx(fk,{className:"w-5 h-5"}),name:"Text"},{id:"image",icon:p.jsx(eu,{className:"w-5 h-5"}),name:"Image"},{id:"shapes",icon:p.jsx(ok,{className:"w-5 h-5"}),name:"Shapes"},{id:"colors",icon:p.jsx(jv,{className:"w-5 h-5"}),name:"Colors"}].map(C=>p.jsxs(Ce,{variant:n===C.id?"default":"outline",className:`p-3 h-auto flex-col space-y-1 ${n===C.id?"bg-blue-600 text-white":"border-white/20 text-white hover:bg-white/10"}`,onClick:()=>h(C.id),children:[C.icon,p.jsx("span",{className:"text-xs",children:C.name})]},C.id))}),n==="text"&&p.jsxs("div",{className:"space-y-4 mt-6",children:[p.jsxs("div",{children:[p.jsx("label",{className:"text-white text-sm mb-2 block",children:"Text"}),p.jsx("input",{type:"text",value:x.text,onChange:C=>y({...x,text:C.target.value}),className:"w-full p-2 bg-white/10 border border-white/20 rounded text-white"})]}),p.jsxs("div",{children:[p.jsxs("label",{className:"text-white text-sm mb-2 block",children:["Font Size: ",x.fontSize,"px"]}),p.jsx(Ii,{value:[x.fontSize],onValueChange:C=>y({...x,fontSize:C[0]}),max:200,min:12,step:1,className:"w-full"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"text-white text-sm mb-2 block",children:"Color"}),p.jsx("input",{type:"color",value:x.color,onChange:C=>y({...x,color:C.target.value}),className:"w-full h-10 bg-white/10 border border-white/20 rounded"})]})]})]})}),p.jsx(Di,{value:"settings",className:"mt-4",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-white font-semibold mb-3",children:"Canvas Settings"}),p.jsxs("div",{children:[p.jsxs("label",{className:"text-white text-sm mb-2 block",children:["Canvas Width: ",o.width,"px"]}),p.jsx(Ii,{value:[o.width],onValueChange:C=>i({...o,width:C[0]}),max:14e3,min:3600,step:100,className:"w-full"})]}),p.jsxs("div",{children:[p.jsxs("label",{className:"text-white text-sm mb-2 block",children:["Canvas Height: ",o.height,"px"]}),p.jsx(Ii,{value:[o.height],onValueChange:C=>i({...o,height:C[0]}),max:14e3,min:3600,step:100,className:"w-full"})]}),p.jsxs("div",{className:"text-xs text-gray-400 p-3 bg-white/5 rounded",children:[p.jsxs("p",{children:[p.jsx("strong",{children:"Resolution:"})," 1200+ DPI"]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Print Quality:"})," Professional"]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Size:"})," ",o.width," × ",o.height,"px"]})]})]})})]})}),p.jsxs("div",{className:"flex-1 flex flex-col",children:[p.jsx("div",{className:"glass-effect border-b border-white/10 p-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>a(Math.max(10,s-10)),className:"border-white/20 text-white hover:bg-white/10",children:p.jsx(vk,{className:"w-4 h-4"})}),p.jsxs("span",{className:"text-white text-sm min-w-[60px] text-center",children:[s,"%"]}),p.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>a(Math.min(200,s+10)),className:"border-white/20 text-white hover:bg-white/10",children:p.jsx(gk,{className:"w-4 h-4"})}),p.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>bt({title:"Grid Toggle",description:"🚧 Grid functionality isn't implemented yet—but don't worry! You can request it in your next prompt! 🚀"}),className:"border-white/20 text-white hover:bg-white/10",children:p.jsx(rk,{className:"w-4 h-4"})})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>bt({title:"Undo",description:"🚧 Undo functionality isn't implemented yet—but don't worry! You can request it in your next prompt! 🚀"}),className:"border-white/20 text-white hover:bg-white/10",children:p.jsx(sk,{className:"w-4 h-4"})}),p.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>bt({title:"Clear Canvas",description:"🚧 Clear functionality isn't implemented yet—but don't worry! You can request it in your next prompt! 🚀"}),className:"border-white/20 text-white hover:bg-white/10",children:p.jsx(ck,{className:"w-4 h-4"})})]})]})}),p.jsx("div",{className:"flex-1 design-canvas p-8 overflow-auto",children:p.jsx("div",{className:"flex justify-center items-center min-h-full",children:p.jsxs(Ae.div,{className:"bg-white rounded-lg shadow-2xl relative",style:{width:`${o.width*s/100}px`,height:`${o.height*s/100}px`,minWidth:"400px",minHeight:"400px"},initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.5},children:[p.jsx("canvas",{ref:t,width:o.width,height:o.height,className:"w-full h-full rounded-lg",style:{imageRendering:"pixelated"}}),p.jsx("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none",style:{fontSize:`${x.fontSize*s/100}px`,color:x.color,fontFamily:x.fontFamily,fontWeight:"bold"},children:x.text})]})})})]}),p.jsx("div",{className:"w-80 design-tool-panel border-l border-white/10 p-4",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"text-white font-semibold mb-3",children:"Product Preview"}),p.jsx("div",{className:"flex space-x-2",children:T.map(C=>p.jsxs(Ce,{variant:l===C.id?"default":"outline",size:"sm",className:`flex-1 ${l===C.id?"bg-blue-600 text-white":"border-white/20 text-white hover:bg-white/10"}`,onClick:()=>u(C.id),children:[C.icon,p.jsx("span",{className:"ml-1 text-xs",children:C.name})]},C.id))}),p.jsxs("div",{className:"product-preview rounded-lg p-6 text-center",children:[p.jsxs("div",{className:"w-full h-48 bg-gradient-to-br from-gray-200 to-gray-300 rounded-lg mb-4 flex items-center justify-center relative overflow-hidden",children:[l==="tshirt"&&p.jsx("img",{alt:"T-shirt mockup with design preview",className:"w-full h-full object-cover",src:"https://images.unsplash.com/photo-1697912182430-3cef507fc85d"}),l==="mug"&&p.jsx("img",{alt:"Coffee mug mockup with design preview",className:"w-full h-full object-cover",src:"https://images.unsplash.com/photo-1646270719451-95e55479ffdb"}),l==="poster"&&p.jsx("img",{alt:"Poster mockup with design preview",className:"w-full h-full object-cover",src:"https://images.unsplash.com/photo-1695634183237-fe0ecdb068f4"}),p.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:p.jsx("div",{className:"text-black font-bold opacity-80",style:{fontSize:"14px"},children:x.text})})]}),p.jsxs("p",{className:"text-white font-medium capitalize",children:[l," Preview"]}),p.jsx("p",{className:"text-gray-400 text-sm",children:"See how your design looks on products"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx("h4",{className:"text-white font-medium",children:"Saved Designs"}),d.length===0?p.jsx("p",{className:"text-gray-400 text-sm",children:"No saved designs yet"}):p.jsx("div",{className:"space-y-2 max-h-40 overflow-y-auto",children:d.map(C=>p.jsxs("div",{className:"glass-effect p-3 rounded-lg cursor-pointer hover:bg-white/10 transition-colors",onClick:()=>m(C),children:[p.jsx("p",{className:"text-white text-sm font-medium",children:C.name}),p.jsx("p",{className:"text-gray-400 text-xs",children:new Date(C.createdAt).toLocaleDateString()})]},C.id))})]})]})})]})]})};function g2(e,t=globalThis==null?void 0:globalThis.document){const n=pn(e);w.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var v2="DismissableLayer",su="dismissableLayer.update",y2="dismissableLayer.pointerDownOutside",x2="dismissableLayer.focusOutside",yp,my=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gy=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=w.useContext(my),[d,c]=w.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=w.useState({}),x=We(t,E=>c(E)),y=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(S),h=d?y.indexOf(d):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,T=h>=v,P=S2(E=>{const k=E.target,M=[...u.branches].some(R=>R.contains(k));!T||M||(o==null||o(E),s==null||s(E),E.defaultPrevented||a==null||a())},f),C=T2(E=>{const k=E.target;[...u.branches].some(R=>R.contains(k))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},f);return g2(E=>{h===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),w.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(yp=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),xp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=yp)}},[d,f,n,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),xp())},[d,u]),w.useEffect(()=>{const E=()=>m({});return document.addEventListener(su,E),()=>document.removeEventListener(su,E)},[]),p.jsx(he.div,{...l,ref:x,style:{pointerEvents:g?T?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,P.onPointerDownCapture)})});gy.displayName=v2;var w2="DismissableLayerBranch",vy=w.forwardRef((e,t)=>{const n=w.useContext(my),r=w.useRef(null),o=We(t,r);return w.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(he.div,{...e,ref:o})});vy.displayName=w2;function S2(e,t=globalThis==null?void 0:globalThis.document){const n=pn(e),r=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){yy(y2,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function T2(e,t=globalThis==null?void 0:globalThis.document){const n=pn(e),r=w.useRef(!1);return w.useEffect(()=>{const o=i=>{i.target&&!r.current&&yy(x2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xp(){const e=new CustomEvent(su);document.dispatchEvent(e)}function yy(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mv(o,i):o.dispatchEvent(i)}var C2=gy,P2=vy,E2="Portal",xy=w.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=w.useState(!1);Fn(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?v1.createPortal(p.jsx(he.div,{...r,ref:t}),s):null});xy.displayName=E2;var k2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),b2="VisuallyHidden",Lc=w.forwardRef((e,t)=>p.jsx(he.span,{...e,ref:t,style:{...k2,...e.style}}));Lc.displayName=b2;var Dc="ToastProvider",[Ic,N2,R2]=Nc("Toast"),[wy,tb]=Ho("Toast",[R2]),[j2,Ks]=wy(Dc),Sy=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,l]=w.useState(null),[u,d]=w.useState(0),c=w.useRef(!1),f=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Dc}\`. Expected non-empty \`string\`.`),p.jsx(Ic.Provider,{scope:t,children:p.jsx(j2,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:w.useCallback(()=>d(m=>m+1),[]),onToastRemove:w.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:f,children:s})})};Sy.displayName=Dc;var Ty="ToastViewport",A2=["F8"],au="toast.viewportPause",lu="toast.viewportResume",Cy=w.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=A2,label:o="Notifications ({hotkey})",...i}=e,s=Ks(Ty,n),a=N2(n),l=w.useRef(null),u=w.useRef(null),d=w.useRef(null),c=w.useRef(null),f=We(t,c,s.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=s.toastCount>0;w.useEffect(()=>{const S=v=>{var g;r.length!==0&&r.every(T=>v[T]||v.code===T)&&((g=c.current)==null||g.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),w.useEffect(()=>{const S=l.current,v=c.current;if(x&&S&&v){const h=()=>{if(!s.isClosePausedRef.current){const C=new CustomEvent(au);v.dispatchEvent(C),s.isClosePausedRef.current=!0}},g=()=>{if(s.isClosePausedRef.current){const C=new CustomEvent(lu);v.dispatchEvent(C),s.isClosePausedRef.current=!1}},T=C=>{!S.contains(C.relatedTarget)&&g()},P=()=>{S.contains(document.activeElement)||g()};return S.addEventListener("focusin",h),S.addEventListener("focusout",T),S.addEventListener("pointermove",h),S.addEventListener("pointerleave",P),window.addEventListener("blur",h),window.addEventListener("focus",g),()=>{S.removeEventListener("focusin",h),S.removeEventListener("focusout",T),S.removeEventListener("pointermove",h),S.removeEventListener("pointerleave",P),window.removeEventListener("blur",h),window.removeEventListener("focus",g)}}},[x,s.isClosePausedRef]);const y=w.useCallback(({tabbingDirection:S})=>{const h=a().map(g=>{const T=g.ref.current,P=[T,...H2(T)];return S==="forwards"?P:P.reverse()});return(S==="forwards"?h.reverse():h).flat()},[a]);return w.useEffect(()=>{const S=c.current;if(S){const v=h=>{var P,C,E;const g=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!g){const k=document.activeElement,M=h.shiftKey;if(h.target===S&&M){(P=u.current)==null||P.focus();return}const D=y({tabbingDirection:M?"backwards":"forwards"}),W=D.findIndex(A=>A===k);_a(D.slice(W+1))?h.preventDefault():M?(C=u.current)==null||C.focus():(E=d.current)==null||E.focus()}};return S.addEventListener("keydown",v),()=>S.removeEventListener("keydown",v)}},[a,y]),p.jsxs(P2,{ref:l,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&p.jsx(uu,{ref:u,onFocusFromOutsideViewport:()=>{const S=y({tabbingDirection:"forwards"});_a(S)}}),p.jsx(Ic.Slot,{scope:n,children:p.jsx(he.ol,{tabIndex:-1,...i,ref:f})}),x&&p.jsx(uu,{ref:d,onFocusFromOutsideViewport:()=>{const S=y({tabbingDirection:"backwards"});_a(S)}})]})});Cy.displayName=Ty;var Py="ToastFocusProxy",uu=w.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ks(Py,n);return p.jsx(Lc,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const a=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});uu.displayName=Py;var Go="Toast",M2="toast.swipeStart",L2="toast.swipeMove",D2="toast.swipeCancel",I2="toast.swipeEnd",Ey=w.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,l]=Hs({prop:r,defaultProp:o??!0,onChange:i,caller:Go});return p.jsx(jc,{present:n||a,children:p.jsx(V2,{open:a,...s,ref:t,onClose:()=>l(!1),onPause:pn(e.onPause),onResume:pn(e.onResume),onSwipeStart:Q(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Q(e.onSwipeMove,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:Q(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Q(e.onSwipeEnd,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),l(!1)})})})});Ey.displayName=Go;var[O2,_2]=wy(Go,{onClose(){}}),V2=w.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:f,onSwipeEnd:m,...x}=e,y=Ks(Go,n),[S,v]=w.useState(null),h=We(t,A=>v(A)),g=w.useRef(null),T=w.useRef(null),P=o||y.duration,C=w.useRef(0),E=w.useRef(P),k=w.useRef(0),{onToastAdd:M,onToastRemove:R}=y,V=pn(()=>{var G;(S==null?void 0:S.contains(document.activeElement))&&((G=y.viewport)==null||G.focus()),s()}),D=w.useCallback(A=>{!A||A===1/0||(window.clearTimeout(k.current),C.current=new Date().getTime(),k.current=window.setTimeout(V,A))},[V]);w.useEffect(()=>{const A=y.viewport;if(A){const G=()=>{D(E.current),u==null||u()},O=()=>{const Y=new Date().getTime()-C.current;E.current=E.current-Y,window.clearTimeout(k.current),l==null||l()};return A.addEventListener(au,O),A.addEventListener(lu,G),()=>{A.removeEventListener(au,O),A.removeEventListener(lu,G)}}},[y.viewport,P,l,u,D]),w.useEffect(()=>{i&&!y.isClosePausedRef.current&&D(P)},[i,P,y.isClosePausedRef,D]),w.useEffect(()=>(M(),()=>R()),[M,R]);const W=w.useMemo(()=>S?My(S):null,[S]);return y.viewport?p.jsxs(p.Fragment,{children:[W&&p.jsx(F2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),p.jsx(O2,{scope:n,onClose:V,children:Ls.createPortal(p.jsx(Ic.ItemSlot,{scope:n,children:p.jsx(C2,{asChild:!0,onEscapeKeyDown:Q(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||V(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(he.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...x,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Q(e.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:Q(e.onPointerDown,A=>{A.button===0&&(g.current={x:A.clientX,y:A.clientY})}),onPointerMove:Q(e.onPointerMove,A=>{if(!g.current)return;const G=A.clientX-g.current.x,O=A.clientY-g.current.y,Y=!!T.current,N=["left","right"].includes(y.swipeDirection),L=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=N?L(0,G):0,I=N?0:L(0,O),$=A.pointerType==="touch"?10:2,q={x:F,y:I},Ge={originalEvent:A,delta:q};Y?(T.current=q,vi(L2,c,Ge,{discrete:!1})):wp(q,y.swipeDirection,$)?(T.current=q,vi(M2,d,Ge,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(G)>$||Math.abs(O)>$)&&(g.current=null)}),onPointerUp:Q(e.onPointerUp,A=>{const G=T.current,O=A.target;if(O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),T.current=null,g.current=null,G){const Y=A.currentTarget,N={originalEvent:A,delta:G};wp(G,y.swipeDirection,y.swipeThreshold)?vi(I2,m,N,{discrete:!0}):vi(D2,f,N,{discrete:!0}),Y.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),F2=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ks(Go,t),[i,s]=w.useState(!1),[a,l]=w.useState(!1);return U2(()=>s(!0)),w.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:p.jsx(xy,{asChild:!0,children:p.jsx(Lc,{...r,children:i&&p.jsxs(p.Fragment,{children:[o.label," ",n]})})})},z2="ToastTitle",ky=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(he.div,{...r,ref:t})});ky.displayName=z2;var B2="ToastDescription",by=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(he.div,{...r,ref:t})});by.displayName=B2;var Ny="ToastAction",Ry=w.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(Ay,{altText:n,asChild:!0,children:p.jsx(Oc,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ny}\`. Expected non-empty \`string\`.`),null)});Ry.displayName=Ny;var jy="ToastClose",Oc=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=_2(jy,n);return p.jsx(Ay,{asChild:!0,children:p.jsx(he.button,{type:"button",...r,ref:t,onClick:Q(e.onClick,o.onClose)})})});Oc.displayName=jy;var Ay=w.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return p.jsx(he.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function My(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),$2(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...My(r))}}),t}function vi(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mv(o,i):o.dispatchEvent(i)}var wp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function U2(e=()=>{}){const t=pn(e);Fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function $2(e){return e.nodeType===e.ELEMENT_NODE}function H2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _a(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var W2=Sy,Ly=Cy,Dy=Ey,Iy=ky,Oy=by,_y=Ry,Vy=Oc;const G2=W2,Fy=X.forwardRef(({className:e,...t},n)=>p.jsx(Ly,{ref:n,className:yt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Fy.displayName=Ly.displayName;const K2=Nv("data-[swipe=move]:transition-none group relative pointer-events-auto flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full",{variants:{variant:{default:"bg-background border",destructive:"group destructive border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),zy=X.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(Dy,{ref:r,className:yt(K2({variant:t}),e),...n}));zy.displayName=Dy.displayName;const Y2=X.forwardRef(({className:e,...t},n)=>p.jsx(_y,{ref:n,className:yt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/30 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Y2.displayName=_y.displayName;const By=X.forwardRef(({className:e,...t},n)=>p.jsx(Vy,{ref:n,className:yt("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(hk,{className:"h-4 w-4"})}));By.displayName=Vy.displayName;const Uy=X.forwardRef(({className:e,...t},n)=>p.jsx(Iy,{ref:n,className:yt("text-sm font-semibold",e),...t}));Uy.displayName=Iy.displayName;const $y=X.forwardRef(({className:e,...t},n)=>p.jsx(Oy,{ref:n,className:yt("text-sm opacity-90",e),...t}));$y.displayName=Oy.displayName;function Q2(){const{toasts:e}=wk();return p.jsxs(G2,{children:[e.map(({id:t,title:n,description:r,action:o,...i})=>p.jsxs(zy,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(Uy,{children:n}),r&&p.jsx($y,{children:r})]}),o,p.jsx(By,{})]},t)),p.jsx(Fy,{})]})}function X2(){return p.jsxs(dw,{children:[p.jsxs(_l,{children:[p.jsx("title",{children:"POD Design Studio - Create Print-Ready Designs"}),p.jsx("meta",{name:"description",content:"Professional print-on-demand design studio with high-resolution output, multiple export formats, and product visualization."})]}),p.jsxs("div",{className:"min-h-screen",children:[p.jsxs(lw,{children:[p.jsx(Ml,{path:"/",element:p.jsx(Sk,{})}),p.jsx(Ml,{path:"/studio",element:p.jsx(m2,{})})]}),p.jsx(Q2,{})]})]})}Va.createRoot(document.getElementById("root")).render(p.jsx(X.StrictMode,{children:p.jsx(X2,{})}));