function ey(e,t){for(var n=0;nr[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function ty(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ud={exports:{}},Yo={},Wd={exports:{}},O={};/** * @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 Ci=Symbol.for("react.element"),ny=Symbol.for("react.portal"),ry=Symbol.for("react.fragment"),iy=Symbol.for("react.strict_mode"),oy=Symbol.for("react.profiler"),sy=Symbol.for("react.provider"),ay=Symbol.for("react.context"),ly=Symbol.for("react.forward_ref"),uy=Symbol.for("react.suspense"),cy=Symbol.for("react.memo"),fy=Symbol.for("react.lazy"),lc=Symbol.iterator;function dy(e){return e===null||typeof e!="object"?null:(e=lc&&e[lc]||e["@@iterator"],typeof e=="function"?e:null)}var Hd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gd=Object.assign,$d={};function hr(e,t,n){this.props=e,this.context=t,this.refs=$d,this.updater=n||Hd}hr.prototype.isReactComponent={};hr.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")};hr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yd(){}Yd.prototype=hr.prototype;function xl(e,t,n){this.props=e,this.context=t,this.refs=$d,this.updater=n||Hd}var Sl=xl.prototype=new Yd;Sl.constructor=xl;Gd(Sl,hr.prototype);Sl.isPureReactComponent=!0;var uc=Array.isArray,Qd=Object.prototype.hasOwnProperty,Il={current:null},Xd={key:!0,ref:!0,__self:!0,__source:!0};function bd(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Qd.call(t,r)&&!Xd.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,V=M[F];if(0>>1;Fi(_,R))Gi($,_)?(M[F]=$,M[G]=R,F=G):(M[F]=_,M[de]=R,F=de);else if(Gi($,R))M[F]=$,M[G]=R,F=G;else break e}}return D}function i(M,D){var R=M.sortIndex-D.sortIndex;return R!==0?R:M.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,f=null,d=3,g=!1,y=!1,v=!1,I=typeof setTimeout=="function"?setTimeout:null,p=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 m(M){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=M)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function w(M){if(v=!1,m(M),!y)if(n(l)!==null)y=!0,Ke(E);else{var D=n(u);D!==null&&W(w,D.startTime-M)}}function E(M,D){y=!1,v&&(v=!1,p(S),S=-1),g=!0;var R=d;try{for(m(D),f=n(l);f!==null&&(!(f.expirationTime>D)||M&&!B());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var V=F(f.expirationTime<=D);D=e.unstable_now(),typeof V=="function"?f.callback=V:f===n(l)&&r(l),m(D)}else r(l);f=n(l)}if(f!==null)var Fe=!0;else{var de=n(u);de!==null&&W(w,de.startTime-D),Fe=!1}return Fe}finally{f=null,d=R,g=!1}}var T=!1,k=null,S=-1,K=5,x=-1;function B(){return!(e.unstable_now()-xM||125F?(M.sortIndex=R,t(u,M),n(l)===null&&M===n(u)&&(v?(p(S),S=-1):v=!0,W(w,R-F))):(M.sortIndex=V,t(l,M),y||g||(y=!0,Ke(E))),M},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(M){var D=d;return function(){var R=d;d=D;try{return M.apply(this,arguments)}finally{d=R}}}})(nh);th.exports=nh;var Iy=th.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 Ey=C,We=Iy;function P(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"),aa=Object.prototype.hasOwnProperty,Ky=/^[: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]*$/,fc={},dc={};function Ty(e){return aa.call(dc,e)?!0:aa.call(fc,e)?!1:Ky.test(e)?dc[e]=!0:(fc[e]=!0,!1)}function ky(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 Py(e,t,n,r){if(t===null||typeof t>"u"||ky(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 De(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ce[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ce[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ce[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ce[e]=new De(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){Ce[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ce[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ce[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ce[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ce[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Kl=/[\-:]([a-z])/g;function Tl(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(Kl,Tl);Ce[t]=new De(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(Kl,Tl);Ce[t]=new De(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(Kl,Tl);Ce[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ce[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});Ce.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ce[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function kl(e,t,n,r){var i=Ce.hasOwnProperty(t)?Ce[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Cs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Mr(e):""}function My(e){switch(e.tag){case 5:return Mr(e.type);case 16:return Mr("Lazy");case 13:return Mr("Suspense");case 19:return Mr("SuspenseList");case 0:case 2:case 15:return e=ws(e.type,!1),e;case 11:return e=ws(e.type.render,!1),e;case 1:return e=ws(e.type,!0),e;default:return""}}function fa(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 Nn:return"Fragment";case Bn:return"Portal";case la:return"Profiler";case Pl:return"StrictMode";case ua:return"Suspense";case ca:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oh:return(e.displayName||"Context")+".Consumer";case ih:return(e._context.displayName||"Context")+".Provider";case Ml:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dl:return t=e.displayName||null,t!==null?t:fa(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return fa(e(t))}catch{}}return null}function Dy(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 fa(t);case 8:return t===Pl?"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 Jt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ah(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ry(e){var t=ah(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.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 Ni(e){e._valueTracker||(e._valueTracker=Ry(e))}function lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ah(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yo(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 da(e,t){var n=t.checked;return ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jt(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 uh(e,t){t=t.checked,t!=null&&kl(e,"checked",t,!1)}function ha(e,t){uh(e,t);var n=Jt(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")?pa(e,t.type,n):t.hasOwnProperty("defaultValue")&&pa(e,t.type,Jt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mc(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 pa(e,t,n){(t!=="number"||yo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dr=Array.isArray;function Jn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Li.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function br(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lr={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},By=["Webkit","ms","Moz","O"];Object.keys(Lr).forEach(function(e){By.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lr[t]=Lr[e]})});function hh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Lr.hasOwnProperty(e)&&Lr[e]?(""+t).trim():t+"px"}function ph(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=hh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Ny=ne({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 ya(e,t){if(t){if(Ny[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Aa(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 va=null;function Rl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ca=null,Zn=null,qn=null;function Ac(e){if(e=Si(e)){if(typeof Ca!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Zo(t),Ca(e.stateNode,e.type,t))}}function mh(e){Zn?qn?qn.push(e):qn=[e]:Zn=e}function gh(){if(Zn){var e=Zn,t=qn;if(qn=Zn=null,Ac(e),t)for(e=0;e>>=0,e===0?32:31-(Gy(e)/$y|0)|0}var ji=64,Vi=4194304;function Rr(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 wo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Rr(a):(o&=s,o!==0&&(r=Rr(o)))}else s=n&~i,s!==0?r=Rr(s):o!==0&&(r=Rr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function by(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=Vr),Tc=" ",kc=!1;function jh(e,t){switch(e){case"keyup":return IA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ln=!1;function KA(e,t){switch(e){case"compositionend":return Vh(t);case"keypress":return t.which!==32?null:(kc=!0,Tc);case"textInput":return e=t.data,e===Tc&&kc?null:e;default:return null}}function TA(e,t){if(Ln)return e==="compositionend"||!_l&&jh(e,t)?(e=Nh(),ro=Vl=_t=null,Ln=!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=Rc(n)}}function zh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uh(){for(var e=window,t=yo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yo(e.document)}return t}function zl(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 jA(e){var t=Uh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zh(n.ownerDocument.documentElement,n)){if(r!==null&&zl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Bc(n,o);var s=Bc(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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,jn=null,Ka=null,Fr=null,Ta=!1;function Nc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ta||jn==null||jn!==yo(r)||(r=jn,"selectionStart"in r&&zl(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}),Fr&&ni(Fr,r)||(Fr=r,r=Io(Ka,"onSelect"),0Fn||(e.current=Ba[Fn],Ba[Fn]=null,Fn--)}function Y(e,t){Fn++,Ba[Fn]=e.current,e.current=t}var Zt={},Ee=nn(Zt),je=nn(!1),xn=Zt;function or(e,t){var n=e.type.contextTypes;if(!n)return Zt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ve(e){return e=e.childContextTypes,e!=null}function Ko(){X(je),X(Ee)}function zc(e,t,n){if(Ee.current!==Zt)throw Error(P(168));Y(Ee,t),Y(je,n)}function Jh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(P(108,Dy(e)||"Unknown",i));return ne({},n,r)}function To(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zt,xn=Ee.current,Y(Ee,e),Y(je,je.current),!0}function Uc(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=Jh(e,t,xn),r.__reactInternalMemoizedMergedChildContext=e,X(je),X(Ee),Y(Ee,e)):X(je),Y(je,n)}var xt=null,qo=!1,Ls=!1;function Zh(e){xt===null?xt=[e]:xt.push(e)}function QA(e){qo=!0,Zh(e)}function rn(){if(!Ls&&xt!==null){Ls=!0;var e=0,t=H;try{var n=xt;for(H=1;e>=s,i-=s,St=1<<32-ct(t)+i|n<S?(K=k,k=null):K=k.sibling;var x=d(p,k,m[S],w);if(x===null){k===null&&(k=K);break}e&&k&&x.alternate===null&&t(p,k),h=o(x,h,S),T===null?E=x:T.sibling=x,T=x,k=K}if(S===m.length)return n(p,k),J&&un(p,S),E;if(k===null){for(;SS?(K=k,k=null):K=k.sibling;var B=d(p,k,x.value,w);if(B===null){k===null&&(k=K);break}e&&k&&B.alternate===null&&t(p,k),h=o(B,h,S),T===null?E=B:T.sibling=B,T=B,k=K}if(x.done)return n(p,k),J&&un(p,S),E;if(k===null){for(;!x.done;S++,x=m.next())x=f(p,x.value,w),x!==null&&(h=o(x,h,S),T===null?E=x:T.sibling=x,T=x);return J&&un(p,S),E}for(k=r(p,k);!x.done;S++,x=m.next())x=g(k,p,S,x.value,w),x!==null&&(e&&x.alternate!==null&&k.delete(x.key===null?S:x.key),h=o(x,h,S),T===null?E=x:T.sibling=x,T=x);return e&&k.forEach(function(L){return t(p,L)}),J&&un(p,S),E}function I(p,h,m,w){if(typeof m=="object"&&m!==null&&m.type===Nn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Bi:e:{for(var E=m.key,T=h;T!==null;){if(T.key===E){if(E=m.type,E===Nn){if(T.tag===7){n(p,T.sibling),h=i(T,m.props.children),h.return=p,p=h;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===jt&&Gc(E)===T.type){n(p,T.sibling),h=i(T,m.props),h.ref=Kr(p,T,m),h.return=p,p=h;break e}n(p,T);break}else t(p,T);T=T.sibling}m.type===Nn?(h=An(m.props.children,p.mode,w,m.key),h.return=p,p=h):(w=fo(m.type,m.key,m.props,null,p.mode,w),w.ref=Kr(p,h,m),w.return=p,p=w)}return s(p);case Bn:e:{for(T=m.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(p,h.sibling),h=i(h,m.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=Ws(m,p.mode,w),h.return=p,p=h}return s(p);case jt:return T=m._init,I(p,h,T(m._payload),w)}if(Dr(m))return y(p,h,m,w);if(wr(m))return v(p,h,m,w);Hi(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,m),h.return=p,p=h):(n(p,h),h=Us(m,p.mode,w),h.return=p,p=h),s(p)):n(p,h)}return I}var ar=np(!0),rp=np(!1),Mo=nn(null),Do=null,Un=null,Gl=null;function $l(){Gl=Un=Do=null}function Yl(e){var t=Mo.current;X(Mo),e._currentValue=t}function ja(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 tr(e,t){Do=e,Gl=Un=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Be=!0),e.firstContext=null)}function tt(e){var t=e._currentValue;if(Gl!==e)if(e={context:e,memoizedValue:t,next:null},Un===null){if(Do===null)throw Error(P(308));Un=e,Do.dependencies={lanes:0,firstContext:e}}else Un=Un.next=e;return t}var hn=null;function Ql(e){hn===null?hn=[e]:hn.push(e)}function ip(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ql(t)):(n.next=i.next,i.next=n),t.interleaved=n,kt(e,r)}function kt(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 Vt=!1;function Xl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function op(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 Et(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kt(e,n)}return i=r.interleaved,i===null?(t.next=t,Ql(r)):(t.next=i.next,i.next=t),r.interleaved=t,kt(e,n)}function oo(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,Nl(e,n)}}function $c(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ro(e,t,n,r){var i=e.updateQueue;Vt=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,c=u=l=null,a=o;do{var d=a.lane,g=a.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,v=a;switch(d=t,g=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(g,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,d=typeof y=="function"?y.call(g,f,d):y,d==null)break e;f=ne({},f,d);break e;case 2:Vt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else g={eventTime:g,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=g,l=f):c=c.next=g,s|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);En|=s,e.lanes=s,e.memoizedState=f}}function Yc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Vs.transition;Vs.transition={};try{e(!1),t()}finally{H=n,Vs.transition=r}}function xp(){return nt().memoizedState}function ZA(e,t,n){var r=Xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Sp(e))Ip(t,n);else if(n=ip(e,t,n,r),n!==null){var i=Pe();ft(n,e,r,i),Ep(n,t,r)}}function qA(e,t,n){var r=Xt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Sp(e))Ip(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,dt(a,s)){var l=t.interleaved;l===null?(i.next=i,Ql(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=ip(e,t,i,r),n!==null&&(i=Pe(),ft(n,e,r,i),Ep(n,t,r))}}function Sp(e){var t=e.alternate;return e===te||t!==null&&t===te}function Ip(e,t){_r=No=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ep(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nl(e,n)}}var Lo={readContext:tt,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useInsertionEffect:we,useLayoutEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useMutableSource:we,useSyncExternalStore:we,useId:we,unstable_isNewReconciler:!1},ev={readContext:tt,useCallback:function(e,t){return pt().memoizedState=[e,t===void 0?null:t],e},useContext:tt,useEffect:Xc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ao(4194308,4,yp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ao(4194308,4,e,t)},useInsertionEffect:function(e,t){return ao(4,2,e,t)},useMemo:function(e,t){var n=pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pt();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=ZA.bind(null,te,e),[r.memoizedState,e]},useRef:function(e){var t=pt();return e={current:e},t.memoizedState=e},useState:Qc,useDebugValue:ru,useDeferredValue:function(e){return pt().memoizedState=e},useTransition:function(){var e=Qc(!1),t=e[0];return e=JA.bind(null,e[1]),pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=te,i=pt();if(J){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),ge===null)throw Error(P(349));In&30||up(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Xc(fp.bind(null,r,o,e),[e]),r.flags|=2048,ci(9,cp.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=pt(),t=ge.identifierPrefix;if(J){var n=It,r=St;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=li++,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[mt]=t,e[oi]=r,Lp(e,t,!1,!1),t.stateNode=e;e:{switch(s=Aa(n,r),n){case"dialog":Q("cancel",e),Q("close",e),i=r;break;case"iframe":case"object":case"embed":Q("load",e),i=r;break;case"video":case"audio":for(i=0;icr&&(t.flags|=128,r=!0,Tr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Bo(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!J)return xe(t),null}else 2*ae()-o.renderingStartTime>cr&&n!==1073741824&&(t.flags|=128,r=!0,Tr(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ae(),t.sibling=null,n=q.current,Y(q,r?n&1|2:n&1),t):(xe(t),null);case 22:case 23:return uu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_e&1073741824&&(xe(t),t.subtreeFlags&6&&(t.flags|=8192)):xe(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function lv(e,t){switch(Wl(t),t.tag){case 1:return Ve(t.type)&&Ko(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lr(),X(je),X(Ee),Zl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jl(t),null;case 13:if(X(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));sr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(q),null;case 4:return lr(),null;case 10:return Yl(t.type._context),null;case 22:case 23:return uu(),null;case 24:return null;default:return null}}var $i=!1,Se=!1,uv=typeof WeakSet=="function"?WeakSet:Set,N=null;function Wn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function Ga(e,t,n){try{n()}catch(r){oe(e,t,r)}}var af=!1;function cv(e,t){if(ka=xo,e=Uh(),zl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=s),d===o&&++c===r&&(l=s),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pa={focusedElem:e,selectionRange:n},xo=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,I=y.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:st(t.type,v),I);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(w){oe(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return y=af,af=!1,y}function zr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ga(t,n,o)}i=i.next}while(i!==r)}}function ns(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 $a(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 Op(e){var t=e.alternate;t!==null&&(e.alternate=null,Op(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mt],delete t[oi],delete t[Ra],delete t[$A],delete t[YA])),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 Fp(e){return e.tag===5||e.tag===3||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fp(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 Ya(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=Eo));else if(r!==4&&(e=e.child,e!==null))for(Ya(e,t,n),e=e.sibling;e!==null;)Ya(e,t,n),e=e.sibling}function Qa(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(Qa(e,t,n),e=e.sibling;e!==null;)Qa(e,t,n),e=e.sibling}var ye=null,at=!1;function Nt(e,t,n){for(n=n.child;n!==null;)_p(e,t,n),n=n.sibling}function _p(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Qo,n)}catch{}switch(n.tag){case 5:Se||Wn(n,t);case 6:var r=ye,i=at;ye=null,Nt(e,t,n),ye=r,at=i,ye!==null&&(at?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(at?(e=ye,n=n.stateNode,e.nodeType===8?Ns(e.parentNode,n):e.nodeType===1&&Ns(e,n),ei(e)):Ns(ye,n.stateNode));break;case 4:r=ye,i=at,ye=n.stateNode.containerInfo,at=!0,Nt(e,t,n),ye=r,at=i;break;case 0:case 11:case 14:case 15:if(!Se&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Ga(n,t,s),i=i.next}while(i!==r)}Nt(e,t,n);break;case 1:if(!Se&&(Wn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){oe(n,t,a)}Nt(e,t,n);break;case 21:Nt(e,t,n);break;case 22:n.mode&1?(Se=(r=Se)||n.memoizedState!==null,Nt(e,t,n),Se=r):Nt(e,t,n);break;default:Nt(e,t,n)}}function uf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new uv),t.forEach(function(r){var i=vv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dv(r/1960))-r,10e?16:e,zt===null)var r=!1;else{if(e=zt,zt=null,Oo=0,U&6)throw Error(P(331));var i=U;for(U|=4,N=e.current;N!==null;){var o=N,s=o.child;if(N.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lae()-au?yn(e,0):su|=n),Oe(e,t)}function Qp(e,t){t===0&&(e.mode&1?(t=Vi,Vi<<=1,!(Vi&130023424)&&(Vi=4194304)):t=1);var n=Pe();e=kt(e,t),e!==null&&(wi(e,t,n),Oe(e,n))}function Av(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qp(e,n)}function vv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),Qp(e,n)}var Xp;Xp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||je.current)Be=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Be=!1,sv(e,t,n);Be=!!(e.flags&131072)}else Be=!1,J&&t.flags&1048576&&qh(t,Po,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;lo(e,t),e=t.pendingProps;var i=or(t,Ee.current);tr(t,n),i=eu(null,t,r,e,i,n);var o=tu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ve(r)?(o=!0,To(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xl(t),i.updater=ts,t.stateNode=i,i._reactInternals=t,Oa(t,r,e,n),t=za(null,t,r,!0,o,n)):(t.tag=0,J&&o&&Ul(t),Te(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(lo(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=wv(r),e=st(r,e),i){case 0:t=_a(null,t,r,e,n);break e;case 1:t=rf(null,t,r,e,n);break e;case 11:t=tf(null,t,r,e,n);break e;case 14:t=nf(null,t,r,st(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),_a(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),rf(e,t,r,i,n);case 3:e:{if(Rp(t),e===null)throw Error(P(387));r=t.pendingProps,o=t.memoizedState,i=o.element,op(e,t),Ro(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ur(Error(P(423)),t),t=of(e,t,r,n,i);break e}else if(r!==i){i=ur(Error(P(424)),t),t=of(e,t,r,n,i);break e}else for(ze=$t(t.stateNode.containerInfo.firstChild),Ue=t,J=!0,lt=null,n=rp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sr(),r===i){t=Pt(e,t,n);break e}Te(e,t,r,n)}t=t.child}return t;case 5:return sp(t),e===null&&La(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ma(r,i)?s=null:o!==null&&Ma(r,o)&&(t.flags|=32),Dp(e,t),Te(e,t,s,n),t.child;case 6:return e===null&&La(t),null;case 13:return Bp(e,t,n);case 4:return bl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ar(t,null,r,n):Te(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),tf(e,t,r,i,n);case 7:return Te(e,t,t.pendingProps,n),t.child;case 8:return Te(e,t,t.pendingProps.children,n),t.child;case 12:return Te(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Y(Mo,r._currentValue),r._currentValue=s,o!==null)if(dt(o.value,s)){if(o.children===i.children&&!je.current){t=Pt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Et(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ja(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(P(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ja(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Te(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,tr(t,n),i=tt(i),r=r(i),t.flags|=1,Te(e,t,r,n),t.child;case 14:return r=t.type,i=st(r,t.pendingProps),i=st(r.type,i),nf(e,t,r,i,n);case 15:return Pp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),lo(e,t),t.tag=1,Ve(r)?(e=!0,To(t)):e=!1,tr(t,n),Kp(t,r,i),Oa(t,r,i,n),za(null,t,r,!0,e,n);case 19:return Np(e,t,n);case 22:return Mp(e,t,n)}throw Error(P(156,t.tag))};function bp(e,t){return Sh(e,t)}function Cv(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 Ze(e,t,n,r){return new Cv(e,t,n,r)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wv(e){if(typeof e=="function")return fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ml)return 11;if(e===Dl)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=Ze(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 fo(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")fu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Nn:return An(n.children,i,o,t);case Pl:s=8,i|=8;break;case la:return e=Ze(12,n,t,i|2),e.elementType=la,e.lanes=o,e;case ua:return e=Ze(13,n,t,i),e.elementType=ua,e.lanes=o,e;case ca:return e=Ze(19,n,t,i),e.elementType=ca,e.lanes=o,e;case sh:return is(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ih:s=10;break e;case oh:s=9;break e;case Ml:s=11;break e;case Dl:s=14;break e;case jt:s=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=Ze(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function An(e,t,n,r){return e=Ze(7,e,r,t),e.lanes=n,e}function is(e,t,n,r){return e=Ze(22,e,r,t),e.elementType=sh,e.lanes=n,e.stateNode={isHidden:!1},e}function Us(e,t,n){return e=Ze(6,e,null,t),e.lanes=n,e}function Ws(e,t,n){return t=Ze(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xv(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ss(0),this.expirationTimes=Ss(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ss(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function du(e,t,n,r,i,o,s,a,l){return e=new xv(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ze(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xl(o),e}function Sv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(em)}catch(e){console.error(e)}}em(),eh.exports=He;var kv=eh.exports,yf=kv;sa.createRoot=yf.createRoot,sa.hydrateRoot=yf.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 di(){return di=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function tm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mv(){return Math.random().toString(36).substr(2,8)}function vf(e,t){return{usr:e.state,key:e.key,idx:t}}function qa(e,t,n,r){return n===void 0&&(n=null),di({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?gr(t):t,{state:n,key:t&&t.key||r||Mv()})}function nm(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 gr(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 Dv(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Ut.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(di({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function f(){a=Ut.Pop;let I=c(),p=I==null?null:I-u;u=I,l&&l({action:a,location:v.location,delta:p})}function d(I,p){a=Ut.Push;let h=qa(v.location,I,p);u=c()+1;let m=vf(h,u),w=v.createHref(h);try{s.pushState(m,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(w)}o&&l&&l({action:a,location:v.location,delta:1})}function g(I,p){a=Ut.Replace;let h=qa(v.location,I,p);u=c();let m=vf(h,u),w=v.createHref(h);s.replaceState(m,"",w),o&&l&&l({action:a,location:v.location,delta:0})}function y(I){let p=i.location.origin!=="null"?i.location.origin:i.location.href,h=typeof I=="string"?I:nm(I);return h=h.replace(/ $/,"%20"),fe(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let v={get action(){return a},get location(){return e(i,s)},listen(I){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Af,f),l=I,()=>{i.removeEventListener(Af,f),l=null}},createHref(I){return t(i,I)},createURL:y,encodeLocation(I){let p=y(I);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:g,go(I){return s.go(I)}};return v}var Cf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Cf||(Cf={}));function Rv(e,t,n){return n===void 0&&(n="/"),Bv(e,t,n)}function Bv(e,t,n,r){let i=typeof t=="string"?gr(t):t,o=om(i.pathname||"/",n);if(o==null)return null;let s=rm(e);Nv(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(fe(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=vn([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(fe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),rm(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:zv(u,o.index),routesMeta:c})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of im(o.path))i(o,s,l)}),t}function im(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=im(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function Nv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Uv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Lv=/^:[\w-]+$/,jv=3,Vv=2,Ov=1,Fv=10,_v=-2,wf=e=>e==="*";function zv(e,t){let n=e.split("/"),r=n.length;return n.some(wf)&&(r+=_v),t&&(r+=Vv),n.filter(i=>!wf(i)).reduce((i,o)=>i+(Lv.test(o)?jv:o===""?Ov:Fv),r)}function Uv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Wv(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:d,isOptional:g}=c;if(d==="*"){let v=a[f]||"";s=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const y=a[f];return g&&!y?u[d]=void 0:u[d]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Gv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),tm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function $v(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return tm(!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 om(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 Yv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?gr(e):e;return{pathname:n?n.startsWith("/")?n:Qv(n,t):t,search:Jv(r),hash:Zv(i)}}function Qv(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Hs(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 Xv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sm(e,t){let n=Xv(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function am(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=gr(e):(i=di({},e),fe(!i.pathname||!i.pathname.includes("?"),Hs("?","pathname","search",i)),fe(!i.pathname||!i.pathname.includes("#"),Hs("#","pathname","hash",i)),fe(!i.search||!i.search.includes("#"),Hs("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let d=s.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?t[f]:"/"}let l=Yv(i,a),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const vn=e=>e.join("/").replace(/\/\/+/g,"/"),bv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lm=["post","put","patch","delete"];new Set(lm);const e0=["get",...lm];new Set(e0);/** * 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 hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),C.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=am(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:vn([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,s,o,e])}function r0(e,t){return i0(e,t)}function i0(e,t,n,r){Ki()||fe(!1);let{navigator:i}=C.useContext(Ei),{matches:o}=C.useContext(Pn),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=Ti(),c;if(t){var f;let I=typeof t=="string"?gr(t):t;l==="/"||(f=I.pathname)!=null&&f.startsWith(l)||fe(!1),c=I}else c=u;let d=c.pathname||"/",g=d;if(l!=="/"){let I=l.replace(/^\//,"").split("/");g="/"+d.replace(/^\//,"").split("/").slice(I.length).join("/")}let y=Rv(e,{pathname:g}),v=u0(y&&y.map(I=>Object.assign({},I,{params:Object.assign({},a,I.params),pathname:vn([l,i.encodeLocation?i.encodeLocation(I.pathname).pathname:I.pathname]),pathnameBase:I.pathnameBase==="/"?l:vn([l,i.encodeLocation?i.encodeLocation(I.pathnameBase).pathname:I.pathnameBase])})),o,n,r);return t&&v?C.createElement(us.Provider,{value:{location:hi({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ut.Pop}},v):v}function o0(){let e=h0(),t=qv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,null)}const s0=C.createElement(o0,null);class a0 extends C.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?C.createElement(Pn.Provider,{value:this.props.routeContext},C.createElement(um.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function l0(e){let{routeContext:t,match:n,children:r}=e,i=C.useContext(gu);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(Pn.Provider,{value:t},r)}function u0(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||fe(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,f,d)=>{let g,y=!1,v=null,I=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||s0,l&&(u<0&&d===0?(m0("route-fallback"),y=!0,I=null):u===d&&(y=!0,I=f.route.hydrateFallbackElement||null)));let p=t.concat(s.slice(0,d+1)),h=()=>{let m;return g?m=v:y?m=I:f.route.Component?m=C.createElement(f.route.Component,null):f.route.element?m=f.route.element:m=c,C.createElement(l0,{match:f,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:m})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?C.createElement(a0,{location:n.location,revalidation:n.revalidation,component:v,error:g,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var fm=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(fm||{}),dm=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}(dm||{});function c0(e){let t=C.useContext(gu);return t||fe(!1),t}function f0(e){let t=C.useContext(t0);return t||fe(!1),t}function d0(e){let t=C.useContext(Pn);return t||fe(!1),t}function hm(e){let t=d0(),n=t.matches[t.matches.length-1];return n.route.id||fe(!1),n.route.id}function h0(){var e;let t=C.useContext(um),n=f0(),r=hm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function p0(){let{router:e}=c0(fm.UseNavigateStable),t=hm(dm.UseNavigateStable),n=C.useRef(!1);return cm(()=>{n.current=!0}),C.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,hi({fromRouteId:t},o)))},[e,t])}const xf={};function m0(e,t,n){xf[e]||(xf[e]=!0)}function g0(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function y0(e){let{to:t,replace:n,state:r,relative:i}=e;Ki()||fe(!1);let{future:o,static:s}=C.useContext(Ei),{matches:a}=C.useContext(Pn),{pathname:l}=Ti(),u=yr(),c=am(t,sm(a,o.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(c);return C.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function Rn(e){fe(!1)}function A0(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ut.Pop,navigator:o,static:s=!1,future:a}=e;Ki()&&fe(!1);let l=t.replace(/^\/*/,"/"),u=C.useMemo(()=>({basename:l,navigator:o,static:s,future:hi({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=gr(r));let{pathname:c="/",search:f="",hash:d="",state:g=null,key:y="default"}=r,v=C.useMemo(()=>{let I=om(c,l);return I==null?null:{location:{pathname:I,search:f,hash:d,state:g,key:y},navigationType:i}},[l,c,f,d,g,y,i]);return v==null?null:C.createElement(Ei.Provider,{value:u},C.createElement(us.Provider,{children:n,value:v}))}function v0(e){let{children:t,location:n}=e;return r0(el(t),n)}new Promise(()=>{});function el(e,t){t===void 0&&(t=[]);let n=[];return C.Children.forEach(e,(r,i)=>{if(!C.isValidElement(r))return;let o=[...t,i];if(r.type===C.Fragment){n.push.apply(n,el(r.props.children,o));return}r.type!==Rn&&fe(!1),!r.props.index||!r.props.children||fe(!1);let s={id:r.props.id||o.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=el(r.props.children,o)),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 C0="6";try{window.__reactRouterVersion=C0}catch{}const w0="startTransition",Sf=yy[w0];function x0(e){let{basename:t,children:n,future:r,window:i}=e,o=C.useRef();o.current==null&&(o.current=Pv({window:i,v5Compat:!0}));let s=o.current,[a,l]=C.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=C.useCallback(f=>{u&&Sf?Sf(()=>l(f)):l(f)},[l,u]);return C.useLayoutEffect(()=>s.listen(c),[s,c]),C.useEffect(()=>g0(r),[r]),C.createElement(A0,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var If;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(If||(If={}));var Ef;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ef||(Ef={}));const yu=C.createContext({});function Au(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const vu=typeof window<"u",pm=vu?C.useLayoutEffect:C.useEffect,cs=C.createContext(null);function Cu(e,t){e.indexOf(t)===-1&&e.push(t)}function wu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Mt=(e,t,n)=>n>t?t:n{};const Dt={},mm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function gm(e){return typeof e=="object"&&e!==null}const ym=e=>/^0[^.\s]+$/u.test(e);function Su(e){let t;return()=>(t===void 0&&(t=e()),t)}const et=e=>e,S0=(e,t)=>n=>t(e(n)),ki=(...e)=>e.reduce(S0),pi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Iu{constructor(){this.subscriptions=[]}add(t){return Cu(this.subscriptions,t),()=>wu(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;oe*1e3,vt=e=>e/1e3;function Am(e,t){return t?e*(1e3/t):0}const vm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,I0=1e-7,E0=12;function K0(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=vm(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>I0&&++aK0(o,0,1,e,n);return o=>o===0||o===1?o:vm(i(o),t,r)}const Cm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wm=e=>t=>1-e(1-t),xm=Pi(.33,1.53,.69,.99),Eu=wm(xm),Sm=Cm(Eu),Im=e=>(e*=2)<1?.5*Eu(e):.5*(2-Math.pow(2,-10*(e-1))),Ku=e=>1-Math.sin(Math.acos(e)),Em=wm(Ku),Km=Cm(Ku),T0=Pi(.42,0,1,1),k0=Pi(0,0,.58,1),Tm=Pi(.42,0,.58,1),P0=e=>Array.isArray(e)&&typeof e[0]!="number",km=e=>Array.isArray(e)&&typeof e[0]=="number",M0={linear:et,easeIn:T0,easeInOut:Tm,easeOut:k0,circIn:Ku,circInOut:Km,circOut:Em,backIn:Eu,backInOut:Sm,backOut:xm,anticipate:Im},D0=e=>typeof e=="string",Kf=e=>{if(km(e)){xu(e.length===4);const[t,n,r,i]=e;return Pi(t,n,r,i)}else if(D0(e))return M0[e];return e},Xi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function R0(e,t){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){s.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const y=d&&i?n:r;return f&&s.add(c),y.has(c)||y.add(c),c},cancel:c=>{r.delete(c),s.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const B0=40;function Pm(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Xi.reduce((m,w)=>(m[w]=R0(o),m),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:g,postRender:y}=s,v=()=>{const m=Dt.useManualTiming?i.timestamp:performance.now();n=!1,Dt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,B0),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},I=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:Xi.reduce((m,w)=>{const E=s[w];return m[w]=(T,k=!1,S=!1)=>(n||I(),E.schedule(T,k,S)),m},{}),cancel:m=>{for(let w=0;w(ho===void 0&&Ne.set(Ae.isProcessing||Dt.useManualTiming?Ae.timestamp:performance.now()),ho),set:e=>{ho=e,queueMicrotask(N0)}},Mm=e=>t=>typeof t=="string"&&t.startsWith(e),Tu=Mm("--"),L0=Mm("var(--"),ku=e=>L0(e)?j0.test(e.split("/*")[0].trim()):!1,j0=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ar={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mi={...Ar,transform:e=>Mt(0,1,e)},bi={...Ar,default:1},Hr=e=>Math.round(e*1e5)/1e5,Pu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function V0(e){return e==null}const O0=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mu=(e,t)=>n=>!!(typeof n=="string"&&O0.test(n)&&n.startsWith(e)||t&&!V0(n)&&Object.prototype.hasOwnProperty.call(n,t)),Dm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Pu);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},F0=e=>Mt(0,255,e),$s={...Ar,transform:e=>Math.round(F0(e))},mn={test:Mu("rgb","red"),parse:Dm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$s.transform(e)+", "+$s.transform(t)+", "+$s.transform(n)+", "+Hr(mi.transform(r))+")"};function _0(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const tl={test:Mu("#"),parse:_0,transform:mn.transform},Mi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lt=Mi("deg"),Ct=Mi("%"),j=Mi("px"),z0=Mi("vh"),U0=Mi("vw"),Tf={...Ct,parse:e=>Ct.parse(e)/100,transform:e=>Ct.transform(e*100)},Gn={test:Mu("hsl","hue"),parse:Dm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ct.transform(Hr(t))+", "+Ct.transform(Hr(n))+", "+Hr(mi.transform(r))+")"},ue={test:e=>mn.test(e)||tl.test(e)||Gn.test(e),parse:e=>mn.test(e)?mn.parse(e):Gn.test(e)?Gn.parse(e):tl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mn.transform(e):Gn.transform(e),getAnimatableNone:e=>{const t=ue.parse(e);return t.alpha=0,ue.transform(t)}},W0=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function H0(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Pu))==null?void 0:t.length)||0)+(((n=e.match(W0))==null?void 0:n.length)||0)>0}const Rm="number",Bm="color",G0="var",$0="var(",kf="${}",Y0=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(Y0,l=>(ue.test(l)?(r.color.push(o),i.push(Bm),n.push(ue.parse(l))):l.startsWith($0)?(r.var.push(o),i.push(G0),n.push(l)):(r.number.push(o),i.push(Rm),n.push(parseFloat(l))),++o,kf)).split(kf);return{values:n,split:a,indexes:r,types:i}}function Nm(e){return gi(e).values}function Lm(e){const{split:t,types:n}=gi(e),r=t.length;return i=>{let o="";for(let s=0;stypeof e=="number"?0:ue.test(e)?ue.getAnimatableNone(e):e;function X0(e){const t=Nm(e);return Lm(e)(t.map(Q0))}const en={test:H0,parse:Nm,createTransformer:Lm,getAnimatableNone:X0};function Ys(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 b0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ys(l,a,e+1/3),o=Ys(l,a,e),s=Ys(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function zo(e,t){return n=>n>0?t:e}const ee=(e,t,n)=>e+(t-e)*n,Qs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},J0=[tl,mn,Gn],Z0=e=>J0.find(t=>t.test(e));function Pf(e){const t=Z0(e);if(!t)return!1;let n=t.parse(e);return t===Gn&&(n=b0(n)),n}const Mf=(e,t)=>{const n=Pf(e),r=Pf(t);if(!n||!r)return zo(e,t);const i={...n};return o=>(i.red=Qs(n.red,r.red,o),i.green=Qs(n.green,r.green,o),i.blue=Qs(n.blue,r.blue,o),i.alpha=ee(n.alpha,r.alpha,o),mn.transform(i))},nl=new Set(["none","hidden"]);function q0(e,t){return nl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function eC(e,t){return n=>ee(e,t,n)}function Du(e){return typeof e=="number"?eC:typeof e=="string"?ku(e)?zo:ue.test(e)?Mf:rC:Array.isArray(e)?jm:typeof e=="object"?ue.test(e)?Mf:tC:zo}function jm(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>Du(o)(o,t[s]));return o=>{for(let s=0;s{for(const o in r)n[o]=r[o](i);return n}}function nC(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=en.createTransformer(t),r=gi(e),i=gi(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?nl.has(e)&&!i.values.length||nl.has(t)&&!r.values.length?q0(e,t):ki(jm(nC(r,i),i.values),n):zo(e,t)};function Vm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ee(e,t,n):Du(e)(e,t)}const iC=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Z.update(t,n),stop:()=>qt(t),now:()=>Ae.isProcessing?Ae.timestamp:Ne.now()}},Om=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o=Uo?1/0:t}function oC(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Ru(r),Uo);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:vt(i)}}const sC=5;function Fm(e,t,n){const r=Math.max(t-sC,0);return Am(n-e(r),t-r)}const ie={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Xs=.001;function aC({duration:e=ie.duration,bounce:t=ie.bounce,velocity:n=ie.velocity,mass:r=ie.mass}){let i,o,s=1-t;s=Mt(ie.minDamping,ie.maxDamping,s),e=Mt(ie.minDuration,ie.maxDuration,vt(e)),s<1?(i=u=>{const c=u*s,f=c*e,d=c-n,g=rl(u,s),y=Math.exp(-f);return Xs-d/g*y},o=u=>{const f=u*s*e,d=f*n+n,g=Math.pow(s,2)*Math.pow(u,2)*e,y=Math.exp(-f),v=rl(Math.pow(u,2),s);return(-i(u)+Xs>0?-1:1)*((d-g)*y)/v}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Xs+c*f},o=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=uC(i,o,a);if(e=At(e),isNaN(l))return{stiffness:ie.stiffness,damping:ie.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const lC=12;function uC(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function dC(e){let t={velocity:ie.velocity,stiffness:ie.stiffness,damping:ie.damping,mass:ie.mass,isResolvedFromDuration:!1,...e};if(!Df(e,fC)&&Df(e,cC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Mt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ie.mass,stiffness:i,damping:o}}else{const n=aC(e);t={...t,...n,mass:ie.mass},t.isResolvedFromDuration=!0}return t}function Wo(e=ie.visualDuration,t=ie.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:g}=dC({...n,velocity:-vt(n.velocity||0)}),y=d||0,v=u/(2*Math.sqrt(l*c)),I=s-o,p=vt(Math.sqrt(l/c)),h=Math.abs(I)<5;r||(r=h?ie.restSpeed.granular:ie.restSpeed.default),i||(i=h?ie.restDelta.granular:ie.restDelta.default);let m;if(v<1){const E=rl(p,v);m=T=>{const k=Math.exp(-v*p*T);return s-k*((y+v*p*I)/E*Math.sin(E*T)+I*Math.cos(E*T))}}else if(v===1)m=E=>s-Math.exp(-p*E)*(I+(y+p*I)*E);else{const E=p*Math.sqrt(v*v-1);m=T=>{const k=Math.exp(-v*p*T),S=Math.min(E*T,300);return s-k*((y+v*p*I)*Math.sinh(S)+E*I*Math.cosh(S))/E}}const w={calculatedDuration:g&&f||null,next:E=>{const T=m(E);if(g)a.done=E>=f;else{let k=E===0?y:0;v<1&&(k=E===0?At(y):Fm(m,E,T));const S=Math.abs(k)<=r,K=Math.abs(s-T)<=i;a.done=S&&K}return a.value=a.done?s:T,a},toString:()=>{const E=Math.min(Ru(w),Uo),T=Om(k=>w.next(E*k).value,E,30);return E+"ms "+T},toTransition:()=>{}};return w}Wo.applyToOptions=e=>{const t=oC(e,100,Wo);return e.ease=t.ease,e.duration=At(t.duration),e.type="keyframes",e};function il({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},g=S=>a!==void 0&&Sl,y=S=>a===void 0?l:l===void 0||Math.abs(a-S)-v*Math.exp(-S/r),m=S=>p+h(S),w=S=>{const K=h(S),x=m(S);d.done=Math.abs(K)<=u,d.value=d.done?p:x};let E,T;const k=S=>{g(d.value)&&(E=S,T=Wo({keyframes:[d.value,y(d.value)],velocity:Fm(m,S,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:S=>{let K=!1;return!T&&E===void 0&&(K=!0,w(S),k(S)),E!==void 0&&S>=E?T.next(S-E):(!K&&w(S),d)}}}function hC(e,t,n){const r=[],i=n||Dt.mix||Vm,o=e.length-1;for(let s=0;st[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=hC(t,r,i),l=a.length,u=c=>{if(s&&c1)for(;fu(Mt(e[0],e[o-1],c)):u}function mC(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=pi(0,t,r);e.push(ee(n,1,i))}}function gC(e){const t=[0];return mC(t,e.length-1),t}function yC(e,t){return e.map(n=>n*t)}function AC(e,t){return e.map(()=>t||Tm).splice(0,e.length-1)}function Gr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=P0(r)?r.map(Kf):Kf(r),o={done:!1,value:t[0]},s=yC(n&&n.length===t.length?n:gC(t),e),a=pC(s,t,{ease:Array.isArray(i)?i:AC(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const vC=e=>e!==null;function Bu(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(vC),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const CC={decay:il,inertia:il,tween:Gr,keyframes:Gr,spring:Wo};function _m(e){typeof e.type=="string"&&(e.type=CC[e.type])}class Nu{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const wC=e=>e/100;class Lu extends Nu{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Ne.now()&&this.tick(Ne.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;_m(t);const{type:n=Gr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const l=n||Gr;l!==Gr&&typeof a[0]!="number"&&(this.mixKeyframes=ki(wC,Vm(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Ru(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:I}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,w=r;if(f){const S=Math.min(this.currentTime,i)/a;let K=Math.floor(S),x=S%1;!x&&S>=1&&(x=1),x===1&&K--,K=Math.min(K,f+1),!!(K%2)&&(d==="reverse"?(x=1-x,g&&(x-=g/a)):d==="mirror"&&(w=s)),m=Mt(0,1,x)*a}const E=h?{done:!1,value:c[0]}:w.next(m);o&&(E.value=o(E.value));let{done:T}=E;!h&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return k&&y!==il&&(E.value=Bu(c,this.options,I,this.speed)),v&&v(E.value),k&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return vt(this.calculatedDuration)}get time(){return vt(this.currentTime)}set time(t){var n;t=At(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ne.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=vt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=iC,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ne.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function xC(e){for(let t=1;te*180/Math.PI,ol=e=>{const t=gn(Math.atan2(e[1],e[0]));return sl(t)},SC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ol,rotateZ:ol,skewX:e=>gn(Math.atan(e[1])),skewY:e=>gn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},sl=e=>(e=e%360,e<0&&(e+=360),e),Rf=ol,Bf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Nf=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),IC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bf,scaleY:Nf,scale:e=>(Bf(e)+Nf(e))/2,rotateX:e=>sl(gn(Math.atan2(e[6],e[5]))),rotateY:e=>sl(gn(Math.atan2(-e[2],e[0]))),rotateZ:Rf,rotate:Rf,skewX:e=>gn(Math.atan(e[4])),skewY:e=>gn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function al(e){return e.includes("scale")?1:0}function ll(e,t){if(!e||e==="none")return al(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=IC,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=SC,i=a}if(!i)return al(t);const o=r[t],s=i[1].split(",").map(KC);return typeof o=="function"?o(s):s[o]}const EC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ll(n,t)};function KC(e){return parseFloat(e.trim())}const vr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cr=new Set(vr),Lf=e=>e===Ar||e===j,TC=new Set(["x","y","z"]),kC=vr.filter(e=>!TC.has(e));function PC(e){const t=[];return kC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Cn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ll(t,"x"),y:(e,{transform:t})=>ll(t,"y")};Cn.translateX=Cn.x;Cn.translateY=Cn.y;const wn=new Set;let ul=!1,cl=!1,fl=!1;function zm(){if(cl){const e=Array.from(wn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=PC(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}cl=!1,ul=!1,wn.forEach(e=>e.complete(fl)),wn.clear()}function Um(){wn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cl=!0)})}function MC(){fl=!0,Um(),zm(),fl=!1}class ju{constructor(t,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(wn.add(this),ul||(ul=!0,Z.read(Um),Z.resolveKeyframes(zm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}xC(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),wn.delete(this)}cancel(){this.state==="scheduled"&&(wn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const DC=e=>e.startsWith("--");function RC(e,t,n){DC(t)?e.style.setProperty(t,n):e.style[t]=n}const BC=Su(()=>window.ScrollTimeline!==void 0),NC={};function LC(e,t){const n=Su(e);return()=>NC[t]??n()}const Wm=LC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nr([0,.65,.55,1]),circOut:Nr([.55,0,1,.45]),backIn:Nr([.31,.01,.66,-.59]),backOut:Nr([.33,1.53,.69,.99])};function Hm(e,t){if(e)return typeof e=="function"?Wm()?Om(e,t):"ease-out":km(e)?Nr(e):Array.isArray(e)?e.map(n=>Hm(n,t)||jf.easeOut):jf[e]}function jC(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const f=Hm(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(c,d)}function Gm(e){return typeof e=="function"&&"applyToOptions"in e}function VC({type:e,...t}){return Gm(e)&&Wm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class OC extends Nu{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,xu(typeof t.type!="string");const u=VC(t);this.animation=jC(n,r,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Bu(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):RC(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return vt(Number(t))}get time(){return vt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=At(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&BC()?(this.animation.timeline=t,et):n(this)}}const $m={anticipate:Im,backInOut:Sm,circInOut:Km};function FC(e){return e in $m}function _C(e){typeof e.ease=="string"&&FC(e.ease)&&(e.ease=$m[e.ease])}const Vf=10;class zC extends OC{constructor(t){_C(t),_m(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Lu({...s,autoplay:!1}),l=At(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Vf).value,a.sample(l).value,Vf),a.stop()}}const Of=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(en.test(e)||e==="0")&&!e.startsWith("url("));function UC(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function $C(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return GC()&&n&&HC.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const YC=40;class QC extends Nu{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){var y;super(),this.stop=()=>{var v,I;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(I=this.keyframeResolver)==null||I.cancel()},this.createdAt=Ne.now();const d={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:u,element:c,...f},g=(c==null?void 0:c.KeyframeResolver)||ju;this.keyframeResolver=new g(a,(v,I,p)=>this.onKeyframesResolved(v,I,d,!p),l,u,c),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Ne.now(),WC(t,o,s,a)||((Dt.instantAnimations||!l)&&(c==null||c(Bu(t,r,n))),t[0]=t[t.length-1],dl(r),r.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>YC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!u&&$C(d)?new zC({...d,element:d.motionValue.owner.current}):new Lu(d);g.finished.then(()=>this.notifyFinished()).catch(et),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),MC()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const XC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bC(e){const t=XC.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ym(e,t,n=1){const[r,i]=bC(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return mm(s)?parseFloat(s):s}return ku(i)?Ym(i,t,n+1):i}function Vu(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Qm=new Set(["width","height","top","left","right","bottom",...vr]),JC={test:e=>e==="auto",parse:e=>e},Xm=e=>t=>t.test(e),bm=[Ar,j,Ct,Lt,U0,z0,JC],Ff=e=>bm.find(Xm(e));function ZC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ym(e):!0}const qC=new Set(["brightness","contrast","saturate","opacity"]);function e1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Pu)||[];if(!r)return e;const i=n.replace(r,"");let o=qC.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const t1=/\b([a-z-]*)\(.*?\)/gu,hl={...en,getAnimatableNone:e=>{const t=e.match(t1);return t?t.map(e1).join(" "):e}},_f={...Ar,transform:Math.round},n1={rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scale:bi,scaleX:bi,scaleY:bi,scaleZ:bi,skew:Lt,skewX:Lt,skewY:Lt,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:mi,originX:Tf,originY:Tf,originZ:j},Ou={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j,...n1,zIndex:_f,fillOpacity:mi,strokeOpacity:mi,numOctaves:_f},r1={...Ou,color:ue,backgroundColor:ue,outlineColor:ue,fill:ue,stroke:ue,borderColor:ue,borderTopColor:ue,borderRightColor:ue,borderBottomColor:ue,borderLeftColor:ue,filter:hl,WebkitFilter:hl},Jm=e=>r1[e];function Zm(e,t){let n=Jm(e);return n!==hl&&(n=en),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const i1=new Set(["auto","none","0"]);function o1(e,t,n){let r=0,i;for(;r{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function a1(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const qm=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function eg(e){return gm(e)&&"offsetHeight"in e}const zf=30,l1=e=>!isNaN(parseFloat(e));class u1{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Ne.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ne.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=l1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Iu);const r=this.events[t].add(n);return t==="change"?()=>{r(),Z.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ne.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zf)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zf);return Am(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fr(e,t){return new u1(e,t)}const{schedule:Fu}=Pm(queueMicrotask,!1),ot={x:!1,y:!1};function tg(){return ot.x||ot.y}function c1(e){return e==="x"||e==="y"?ot[e]?null:(ot[e]=!0,()=>{ot[e]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function ng(e,t){const n=a1(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Uf(e){return!(e.pointerType==="touch"||tg())}function f1(e,t,n={}){const[r,i,o]=ng(e,n),s=a=>{if(!Uf(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=f=>{Uf(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const rg=(e,t)=>t?e===t?!0:rg(e,t.parentElement):!1,_u=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,d1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function h1(e){return d1.has(e.tagName)||e.tabIndex!==-1}const po=new WeakSet;function Wf(e){return t=>{t.key==="Enter"&&e(t)}}function bs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const p1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Wf(()=>{if(po.has(n))return;bs(n,"down");const i=Wf(()=>{bs(n,"up")}),o=()=>bs(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Hf(e){return _u(e)&&!tg()}function m1(e,t,n={}){const[r,i,o]=ng(e,n),s=a=>{const l=a.currentTarget;if(!Hf(a))return;po.add(l);const u=t(l,a),c=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),po.has(l)&&po.delete(l),Hf(g)&&typeof u=="function"&&u(g,{success:y})},f=g=>{c(g,l===window||l===document||n.useGlobalTarget||rg(l,g.target))},d=g=>{c(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),eg(a)&&(a.addEventListener("focus",u=>p1(u,i)),!h1(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ig(e){return gm(e)&&"ownerSVGElement"in e}function g1(e){return ig(e)&&e.tagName==="svg"}const Ie=e=>!!(e&&e.getVelocity),y1=[...bm,ue,en],A1=e=>y1.find(Xm(e)),zu=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class v1 extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=eg(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function C1({children:e,isPresent:t,anchorX:n,root:r}){const i=C.useId(),o=C.useRef(null),s=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(zu);return C.useInsertionEffect(()=>{const{width:l,height:u,top:c,left:f,right:d}=s.current;if(t||!o.current||!l||!u)return;const g=n==="left"?`left: ${f}`:`right: ${d}`;o.current.dataset.motionPopId=i;const y=document.createElement("style");a&&(y.nonce=a);const v=r??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(` [data-motion-pop-id="${i}"] { position: absolute !important; width: ${l}px !important; height: ${u}px !important; ${g}px !important; top: ${c}px !important; } `),()=>{v.contains(y)&&v.removeChild(y)}},[t]),A.jsx(v1,{isPresent:t,childRef:o,sizeRef:s,children:C.cloneElement(e,{ref:o})})}const w1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const u=Au(x1),c=C.useId();let f=!0,d=C.useMemo(()=>(f=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:g=>{u.set(g,!0);for(const y of u.values())if(!y)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return o&&f&&(d={...d}),C.useMemo(()=>{u.forEach((g,y)=>u.set(y,!1))},[n]),C.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),s==="popLayout"&&(e=A.jsx(C1,{isPresent:n,anchorX:a,root:l,children:e})),A.jsx(cs.Provider,{value:d,children:e})};function x1(){return new Map}function og(e=!0){const t=C.useContext(cs);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=C.useId();C.useEffect(()=>{if(e)return i(o)},[e]);const s=C.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const Ji=e=>e.key||"";function Gf(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const S1=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[u,c]=og(s),f=C.useMemo(()=>Gf(e),[e]),d=s&&!u?[]:f.map(Ji),g=C.useRef(!0),y=C.useRef(f),v=Au(()=>new Map),[I,p]=C.useState(f),[h,m]=C.useState(f);pm(()=>{g.current=!1,y.current=f;for(let T=0;T{const k=Ji(T),S=s&&!u?!1:f===h||d.includes(k),K=()=>{if(v.has(k))v.set(k,!0);else return;let x=!0;v.forEach(B=>{B||(x=!1)}),x&&(E==null||E(),m(y.current),s&&(c==null||c()),r&&r())};return A.jsx(w1,{isPresent:S,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:S?void 0:K,anchorX:a,children:T},k)})})},sg=C.createContext({strict:!1}),$f={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"]},dr={};for(const e in $f)dr[e]={isEnabled:t=>$f[e].some(n=>!!t[n])};function I1(e){for(const t in e)dr[t]={...dr[t],...e[t]}}const E1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ho(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||E1.has(e)}let ag=e=>!Ho(e);function K1(e){typeof e=="function"&&(ag=t=>t.startsWith("on")?!Ho(t):e(t))}try{K1(require("@emotion/is-prop-valid").default)}catch{}function T1(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(ag(i)||n===!0&&Ho(i)||!t&&!Ho(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const fs=C.createContext({});function ds(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function yi(e){return typeof e=="string"||Array.isArray(e)}const Uu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wu=["initial",...Uu];function hs(e){return ds(e.animate)||Wu.some(t=>yi(e[t]))}function lg(e){return!!(hs(e)||e.variants)}function k1(e,t){if(hs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||yi(n)?n:void 0,animate:yi(r)?r:void 0}}return e.inherit!==!1?t:{}}function P1(e){const{initial:t,animate:n}=k1(e,C.useContext(fs));return C.useMemo(()=>({initial:t,animate:n}),[Yf(t),Yf(n)])}function Yf(e){return Array.isArray(e)?e.join(" "):e}const Ai={};function M1(e){for(const t in e)Ai[t]=e[t],Tu(t)&&(Ai[t].isCSSVariable=!0)}function ug(e,{layout:t,layoutId:n}){return Cr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ai[e]||e==="opacity")}const D1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},R1=vr.length;function B1(e,t,n){let r="",i=!0;for(let o=0;o({style:{},transform:{},transformOrigin:{},vars:{}});function cg(e,t,n){for(const r in t)!Ie(t[r])&&!ug(r,n)&&(e[r]=t[r])}function N1({transformTemplate:e},t){return C.useMemo(()=>{const n=Gu();return Hu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function L1(e,t){const n=e.style||{},r={};return cg(r,n,e),Object.assign(r,N1(e,t)),r}function j1(e,t){const n={},r=L1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const V1={offset:"stroke-dashoffset",array:"stroke-dasharray"},O1={offset:"strokeDashoffset",array:"strokeDasharray"};function F1(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?V1:O1;e[o.offset]=j.transform(-r);const s=j.transform(t),a=j.transform(n);e[o.array]=`${s} ${a}`}function fg(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,u,c){if(Hu(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&F1(f,i,o,s,!1)}const dg=()=>({...Gu(),attrs:{}}),hg=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _1(e,t,n,r){const i=C.useMemo(()=>{const o=dg();return fg(o,t,hg(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};cg(o,e.style,e),i.style={...o,...i.style}}return i}const z1=["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 $u(e){return typeof e!="string"||e.includes("-")?!1:!!(z1.indexOf(e)>-1||/[A-Z]/u.test(e))}function U1(e,t,n,{latestValues:r},i,o=!1){const a=($u(e)?_1:j1)(t,r,i,e),l=T1(t,typeof e=="string",o),u=e!==C.Fragment?{...l,...a,ref:n}:{},{children:c}=t,f=C.useMemo(()=>Ie(c)?c.get():c,[c]);return C.createElement(e,{...u,children:f})}function Qf(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Yu(e,t,n,r){if(typeof t=="function"){const[i,o]=Qf(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Qf(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function mo(e){return Ie(e)?e.get():e}function W1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:H1(n,r,i,e),renderState:t()}}function H1(e,t,n,r){const i={},o=r(e,{});for(const d in o)i[d]=mo(o[d]);let{initial:s,animate:a}=e;const l=hs(e),u=lg(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const f=c?a:s;if(f&&typeof f!="boolean"&&!ds(f)){const d=Array.isArray(f)?f:[f];for(let g=0;g(t,n)=>{const r=C.useContext(fs),i=C.useContext(cs),o=()=>W1(e,t,r,i);return n?o():Au(o)};function Qu(e,t,n){var o;const{style:r}=e,i={};for(const s in r)(Ie(r[s])||t.style&&Ie(t.style[s])||ug(s,e)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const G1=pg({scrapeMotionValuesFromProps:Qu,createRenderState:Gu});function mg(e,t,n){const r=Qu(e,t,n);for(const i in e)if(Ie(e[i])||Ie(t[i])){const o=vr.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const $1=pg({scrapeMotionValuesFromProps:mg,createRenderState:dg}),Y1=Symbol.for("motionComponentSymbol");function $n(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Q1(e,t,n){return C.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):$n(n)&&(n.current=r))},[t])}const Xu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),X1="framerAppearId",gg="data-"+Xu(X1),yg=C.createContext({});function b1(e,t,n,r,i){var v,I;const{visualElement:o}=C.useContext(fs),s=C.useContext(sg),a=C.useContext(cs),l=C.useContext(zu).reducedMotion,u=C.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=C.useContext(yg);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&J1(u.current,n,i,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const g=n[gg],y=C.useRef(!!g&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((I=window.MotionHasOptimisedAnimation)==null?void 0:I.call(window,g)));return pm(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),y.current&&c.animationState&&c.animationState.animateChanges())}),C.useEffect(()=>{c&&(!y.current&&c.animationState&&c.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,g)}),y.current=!1),c.enteringChildren=void 0)}),c}function J1(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ag(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&$n(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function Ag(e){if(e)return e.options.allowProjection!==!1?e.projection:Ag(e.parent)}function Js(e,{forwardMotionProps:t=!1}={},n,r){n&&I1(n);const i=$u(e)?$1:G1;function o(a,l){let u;const c={...C.useContext(zu),...a,layoutId:Z1(a)},{isStatic:f}=c,d=P1(a),g=i(a,f);if(!f&&vu){q1();const y=ew(c);u=y.MeasureLayout,d.visualElement=b1(e,g,c,r,y.ProjectionNode)}return A.jsxs(fs.Provider,{value:d,children:[u&&d.visualElement?A.jsx(u,{visualElement:d.visualElement,...c}):null,U1(e,a,Q1(g,d.visualElement,l),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=C.forwardRef(o);return s[Y1]=e,s}function Z1({layoutId:e}){const t=C.useContext(yu).id;return t&&e!==void 0?t+"-"+e:e}function q1(e,t){C.useContext(sg).strict}function ew(e){const{drag:t,layout:n}=dr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function tw(e,t){if(typeof Proxy>"u")return Js;const n=new Map,r=(o,s)=>Js(o,s,e,t),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,Js(s,void 0,e,t)),n.get(s))})}function vg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nw({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rw(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 Zs(e){return e===void 0||e===1}function pl({scale:e,scaleX:t,scaleY:n}){return!Zs(e)||!Zs(t)||!Zs(n)}function fn(e){return pl(e)||Cg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Cg(e){return Xf(e.x)||Xf(e.y)}function Xf(e){return e&&e!=="0%"}function Go(e,t,n){const r=e-n,i=t*r;return n+i}function bf(e,t,n,r,i){return i!==void 0&&(e=Go(e,i,r)),Go(e,n,r)+t}function ml(e,t=0,n=1,r,i){e.min=bf(e.min,t,n,r,i),e.max=bf(e.max,t,n,r,i)}function wg(e,{x:t,y:n}){ml(e.x,t.translate,t.scale,t.originPoint),ml(e.y,n.translate,n.scale,n.originPoint)}const Jf=.999999999999,Zf=1.0000000000001;function iw(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;aJf&&(t.x=1),t.yJf&&(t.y=1)}function Yn(e,t){e.min=e.min+t,e.max=e.max+t}function qf(e,t,n,r,i=.5){const o=ee(e.min,e.max,i);ml(e,t,n,o,r)}function Qn(e,t){qf(e.x,t.x,t.scaleX,t.scale,t.originX),qf(e.y,t.y,t.scaleY,t.scale,t.originY)}function xg(e,t){return vg(rw(e.getBoundingClientRect(),t))}function ow(e,t,n){const r=xg(e,n),{scroll:i}=t;return i&&(Yn(r.x,i.offset.x),Yn(r.y,i.offset.y)),r}const ed=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xn=()=>({x:ed(),y:ed()}),td=()=>({min:0,max:0}),se=()=>({x:td(),y:td()}),$o={current:null},bu={current:!1};function Sg(){if(bu.current=!0,!!vu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$o.current=e.matches;e.addEventListener("change",t),t()}else $o.current=!1}const sw=new WeakMap;function aw(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Ie(i))e.addValue(r,i);else if(Ie(o))e.addValue(r,fr(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,fr(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const nd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lw{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ju,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Ne.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),bu.current||Sg(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$o.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),qt(this.notifyUpdate),qt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Cr.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Z.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in dr){const n=dr[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):se()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=fr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(mm(r)||ym(r))?r=parseFloat(r):!A1(r)&&en.test(n)&&(r=Zm(t,n)),this.setBaseTarget(t,Ie(r)?r.get():r)),Ie(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Yu(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ie(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Iu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Fu.render(this.render)}}class Ig extends lw{constructor(){super(...arguments),this.KeyframeResolver=s1}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Eg(e,{style:t,vars:n},r,i){const o=e.style;let s;for(s in t)o[s]=t[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function uw(e){return window.getComputedStyle(e)}class cw extends Ig{constructor(){super(...arguments),this.type="html",this.renderInstance=Eg}readValueFromInstance(t,n){var r;if(Cr.has(n))return(r=this.projection)!=null&&r.isProjecting?al(n):EC(t,n);{const i=uw(t),o=(Tu(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xg(t,n)}build(t,n,r){Hu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Qu(t,n,r)}}const Kg=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 fw(e,t,n,r){Eg(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Kg.has(i)?i:Xu(i),t.attrs[i])}class dw extends Ig{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Cr.has(n)){const r=Jm(n);return r&&r.default||0}return n=Kg.has(n)?n:Xu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return mg(t,n,r)}build(t,n,r){fg(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){fw(t,n,r,i)}mount(t){this.isSVGTag=hg(t.tagName),super.mount(t)}}const hw=(e,t)=>$u(e)?new dw(t):new cw(t,{allowProjection:e!==C.Fragment});function rr(e,t,n){const r=e.getProps();return Yu(r,t,n!==void 0?n:r.custom,e)}const gl=e=>Array.isArray(e);function pw(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fr(n))}function mw(e){return gl(e)?e[e.length-1]||0:e}function gw(e,t){const n=rr(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=mw(o[s]);pw(e,s,a)}}function yw(e){return!!(Ie(e)&&e.add)}function yl(e,t){const n=e.getValue("willChange");if(yw(n))return n.add(t);if(!n&&Dt.WillChange){const r=new Dt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Tg(e){return e.props[gg]}const Aw=e=>e!==null;function vw(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Aw),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Cw={type:"spring",stiffness:500,damping:25,restSpeed:10},ww=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xw={type:"keyframes",duration:.8},Sw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Iw=(e,{keyframes:t})=>t.length>2?xw:Cr.has(e)?e.startsWith("scale")?ww(t[1]):Cw:Sw;function Ew({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Ju=(e,t,n,r={},i,o)=>s=>{const a=Vu(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-At(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};Ew(a)||Object.assign(c,Iw(e,c)),c.duration&&(c.duration=At(c.duration)),c.repeatDelay&&(c.repeatDelay=At(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(dl(c),c.delay===0&&(f=!0)),(Dt.instantAnimations||Dt.skipAnimations)&&(f=!0,dl(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const d=vw(c.keyframes,a);if(d!==void 0){Z.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new Lu(c):new QC(c)};function Kw({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function kg(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(o=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c,e.latestValues[c]??null),d=a[c];if(d===void 0||u&&Kw(u,c))continue;const g={delay:n,...Vu(o||{},c)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const p=Tg(e);if(p){const h=window.MotionHandoffAnimation(p,c,Z);h!==null&&(g.startTime=h,v=!0)}}yl(e,c),f.start(Ju(c,f,d,e.shouldReduceMotion&&Qm.has(c)?{type:!1}:g,e,v));const I=f.animation;I&&l.push(I)}return s&&Promise.all(l).then(()=>{Z.update(()=>{s&&gw(e,s)})}),l}function Pg(e,t,n,r=0,i=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function Al(e,t,n={}){var l;const r=rr(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(kg(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=i;return Tw(e,t,u,c,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,s]:[s,o];return u().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function Tw(e,t,n=0,r=0,i=0,o=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Al(l,t,{...s,delay:n+(typeof r=="function"?0:r)+Pg(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function kw(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Al(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Al(e,t,n);else{const i=typeof t=="function"?rr(e,t,n.custom):t;r=Promise.all(kg(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Mg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>kw(e,n,r)))}function Bw(e){let t=Rw(e),n=rd(),r=!0;const i=l=>(u,c)=>{var d;const f=rr(e,c,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:g,transitionEnd:y,...v}=f;u={...u,...v,...y}}return u};function o(l){t=l(e)}function s(l){const{props:u}=e,c=Dg(e.parent)||{},f=[],d=new Set;let g={},y=1/0;for(let I=0;Iy&&w,K=!1;const x=Array.isArray(m)?m:[m];let B=x.reduce(i(p),{});E===!1&&(B={});const{prevResolvedValues:L={}}=h,z={...L,...B},b=W=>{S=!0,d.has(W)&&(K=!0,d.delete(W)),h.needsAnimating[W]=!0;const M=e.getValue(W);M&&(M.liveStyle=!1)};for(const W in z){const M=B[W],D=L[W];if(g.hasOwnProperty(W))continue;let R=!1;gl(M)&&gl(D)?R=!Mg(M,D):R=M!==D,R?M!=null?b(W):d.add(W):M!==void 0&&d.has(W)?b(W):h.protectedKeys[W]=!0}h.prevProp=m,h.prevResolvedValues=B,h.isActive&&(g={...g,...B}),r&&e.blockInitialAnimation&&(S=!1);const le=T&&k;S&&(!le||K)&&f.push(...x.map(W=>{const M={type:p};if(typeof W=="string"&&r&&!le&&e.manuallyAnimateOnMount&&e.parent){const{parent:D}=e,R=rr(D,W);if(D.enteringChildren&&R){const{delayChildren:F}=R.transition||{};M.delay=Pg(D.enteringChildren,e,F)}}return{animation:W,options:M}}))}if(d.size){const I={};if(typeof u.initial!="boolean"){const p=rr(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(I.transition=p.transition)}d.forEach(p=>{const h=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),I[p]=h??null}),f.push({animation:I})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var g;return(g=d.animationState)==null?void 0:g.setActive(l,u)}),n[l].isActive=u;const c=s(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=rd(),r=!0}}}function Nw(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Mg(t,e):!1}function ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rd(){return{animate:ln(!0),whileInView:ln(),whileHover:ln(),whileTap:ln(),whileDrag:ln(),whileFocus:ln(),exit:ln()}}class on{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Lw extends on{constructor(t){super(t),t.animationState||(t.animationState=Bw(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ds(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let jw=0;class Vw extends on{constructor(){super(...arguments),this.id=jw++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ow={animation:{Feature:Lw},exit:{Feature:Vw}};function vi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Di(e){return{point:{x:e.pageX,y:e.pageY}}}const Fw=e=>t=>_u(t)&&e(t,Di(t));function $r(e,t,n,r){return vi(e,t,Fw(n),r)}const Rg=1e-4,_w=1-Rg,zw=1+Rg,Bg=.01,Uw=0-Bg,Ww=0+Bg;function ke(e){return e.max-e.min}function Hw(e,t,n){return Math.abs(e-t)<=n}function id(e,t,n,r=.5){e.origin=r,e.originPoint=ee(t.min,t.max,e.origin),e.scale=ke(n)/ke(t),e.translate=ee(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_w&&e.scale<=zw||isNaN(e.scale))&&(e.scale=1),(e.translate>=Uw&&e.translate<=Ww||isNaN(e.translate))&&(e.translate=0)}function Yr(e,t,n,r){id(e.x,t.x,n.x,r?r.originX:void 0),id(e.y,t.y,n.y,r?r.originY:void 0)}function od(e,t,n){e.min=n.min+t.min,e.max=e.min+ke(t)}function Gw(e,t,n){od(e.x,t.x,n.x),od(e.y,t.y,n.y)}function sd(e,t,n){e.min=t.min-n.min,e.max=e.min+ke(t)}function Qr(e,t,n){sd(e.x,t.x,n.x),sd(e.y,t.y,n.y)}function Xe(e){return[e("x"),e("y")]}const Ng=({current:e})=>e?e.ownerDocument.defaultView:null,ad=(e,t)=>Math.abs(e-t);function $w(e,t){const n=ad(e.x,t.x),r=ad(e.y,t.y);return Math.sqrt(n**2+r**2)}class Lg{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ea(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=$w(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=d,{timestamp:I}=Ae;this.history.push({...v,timestamp:I});const{onStart:p,onMove:h}=this.handlers;g||(p&&p(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,d)},this.handlePointerMove=(d,g)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=qs(g,this.transformPagePoint),Z.update(this.updatePoint,!0)},this.handlePointerUp=(d,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:I}=this.handlers;if(this.dragSnapToOrigin&&I&&I(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=ea(d.type==="pointercancel"?this.lastMoveEventInfo:qs(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(d,p),v&&v(d,p)},!_u(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=Di(t),l=qs(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=Ae;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,ea(l,this.history)),this.removeListeners=ki($r(this.contextWindow,"pointermove",this.handlePointerMove),$r(this.contextWindow,"pointerup",this.handlePointerUp),$r(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qt(this.updatePoint)}}function qs(e,t){return t?{point:t(e.point)}:e}function ld(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ea({point:e},t){return{point:e,delta:ld(e,jg(t)),offset:ld(e,Yw(t)),velocity:Qw(t,.1)}}function Yw(e){return e[0]}function jg(e){return e[e.length-1]}function Qw(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=jg(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>At(t)));)n--;if(!r)return{x:0,y:0};const o=vt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Xw(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ee(n,e,r.max):Math.min(e,n)),e}function ud(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 bw(e,{top:t,left:n,bottom:r,right:i}){return{x:ud(e.x,n,i),y:ud(e.y,t,r)}}function cd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=pi(t.min,t.max-r,e.min):r>i&&(n=pi(e.min,e.max-i,t.min)),Mt(0,1,n)}function qw(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 vl=.35;function ex(e=vl){return e===!1?e=0:e===!0&&(e=vl),{x:fd(e,"left","right"),y:fd(e,"top","bottom")}}function fd(e,t,n){return{min:dd(e,t),max:dd(e,n)}}function dd(e,t){return typeof e=="number"?e:e[t]||0}const tx=new WeakMap;class nx{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=se(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Di(f).point)},s=(f,d)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=c1(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xe(p=>{let h=this.getAxisMotionValue(p).get()||0;if(Ct.test(h)){const{projection:m}=this.visualElement;if(m&&m.layout){const w=m.layout.layoutBox[p];w&&(h=ke(w)*(parseFloat(h)/100))}}this.originPoint[p]=h}),v&&Z.postRender(()=>v(f,d)),yl(this.visualElement,"transform");const{animationState:I}=this.visualElement;I&&I.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:I}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:p}=d;if(y&&this.currentDirection===null){this.currentDirection=rx(p),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",d.point,p),this.updateAxis("y",d.point,p),this.visualElement.render(),I&&I(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Xe(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Lg(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Ng(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Z.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Zi(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Xw(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;t&&$n(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=bw(r.layoutBox,t):this.constraints=!1,this.elastic=ex(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xe(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=qw(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!$n(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=ow(r,i.root,this.visualElement.getTransformPagePoint());let s=Jw(i.layout.layoutBox,o);if(n){const a=n(nw(s));this.hasMutatedConstraints=!!a,a&&(s=vg(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Xe(c=>{if(!Zi(c,n,this.currentDirection))return;let f=l&&l[c]||{};s&&(f={min:0,max:0});const d=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return yl(this.visualElement,t),r.start(Ju(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xe(n=>{const{drag:r}=this.getProps();if(!Zi(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-ee(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!$n(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xe(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=Zw({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xe(s=>{if(!Zi(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(ee(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;tx.set(this.visualElement,this);const t=this.visualElement.current,n=$r(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();$n(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Z.read(r);const s=vi(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xe(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=vl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Zi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function rx(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ix extends on{constructor(t){super(t),this.removeGroupControls=et,this.removeListeners=et,this.controls=new nx(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const hd=e=>(t,n)=>{e&&Z.postRender(()=>e(t,n))};class ox extends on{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(t){this.session=new Lg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ng(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hd(t),onStart:hd(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Z.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=$r(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const go={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;const n=pd(e,t.target.x),r=pd(e,t.target.y);return`${n}% ${r}%`}},sx={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=en.parse(e);if(i.length>5)return r;const o=en.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=ee(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};let ta=!1;class ax extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;M1(lx),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),ta&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),go.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,ta=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Z.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Fu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;ta=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vg(e){const[t,n]=og(),r=C.useContext(yu);return A.jsx(ax,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(yg),isPresent:t,safeToRemove:n})}const lx={borderRadius:{...Pr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pr,borderTopRightRadius:Pr,borderBottomLeftRadius:Pr,borderBottomRightRadius:Pr,boxShadow:sx};function ux(e,t,n){const r=Ie(e)?e:fr(e);return r.start(Ju("",r,t,n)),r.animation}const cx=(e,t)=>e.depth-t.depth;class fx{constructor(){this.children=[],this.isDirty=!1}add(t){Cu(this.children,t),this.isDirty=!0}remove(t){wu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cx),this.isDirty=!1,this.children.forEach(t)}}function dx(e,t){const n=Ne.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(qt(r),e(o-t))};return Z.setup(r,!0),()=>qt(r)}const Og=["TopLeft","TopRight","BottomLeft","BottomRight"],hx=Og.length,md=e=>typeof e=="string"?parseFloat(e):e,gd=e=>typeof e=="number"||j.test(e);function px(e,t,n,r,i,o){i?(e.opacity=ee(0,n.opacity??1,mx(r)),e.opacityExit=ee(t.opacity??1,0,gx(r))):o&&(e.opacity=ee(t.opacity??1,n.opacity??1,r));for(let s=0;srt?1:n(pi(e,t,r))}function Ad(e,t){e.min=t.min,e.max=t.max}function Qe(e,t){Ad(e.x,t.x),Ad(e.y,t.y)}function vd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cd(e,t,n,r,i){return e-=t,e=Go(e,1/n,r),i!==void 0&&(e=Go(e,1/i,r)),e}function yx(e,t=0,n=1,r=.5,i,o=e,s=e){if(Ct.test(t)&&(t=parseFloat(t),t=ee(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=ee(o.min,o.max,r);e===o&&(a-=t),e.min=Cd(e.min,t,n,a,i),e.max=Cd(e.max,t,n,a,i)}function wd(e,t,[n,r,i],o,s){yx(e,t[n],t[r],t[i],t.scale,o,s)}const Ax=["x","scaleX","originX"],vx=["y","scaleY","originY"];function xd(e,t,n,r){wd(e.x,t,Ax,n?n.x:void 0,r?r.x:void 0),wd(e.y,t,vx,n?n.y:void 0,r?r.y:void 0)}function Sd(e){return e.translate===0&&e.scale===1}function _g(e){return Sd(e.x)&&Sd(e.y)}function Id(e,t){return e.min===t.min&&e.max===t.max}function Cx(e,t){return Id(e.x,t.x)&&Id(e.y,t.y)}function Ed(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function zg(e,t){return Ed(e.x,t.x)&&Ed(e.y,t.y)}function Kd(e){return ke(e.x)/ke(e.y)}function Td(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class wx{constructor(){this.members=[]}add(t){Cu(this.members,t),t.scheduleRender()}remove(t){if(wu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function xx(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:g,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const na=["","X","Y","Z"],Sx=1e3;let Ix=0;function ra(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ug(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Tg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Z,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ug(r)}function Wg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=Ix++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Tx),this.nodes.forEach(Dx),this.nodes.forEach(Rx),this.nodes.forEach(kx)},this.resolvedRelativeTargetAt=0,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;Z.read(()=>{f=window.innerWidth}),e(s,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,c&&c(),c=dx(d,250),go.hasAnimatedSinceResize&&(go.hasAnimatedSinceResize=!1,this.nodes.forEach(Md)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||Vx,{onLayoutAnimationStart:v,onLayoutAnimationComplete:I}=u.getProps(),p=!this.targetLayout||!zg(this.targetLayout,g),h=!f&&d;if(this.options.layoutRoot||this.resumeFrom||h||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const m={...Vu(y,"layout"),onPlay:v,onComplete:I};(u.shouldReduceMotion||this.options.layoutRoot)&&(m.delay=0,m.type=!1),this.startAnimation(m),this.setAnimationOrigin(c,h)}else f||Md(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}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,this.eventHandlers.clear(),qt(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(Bx),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(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ug(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ke(this.snapshot.measuredBox.x)&&!ke(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const E=w/1e3;Dd(f.x,s.x,E),Dd(f.y,s.y,E),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qr(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lx(this.relativeTarget,this.relativeTargetOrigin,d,E),m&&Cx(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=se()),Qe(m,this.relativeTarget)),v&&(this.animationValues=c,px(c,u,this.latestValues,E,h,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Z.update(()=>{go.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=fr(0)),this.currentAnimation=ux(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),s.onUpdate&&s.onUpdate(c)},onStop:()=>{},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(Sx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Hg(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||se();const f=ke(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=ke(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}Qe(a,l),Qn(a,c),Yr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new wx),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 a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.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}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ra("z",s,u,this.animationValues);for(let c=0;c{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(kd),this.root.sharedNodes.clear()}}}function Ex(e){e.updateLayout()}function Kx(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?Xe(f=>{const d=s?t.measuredBox[f]:t.layoutBox[f],g=ke(d);d.min=r[f].min,d.max=d.min+g}):Hg(o,t.layoutBox,r)&&Xe(f=>{const d=s?t.measuredBox[f]:t.layoutBox[f],g=ke(r[f]);d.max=d.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const a=Xn();Yr(a,r,t.layoutBox);const l=Xn();s?Yr(l,e.applyTransform(i,!0),t.measuredBox):Yr(l,r,t.layoutBox);const u=!_g(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:g}=f;if(d&&g){const y=se();Qr(y,t.layoutBox,d.layoutBox);const v=se();Qr(v,r,g.layoutBox),zg(y,v)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Tx(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kx(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Px(e){e.clearSnapshot()}function kd(e){e.clearMeasurements()}function Pd(e){e.isLayoutDirty=!1}function Mx(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Md(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Dx(e){e.resolveTargetDelta()}function Rx(e){e.calcProjection()}function Bx(e){e.resetSkewAndRotation()}function Nx(e){e.removeLeadSnapshot()}function Dd(e,t,n){e.translate=ee(t.translate,0,n),e.scale=ee(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Rd(e,t,n,r){e.min=ee(t.min,n.min,r),e.max=ee(t.max,n.max,r)}function Lx(e,t,n,r){Rd(e.x,t.x,n.x,r),Rd(e.y,t.y,n.y,r)}function jx(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Vx={duration:.45,ease:[.4,0,.1,1]},Bd=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Nd=Bd("applewebkit/")&&!Bd("chrome/")?Math.round:et;function Ld(e){e.min=Nd(e.min),e.max=Nd(e.max)}function Ox(e){Ld(e.x),Ld(e.y)}function Hg(e,t,n){return e==="position"||e==="preserve-aspect"&&!Hw(Kd(t),Kd(n),.2)}function Fx(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const _x=Wg({attachResizeListener:(e,t)=>vi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ia={current:void 0},Gg=Wg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ia.current){const e=new _x({});e.mount(window),e.setOptions({layoutScroll:!0}),ia.current=e}return ia.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),zx={pan:{Feature:ox},drag:{Feature:ix,ProjectionNode:Gg,MeasureLayout:Vg}};function jd(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Z.postRender(()=>o(t,Di(t)))}class Ux extends on{mount(){const{current:t}=this.node;t&&(this.unmount=f1(t,(n,r)=>(jd(this.node,r,"Start"),i=>jd(this.node,i,"End"))))}unmount(){}}class Wx extends on{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=ki(vi(this.node.current,"focus",()=>this.onFocus()),vi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Vd(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&Z.postRender(()=>o(t,Di(t)))}class Hx extends on{mount(){const{current:t}=this.node;t&&(this.unmount=m1(t,(n,r)=>(Vd(this.node,r,"Start"),(i,{success:o})=>Vd(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Cl=new WeakMap,oa=new WeakMap,Gx=e=>{const t=Cl.get(e.target);t&&t(e)},$x=e=>{e.forEach(Gx)};function Yx({root:e,...t}){const n=e||document;oa.has(n)||oa.set(n,{});const r=oa.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver($x,{root:e,...t})),r[i]}function Qx(e,t,n){const r=Yx(t);return Cl.set(e,n),r.observe(e),()=>{Cl.delete(e),r.unobserve(e)}}const Xx={some:0,all:1};class bx extends on{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Xx[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return Qx(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(Jx(t,n))&&this.startObserver()}unmount(){}}function Jx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Zx={inView:{Feature:bx},tap:{Feature:Hx},focus:{Feature:Wx},hover:{Feature:Ux}},qx={layout:{ProjectionNode:Gg,MeasureLayout:Vg}},eS={...Ow,...Zx,...zx,...qx},ut=tw(eS,hw);function ps(){!bu.current&&Sg();const[e]=C.useState($o.current);return e}function tS({value:e}){const[t,n]=C.useState(0);return C.useEffect(()=>{const r=t,i=e,o=600,s=performance.now();let a;const l=u=>{const c=Math.min(1,(u-s)/o);n(Math.round(r+(i-r)*c)),c<1&&(a=requestAnimationFrame(l))};return a=requestAnimationFrame(l),()=>cancelAnimationFrame(a)},[e]),A.jsx("span",{children:t})}function nS({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const rS=C.forwardRef(nS);function iS({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const oS=C.forwardRef(iS),wl="/assets/logolang-BCk2kEeX.png";function Le({variant:e="primary",className:t="",children:n,...r}){const i=ps(),s=["btn",e==="ghost"?"btn-ghost":e==="primary"?"btn-primary":"",t].filter(Boolean).join(" ");return A.jsx(ut.button,{className:s,whileHover:i?void 0:{y:-1,boxShadow:"0 4px 12px rgba(0,0,0,0.2)"},whileTap:i?void 0:{scale:.98},...r,children:n})}function Zu({count:e,title:t="Kenteken Generator",onRestart:n,onHome:r}){const i=yr(),o=ps();return A.jsx(ut.header,{className:"header",initial:o?{opacity:1}:{y:-20,opacity:0},animate:{y:0,opacity:1},transition:{duration:o?0:.28},children:A.jsxs("div",{className:"header-inner",children:[A.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 cursor-pointer min-w-0",onClick:()=>i("/generate"),children:[A.jsx(ut.img,{src:wl,alt:"CarKiddo",className:"header-logo",whileHover:o?void 0:{rotate:2,y:-1},transition:{type:"spring",stiffness:300,damping:20}}),A.jsx(ut.div,{className:"header-title truncate",initial:o?!1:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:t})]}),A.jsxs("div",{className:"header-right",children:[A.jsxs("div",{className:"header-stat",children:[A.jsx(tS,{value:e})," auto's"]}),r&&A.jsxs(Le,{type:"button",variant:"ghost",className:"header-btn",onClick:r,children:[A.jsx(oS,{className:"w-4 h-4"}),A.jsx("span",{className:"hidden sm:inline",children:"Home"})]}),n&&A.jsxs(Le,{type:"button",variant:"ghost",className:"header-btn",onClick:n,children:[A.jsx(rS,{className:"w-4 h-4"}),A.jsx("span",{className:"hidden sm:inline",children:"Opnieuw"})]})]})]})})}function ms({children:e}){const t=ps();return A.jsx(ut.div,{initial:t?{opacity:1}:{opacity:0,y:8},animate:{opacity:1,y:0},exit:t?{opacity:1}:{opacity:0,y:-8},transition:{duration:t?0:.28},children:e})}const sS="/assets/kentekentv-DF27M8g1.png",aS="/assets/belgischekentekenv2-CDydcV0P.png",lS="/assets/duitskenteken-DtX3fSHu.png",Od="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABQAAAANWBAMAAABTzTwUAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUhRYquHCjbmp/////n6/MhRosjxnvQAAAAAXRSTlNVW+d9HQAAAAFiS0dEAxEMTPIAAAAHdElNRQfpBxIDFhSxq3wdAAAGAUlEQVR42u3SQQ0AIAADsVnAAhawgAX8W8EB34WklXC5DCiKBBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQA0qAATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAPCc8AJRVlQZEAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBsSAEmBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDMgHA24oyoEiA2JADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIAaUAANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBwYAYEAyIAcGAGBAMiAHBgBgQDIgBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIBgQA4IBMSAYEAOCATEgGBADggExIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBgQDYkAwIAYEA2JAMCAGBANiQDAgBsSAYEAMCAbEgGBADAgGxIBgQAwIBsSAYEAMCAbEgGBADAgGxIBgQAwI7wGh6QL7DO5Z2Y/WrwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNS0wNy0xOFQwMzoyMjoyMCswMDowMFroTDoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjUtMDctMThUMDM6MjI6MjArMDA6MDArtfSGAAAAAElFTkSuQmCC",Fd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABQAAAARWBAMAAACWagKaAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEWBTxijZR/2ly/zYDjwMz8AAABTSAz92iXzazfvM0D///++ST7kAAAABXRSTlO0p45oVaoe+4cAAAABYktHRApo0PRWAAAAB3RJTUUH6AYMEi4s1ShrhgAADZ9JREFUeNrt0gEVABAQBbDLIAJVVJBBBKpoq8d/W4bVSrRPoPsSlYACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCiiggAIKKKCAAgoooIACCihgYsBIrQcaM9EHqV8m/uQ9vp0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjQtMDYtMTJUMTg6NDY6NDMrMDA6MDACjjV4AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDI0LTA2LTEyVDE4OjQ2OjQzKzAwOjAwc9ONxAAAAABJRU5ErkJggg==",_d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1000'%20height='600'%20viewBox='0%200%205%203'%3e%3cdesc%3eFlag%20of%20Germany%3c/desc%3e%3crect%20id='black_stripe'%20width='5'%20height='3'%20y='0'%20x='0'%20fill='%23000'/%3e%3crect%20id='red_stripe'%20width='5'%20height='2'%20y='1'%20x='0'%20fill='%23D00'/%3e%3crect%20id='gold_stripe'%20width='5'%20height='1'%20y='2'%20x='0'%20fill='%23FFCE00'/%3e%3c/svg%3e",uS="/assets/Kenteken-vRjtByvW.ttf",$g=[{name:"Aprilia",width:10,height:6.5},{name:"AUDI E-TRON",width:15,height:3.3},{name:"AUDI HORCH",width:22.5,height:3.6},{name:"AUDI Q5 GROOT",width:21.1,height:4.7},{name:"AUDI R8",width:12.7,height:2.7},{name:"Audi R8 GROOT",width:14.5,height:3.7},{name:"AUDI RS-GT",width:11,height:2.6},{name:"AUDI RS6",width:13.1,height:2.9},{name:"Audi RSQ8",width:13,height:2.9},{name:"Bentley bentayga",width:16.6,height:3},{name:"BENTLEY BENTAYGA",width:16.3,height:3},{name:"Bentley Continental",width:16.8,height:4.2},{name:"Bentley EXP12",width:14.4,height:3.5},{name:"BMW I4 1 Persoons",width:14.7,height:2},{name:"BMW M5",width:17.2,height:3.5},{name:"BMW M5 Loopauto",width:7.8,height:1.6},{name:"BMW MOTOR",width:13.5,height:6},{name:"BMW POLITIE MOTOR",width:10,height:2.8},{name:"BMW X6 2-persoons",width:19.3,height:4.5},{name:"Brandweer/Politie Loopauto",width:8,height:3},{name:"Brandweerauto",width:10,height:2.5},{name:"BROTHERS JEEP",width:16,height:2.8},{name:"BUGATTI DIVO",width:16.7,height:3.8},{name:"BUGGY ALPHA 24V",width:16,height:4.7},{name:"BUGGY POLTIE/ZWART",width:13.9,height:9},{name:"Camo Buggy Groot",width:14.2,height:3.6},{name:"CAN-AM Maverick",width:14,height:2.5},{name:"CHINO tractor",width:11.5,height:2.5},{name:"DODGE POLITIE",width:11,height:4.5},{name:"Driftkart",width:8,height:2.9},{name:"Ducati crossmotor",width:14.3,height:5.9},{name:"FIAT 500C loopauto",width:9,height:2.5},{name:"FORD LOOPAUTO",width:10,height:2.6},{name:"g",width:14.5,height:3.5},{name:"G63 1-pers XL 24V",width:15.1,height:3.5},{name:"G63 2-persoon CHROOM",width:16.8,height:3.6},{name:"G63 XXL 2-p",width:20.8,height:4.2},{name:"GLADIATOR jeep",width:12.3,height:3.7},{name:"Heftruck",width:17.5,height:3.5},{name:"High SPEED BUGGY",width:22,height:5.2},{name:"Jaguar SVR",width:14.2,height:3},{name:"John Deere Ground Loader",width:12,height:3},{name:"Kleine G650 Nieuw mini",width:13.8,height:3},{name:"KLEINE Maybach G650",width:15.1,height:2.6},{name:"LAMBO Aventador 2-persoons",width:15.2,height:3.9},{name:"Lamborghin Aventador",width:12.5,height:3},{name:"LAMBORGHINI GT",width:8,height:1.8},{name:"LAMBORGHINI HURACAN",width:12,height:3},{name:"Lamborghini Huracan 2-persoons",width:15.2,height:3.1},{name:"Lamborghini Sian",width:9.8,height:2.7},{name:"LAMBORGHINI STO",width:14.5,height:2.6},{name:"Lamborghini SV",width:12.5,height:3},{name:"Lamborghini Urus",width:20.2,height:3.2,rearWidth:15.4,rearHeight:3.6},{name:"Lamborghini Urus KLEIN",width:9.4,height:2.6,rearWidth:12,rearHeight:2.9},{name:"LAMBORGHINI VENENO",width:15,height:2.5},{name:"LOOPAUTO C63",width:6.6,height:1.6},{name:"MACLAREN",width:15.1,height:3.9},{name:"Maseratti",width:13.7,height:2.6},{name:"MCLAREN QUAD",width:10,height:2.5},{name:"Mercedes 300S",width:14,height:4.4},{name:"Mercedes 300s loopauto",width:11,height:2.8},{name:"Mercedes 6x6 klein",width:12,height:2.2},{name:"Mercedes Actros",width:10.8,height:2.3,rearWidth:20,rearHeight:4},{name:"Mercedes C63s",width:13.8,height:2.9},{name:"Mercedes G63 24V 1 Persoons",width:15.3,height:3.5},{name:"Mercedes G63 6X6",width:15.8,height:3.8},{name:"Mercedes G63 6x6 2-Persoons",width:18.7,height:3.8},{name:"Mercedes G63 KLEIN",width:13.3,height:3.2},{name:"Mercedes G650 Maybach BIG",width:23.2,height:4.3},{name:"MERCEDES GLC 2-zits",width:19,height:4.2},{name:"Mercedes GLC63",width:15.6,height:3.2},{name:"Mercedes GTR",width:13.1,height:2.7,rearWidth:13.3,rearHeight:2.9},{name:"Mercedes Loopauto",width:7.35,height:1.65,rearWidth:9.6,rearHeight:1.5},{name:"Mercedes M-CLASS",width:15.6,height:3.2},{name:"Mercedes S klasse",width:16,height:3.35},{name:"Mercedes Unimog",width:15,height:3.5},{name:"Miniquad 6V",width:10,height:3},{name:"Monster truck",width:15,height:3},{name:"NEW HOLLAND TRACTOR",width:16.5,height:4.5,rearWidth:9.5,rearHeight:4.5},{name:"Politie Dodge Charger SRT",width:9.9,height:4.2},{name:"QUAD 1000W",width:8.2,height:2.8},{name:"QUAD 800W ACHTER",width:8.5,height:3.2},{name:"RANGE ROVER 2-PERSOONS",width:17.8,height:5},{name:"Range Rover EVOQUE",width:14.1,height:3.1},{name:"Range Rover Velar",width:15.3,height:3.4},{name:"SIAN 2-P",width:13.4,height:3.4},{name:"Super truck",width:13.7,height:3.5},{name:"TOYOTA HILUX",width:14.8,height:4.1},{name:"Tractor Loopauto",width:9.5,height:2},{name:"TRIKE",width:12,height:7},{name:"UTV",width:14.5,height:3,rearWidth:10,rearHeight:3},{name:"UTV BUGGY",width:13.8,height:3.5,rearWidth:21.5,rearHeight:3.5},{name:"Vespa",width:10.5,height:3},{name:"VOLVO S90",width:17,height:3.9},{name:"WILLY 1-PERSOON",width:15,height:3.5},{name:"Willy's jeep",width:20,height:4}],zd=e=>Array.isArray(e)&&e.length?e:$g,bn=async()=>{try{const e=await fetch("/api/cars");if(!e.ok)throw new Error("Failed to load cars");const t=await e.json();return zd(t)}catch{return zd($g)}},cS=async e=>{const t=await fetch("/api/cars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to add car");return t.json()},fS=async(e,t)=>{const n=await fetch(`/api/cars/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error("Failed to update car");return n.json()},dS=async e=>{const t=await fetch(`/api/cars/${e}`,{method:"DELETE"});if(!t.ok)throw new Error("Failed to delete car");return t.json()},hS=async e=>{const t=await fetch("/api/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});return t.ok?(await t.json()).authenticated:!1},Yg=96;function pS(e,t=Yg){return e/25.4*t}function it(e,t=Yg){return pS(e*10,t)}function mS(){const[e,t]=C.useState([]),[n,r]=C.useState([]),[i,o]=C.useState([]),[s,a]=C.useState(!1),l=C.useRef([]),u=C.useRef([]),c=C.useRef([]),f=C.useRef([]),d=yr(),g=[{code:"NL",label:"Nederland",flag:Od,alt:"Nederlandse vlag"},{code:"BE",label:"België",flag:Fd,alt:"Belgische vlag"},{code:"DE",label:"Duitsland",flag:_d,alt:"Duitse vlag"}];C.useEffect(()=>{bn().then(S=>{var x;const K=[...S].sort((B,L)=>B.name.localeCompare(L.name));t(K),r([{carName:((x=K[0])==null?void 0:x.name)||"",front:"AB-123-CD",rear:"AB-123-CD",country:"NL"}]),o([{front:"",rear:""}])})},[]),C.useEffect(()=>{document.fonts.load("bold 50px KentekenFont").then(()=>a(!0))},[]);const v=document.createElement("canvas").getContext("2d"),I=(S,K,x)=>(v.font=`${x} ${K}px KentekenFont, monospace`,v.measureText(S).width),p=(S,K,x,B)=>{let L=K;const z=S.replace(/ /g," ");for(;I(z,L,B)>x&&L>1;)L-=1;return L},h=async(S,K=null)=>{if(!S)return"";if(await document.fonts.ready,K)try{await document.fonts.load(`${K.fontWeight} ${K.fontSize}px KentekenFont`)}catch{}const x=S.cloneNode(!0),B=x.querySelectorAll("image");await Promise.all(Array.from(B).map(async D=>{const R=D.getAttribute("href"),V=await(await fetch(R)).blob(),Fe=await new Promise(de=>{const _=new FileReader;_.onloadend=()=>de(_.result),_.readAsDataURL(V)});D.setAttribute("href",Fe)}));const z=await(await fetch(uS)).blob(),b=await new Promise(D=>{const R=new FileReader;R.onloadend=()=>D(R.result),R.readAsDataURL(z)}),le=document.createElement("style");le.textContent=`@font-face { font-family: 'KentekenFont'; src: url(${b}) format('truetype'); }`,x.insertBefore(le,x.firstChild);const Ke=new XMLSerializer().serializeToString(x),M=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Ke)))}`;return await new Promise(D=>{const R=new Image;R.onload=()=>{const F=document.createElement("canvas");F.width=R.width,F.height=R.height;const V=F.getContext("2d");if(V.drawImage(R,0,0),K){const Fe=K.renderWidth||R.width,de=K.renderHeight||R.height,_=Fe/K.baseWidth,G=de/K.baseHeight,$=Math.min(_,G),sn=(Fe-K.baseWidth*$)/2,$e=(de-K.baseHeight*$)/2,an=K.fontSize*$,Ye=K.x*$+sn,Bt=K.y*$+$e;V.font=`${K.fontWeight} ${an}px KentekenFont, monospace`,V.fillStyle=K.textColor,V.textAlign=K.textAnchor==="middle"?"center":"left",V.textBaseline="middle",K.dropShadow.stdDeviation>0&&(V.shadowOffsetX=K.dropShadow.dx*$,V.shadowOffsetY=K.dropShadow.dy*$,V.shadowBlur=K.dropShadow.stdDeviation*$,V.shadowColor=K.shadowColor),V.fillText(K.text,Ye,Bt)}D(F.toDataURL("image/png"))},R.src=M})},m=async()=>{const S=[],K=[],x=[];for(let _=0;_Bt.name===n[_].carName)||e[0],$=G.rearWidth&&G.rearHeight,sn=it(G.width),$e=it(G.height),an=$?it(G.rearWidth):sn,Ye=$?it(G.rearHeight):$e;S.push(await h(l.current[_],c.current[_])),K.push(await h(u.current[_],f.current[_])),x.push({frontWidth:sn,frontHeight:$e,rearWidth:an,rearHeight:Ye})}const B=it(21),L=it(29.7),z=it(1.5),b=15,le=Math.max(...x.map(_=>Math.max(_.frontWidth,_.rearWidth))),Ke=x.reduce((_,G)=>_+G.frontHeight+G.rearHeight,0),W=x.length*2,M=Math.min(1,(B-z)/le,(L-b*(W-1))/Ke),D=document.createElement("canvas");D.width=B,D.height=L;const R=D.getContext("2d"),F=_=>new Promise(G=>{const $=new Image;$.onload=()=>G($),$.src=_});let V=0;for(let _=0;_{const S=[];for(let K=0;KM.name===n[K].carName)||e[0],B=x.rearWidth&&x.rearHeight,L=x.width*10,z=x.height*10,b=B?x.rearWidth*10:L,le=B?x.rearHeight*10:z,Ke=await h(l.current[K],c.current[K]),W=await h(u.current[K],f.current[K]);S.push({src:Ke,width:L,height:z}),S.push({src:W,width:b,height:le})}d("/print",{state:{items:S}})};C.useEffect(()=>{if(!s)return;(async()=>{const K=[];for(let x=0;x{r(S=>{var K;return[...S,{carName:((K=e[0])==null?void 0:K.name)||"",front:"AB-123-CD",rear:"AB-123-CD",country:"NL"}]}),o(S=>[...S,{front:"",rear:""}])},T=(S,K,x)=>{r(B=>{const L=[...B];return L[S]={...L[S],[K]:x},L})},k=S=>{r(K=>K.filter((x,B)=>B!==S)),o(K=>K.filter((x,B)=>B!==S)),l.current.splice(S,1),u.current.splice(S,1)};return A.jsxs(ms,{children:[A.jsx(Zu,{count:e.length,onRestart:()=>window.location.reload(),onHome:()=>d("/")}),A.jsx("div",{className:"container dashboard",children:A.jsxs("div",{className:"card",children:[n.map((S,K)=>{const x=e.find(re=>re.name===S.carName)||e[0],B=x.rearWidth&&x.rearHeight,L=it(x.width),z=it(x.height),b=B?it(x.rearWidth):L,le=B?it(x.rearHeight):z,Ke=S.country,W={NL:{baseWidth:624,baseHeight:139,plateImage:sS,flag:Od,euWidthRatio:.096,fontWeight:"bold",textColor:"#000",shadowColor:"#ffeb3b",dropShadow:{dx:3,dy:3,stdDeviation:1},hasBottomBar:!0,allowsCentering:!0},BE:{baseWidth:1848,baseHeight:382,plateImage:aS,flag:Fd,euWidthRatio:.098,fontWeight:"normal",textColor:"#a51f1f",shadowColor:"#a51f1f",dropShadow:{dx:.5,dy:.5,stdDeviation:.2},hasBottomBar:!1,allowsCentering:!0},DE:{baseWidth:1668,baseHeight:360,plateImage:lS,flag:_d,euWidthRatio:.11,fontWeight:"bold",textColor:"#000",shadowColor:"transparent",dropShadow:{dx:0,dy:0,stdDeviation:0},hasBottomBar:!1,allowsCentering:!0}},M=W[Ke]||W.NL,{baseWidth:D,baseHeight:R,plateImage:F,euWidthRatio:V,fontWeight:Fe,textColor:de,shadowColor:_,dropShadow:G,hasBottomBar:$,allowsCentering:sn}=M,$e=D*V,an=R*.56,Ye=$?R*.1:0,Bt=Ye*.9,gs=Bt*(1481/240),qu=(D-gs)/2,ec=R-Ye+(Ye-Bt)/2,ys=D-$e-20,Mn=Fe,tc=($?(R-Ye)/2:R/2)+an*.13,nc=ys,rc=p(S.front,an,ys,Mn),ic=p(S.rear,an,ys,Mn),Qg=I(S.front.replace(/ /g," "),rc,Mn),Xg=I(S.rear.replace(/ /g," "),ic,Mn),oc=sn&&Qg<=nc,sc=sn&&Xg<=nc,bg=oc?"middle":"start",Jg=sc?"middle":"start",Zg=oc?$e+(D-$e)/2:$e+10,qg=sc?$e+(D-$e)/2:$e+10,ac=$?.1:0;return c.current[K]={text:S.front.replace(/ /g," "),x:Zg,y:tc,textAnchor:bg,fontSize:rc,fontWeight:Mn,textColor:de,shadowColor:_,dropShadow:G,baseWidth:D,baseHeight:R,renderWidth:L,renderHeight:z,bottomBarRatio:ac},f.current[K]={text:S.rear.replace(/ /g," "),x:qg,y:tc,textAnchor:Jg,fontSize:ic,fontWeight:Mn,textColor:de,shadowColor:_,dropShadow:G,baseWidth:D,baseHeight:R,renderWidth:b,renderHeight:le,bottomBarRatio:ac},A.jsxs("div",{className:"plate-block",children:[A.jsxs("div",{className:"flex-1",children:[A.jsx("div",{className:"flag-selector mb",role:"group","aria-label":"Kies land voor kenteken",children:g.map(re=>A.jsxs("button",{type:"button",onClick:()=>T(K,"country",re.code),className:`flag-option ${Ke===re.code?"selected":""}`,children:[A.jsx("img",{src:re.flag,alt:re.alt}),A.jsx("span",{children:re.label})]},re.code))}),A.jsxs("div",{className:"form-row mb",children:[A.jsx("label",{htmlFor:`car-${K}`,children:"Kinderauto:"}),A.jsx("select",{id:`car-${K}`,value:S.carName,onChange:re=>T(K,"carName",re.target.value),children:e.map(re=>A.jsx("option",{value:re.name,children:re.name},re.name))})]}),A.jsxs("div",{className:"form-row mb",children:[A.jsx("label",{htmlFor:`front-${K}`,children:`Kenteken voor ${K+1}:`}),A.jsx("input",{id:`front-${K}`,value:S.front,onChange:re=>T(K,"front",re.target.value.toUpperCase()),"aria-label":`Plate text front ${K+1}`,className:"font-[KentekenFont] uppercase"})]}),A.jsxs("div",{className:"form-row mb",children:[A.jsx("label",{htmlFor:`rear-${K}`,children:`Kenteken achter ${K+1}:`}),A.jsx("input",{id:`rear-${K}`,value:S.rear,onChange:re=>T(K,"rear",re.target.value.toUpperCase()),"aria-label":`Plate text rear ${K+1}`,className:"font-[KentekenFont] uppercase"})]}),n.length>1&&A.jsx(Le,{type:"button",onClick:()=>k(K),variant:"ghost",className:"mt",children:"Verwijder kenteken"})]}),A.jsxs("div",{className:"flex-1 flex flex-col items-center",children:[A.jsxs("svg",{ref:re=>l.current[K]=re,width:L,height:z,className:"hidden",viewBox:`0 0 ${D} ${R}`,children:[A.jsx("image",{href:F,width:D,height:R}),Ke==="NL"&&A.jsxs(A.Fragment,{children:[A.jsx("rect",{x:"0",y:R-Ye,width:D,height:Ye,fill:"#000"}),A.jsx("image",{href:wl,x:qu,y:ec,width:gs,height:Bt})]})]}),i[K]&&i[K].front&&A.jsx(ut.img,{src:i[K].front,alt:`Kenteken voor ${K+1}`,className:"plate-preview",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.25}}),A.jsxs("svg",{ref:re=>u.current[K]=re,width:b,height:le,className:"hidden",viewBox:`0 0 ${D} ${R}`,children:[A.jsx("image",{href:F,width:D,height:R}),Ke==="NL"&&A.jsxs(A.Fragment,{children:[A.jsx("rect",{x:"0",y:R-Ye,width:D,height:Ye,fill:"#000"}),A.jsx("image",{href:wl,x:qu,y:ec,width:gs,height:Bt})]})]}),i[K]&&i[K].rear&&A.jsx(ut.img,{src:i[K].rear,alt:`Kenteken achter ${K+1}`,className:"plate-preview",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.25}})]})]},K)}),A.jsx(Le,{type:"button",onClick:E,variant:"primary",className:"mt",children:"Nog een kenteken"}),A.jsxs("div",{className:"button-row",children:[A.jsx(Le,{type:"button",onClick:m,variant:"ghost",children:"Download kentekens"}),A.jsx(Le,{type:"button",onClick:w,variant:"ghost",children:"Print kentekens"})]})]})})]})}function qi({title:e,subtitle:t,children:n}){return A.jsxs("div",{className:"card space-y-2",children:[e&&A.jsx("h2",{className:"text-lg font-semibold",children:e}),t&&A.jsx("p",{className:"subtle",children:t}),n]})}function gS(){const e=yr(),[t,n]=C.useState([]),[r,i]=C.useState({name:"",width:"",height:"",hasRear:!1,rearWidth:"",rearHeight:""}),[o,s]=C.useState(""),[a,l]=C.useState({name:"",width:"",height:"",hasRear:!1,rearWidth:"",rearHeight:""}),[u,c]=C.useState(""),[f,d]=C.useState(""),[g,y]=C.useState(!1),[v,I]=C.useState(""),[p,h]=C.useState(!1),m=x=>{var L,z;const B=[...x].sort((b,le)=>b.name.localeCompare(le.name));n(B),s(((L=B[0])==null?void 0:L.name)||""),c(((z=B[0])==null?void 0:z.name)||"")};C.useEffect(()=>{bn().then(x=>{m(x)})},[]),C.useEffect(()=>{const x=t.find(B=>B.name===o);x&&l({name:x.name,width:String(x.width),height:String(x.height),hasRear:!!(x.rearWidth&&x.rearHeight),rearWidth:x.rearWidth?String(x.rearWidth):"",rearHeight:x.rearHeight?String(x.rearHeight):""})},[o,t]),C.useEffect(()=>{c(x=>{var B;return t.find(L=>L.name===x)?x:((B=t[0])==null?void 0:B.name)||""})},[t]),C.useEffect(()=>{if(p){const x=setTimeout(()=>h(!1),2e3);return()=>clearTimeout(x)}},[p]);const w=x=>{const{name:B,value:L,type:z,checked:b}=x.target;i(le=>({...le,[B]:z==="checkbox"?b:L}))},E=x=>{const{name:B,value:L,type:z,checked:b}=x.target;l(le=>({...le,[B]:z==="checkbox"?b:L}))},T=async x=>{x.preventDefault();const B={name:r.name,width:parseFloat(r.width),height:parseFloat(r.height)};r.hasRear&&(B.rearWidth=parseFloat(r.rearWidth),B.rearHeight=parseFloat(r.rearHeight)),await cS(B);const L=await bn();m(L),i({name:"",width:"",height:"",hasRear:!1,rearWidth:"",rearHeight:""}),h(!0)},k=async x=>{x.preventDefault();const B=t.find(b=>b.name===o);if(!B)return;const L={name:a.name,width:parseFloat(a.width),height:parseFloat(a.height)};a.hasRear&&(L.rearWidth=parseFloat(a.rearWidth),L.rearHeight=parseFloat(a.rearHeight)),await fS(B.id,L);const z=await bn();m(z),s(L.name),h(!0)},S=async x=>{x.preventDefault();const B=t.find(z=>z.name===u);if(!B)return;await dS(B.id);const L=await bn();m(L),h(!0)},K=async x=>{x.preventDefault(),await hS(f)?(y(!0),d(""),I("")):I("Onjuist wachtwoord")};return A.jsxs(ms,{children:[A.jsx(Zu,{count:t.length,title:"Kinderauto's beheren",onHome:()=>e("/")}),g?A.jsx("div",{className:"container mt-6",children:A.jsxs("aside",{className:"side-cards",children:[A.jsx(qi,{title:"Kinderauto toevoegen",children:A.jsxs("form",{onSubmit:T,className:"mb-lg",children:[A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"addName",children:"Naam:"}),A.jsx("input",{id:"addName",name:"name",value:r.name,onChange:w,required:!0})]}),A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"addWidth",children:"Breedte (cm):"}),A.jsx("input",{id:"addWidth",type:"number",step:"0.1",min:"0",name:"width",value:r.width,onChange:w,required:!0})]}),A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"addHeight",children:"Hoogte (cm):"}),A.jsx("input",{id:"addHeight",type:"number",step:"0.1",min:"0",name:"height",value:r.height,onChange:w,required:!0})]}),A.jsx("div",{className:"form-row checkbox",children:A.jsxs("label",{children:[A.jsx("input",{type:"checkbox",name:"hasRear",checked:r.hasRear,onChange:w}),"Achter heeft andere maat"]})}),r.hasRear&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"addRearWidth",children:"Breedte achter (cm):"}),A.jsx("input",{id:"addRearWidth",type:"number",step:"0.1",min:"0",name:"rearWidth",value:r.rearWidth,onChange:w,required:!0})]}),A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"addRearHeight",children:"Hoogte achter (cm):"}),A.jsx("input",{id:"addRearHeight",type:"number",step:"0.1",min:"0",name:"rearHeight",value:r.rearHeight,onChange:w,required:!0})]})]}),A.jsx(Le,{type:"submit",variant:"primary",className:"mt",children:"Opslaan"})]})}),A.jsx(qi,{title:"Kinderauto bewerken",children:A.jsxs("form",{onSubmit:k,className:"mb-lg",children:[A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"editSelect",children:"Selecteer:"}),A.jsx("select",{id:"editSelect",value:o,onChange:x=>s(x.target.value),children:t.map(x=>A.jsx("option",{value:x.name,children:x.name},x.name))})]}),A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"editName",children:"Naam:"}),A.jsx("input",{id:"editName",name:"name",value:a.name,onChange:E,required:!0})]}),A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"editWidth",children:"Breedte (cm):"}),A.jsx("input",{id:"editWidth",type:"number",step:"0.1",min:"0",name:"width",value:a.width,onChange:E,required:!0})]}),A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"editHeight",children:"Hoogte (cm):"}),A.jsx("input",{id:"editHeight",type:"number",step:"0.1",min:"0",name:"height",value:a.height,onChange:E,required:!0})]}),A.jsx("div",{className:"form-row checkbox",children:A.jsxs("label",{children:[A.jsx("input",{type:"checkbox",name:"hasRear",checked:a.hasRear,onChange:E}),"Achter heeft andere maat"]})}),a.hasRear&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"editRearWidth",children:"Breedte achter (cm):"}),A.jsx("input",{id:"editRearWidth",type:"number",step:"0.1",min:"0",name:"rearWidth",value:a.rearWidth,onChange:E,required:!0})]}),A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"editRearHeight",children:"Hoogte achter (cm):"}),A.jsx("input",{id:"editRearHeight",type:"number",step:"0.1",min:"0",name:"rearHeight",value:a.rearHeight,onChange:E,required:!0})]})]}),A.jsx(Le,{type:"submit",variant:"primary",className:"mt",children:"Bijwerken"})]})}),A.jsx(qi,{title:"Kinderauto verwijderen",children:A.jsxs("form",{onSubmit:S,className:"mb-lg",children:[A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"deleteSelect",children:"Selecteer:"}),A.jsx("select",{id:"deleteSelect",value:u,onChange:x=>c(x.target.value),children:t.map(x=>A.jsx("option",{value:x.name,children:x.name},x.name))})]}),A.jsx(Le,{type:"submit",variant:"ghost",className:"mt",children:"Verwijder"})]})})]})}):A.jsx("div",{className:"container mt-6",children:A.jsx(qi,{title:"Toegang vereist",children:A.jsxs("form",{onSubmit:K,className:"mb-lg",children:[A.jsxs("div",{className:"form-row",children:[A.jsx("label",{htmlFor:"managerPassword",children:"Wachtwoord:"}),A.jsx("input",{id:"managerPassword",type:"password",value:f,onChange:x=>d(x.target.value),required:!0})]}),v&&A.jsx("p",{className:"text-sm text-red-500",children:v}),A.jsx(Le,{type:"submit",variant:"primary",className:"mt",children:"Inloggen"})]})})}),p&&A.jsx("div",{className:"toast",children:"Opgeslagen"})]})}const yS="/assets/CarKiddologo-BJqJBuzL.png";function AS(){const e=yr(),[t,n]=C.useState(0),r=ps();return C.useEffect(()=>{bn().then(i=>n(i.length))},[]),A.jsxs(ms,{children:[A.jsx("div",{className:"hero-bg"}),A.jsx(Zu,{count:t}),A.jsx("div",{className:"start-container",children:A.jsxs("div",{className:"start-card",children:[A.jsx(ut.img,{src:yS,alt:"CarKiddo",className:"w-20 h-20 sm:w-24 sm:h-24 mx-auto rounded-2xl",initial:r?!1:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.4,type:"spring",stiffness:200}}),A.jsx(ut.h1,{className:"text-2xl sm:text-3xl font-bold tracking-tight",initial:r?!1:{y:10,opacity:0},animate:{y:0,opacity:1},transition:{delay:.1,duration:.3},children:"Kenteken Generator"}),A.jsxs(ut.p,{className:"subtle text-sm sm:text-base -mt-1",initial:r?!1:{y:10,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.3},children:["Genereer kentekens voor ",t," kinderauto's"]}),A.jsxs(ut.div,{className:"flex flex-col gap-3 mt-2",initial:r?!1:{y:10,opacity:0},animate:{y:0,opacity:1},transition:{delay:.3,duration:.3},children:[A.jsx(Le,{onClick:()=>e("/generate"),variant:"primary",children:"Kentekens genereren"}),A.jsx(Le,{onClick:()=>e("/manage"),variant:"ghost",children:"Kinderauto's beheren"})]})]})})]})}function vS(){const{state:e}=Ti(),t=(e==null?void 0:e.items)||[],n=yr(),r=t.reduce((o,s)=>Math.max(o,s.width),0)||100,i=()=>{const o=document.title;document.title=" ",window.print(),document.title=o};return A.jsx(ms,{children:A.jsxs("div",{className:"container py-4",children:[A.jsxs("div",{className:"no-print mb-4 flex gap-2",children:[A.jsx(Le,{variant:"ghost",onClick:()=>n("/generate"),children:"Terug"}),A.jsx(Le,{variant:"primary",onClick:i,children:"Print"})]}),A.jsx("div",{className:"a4-preview",children:A.jsx("div",{className:"print-grid",style:{"--plate-width":`${r}mm`},children:t.map((o,s)=>A.jsx("img",{src:o.src,alt:`plate-${s}`,className:"plate",style:{width:`${o.width}mm`,height:`${o.height}mm`}},s))})})]})})}function CS(){const e=Ti();return A.jsx(S1,{mode:"wait",children:A.jsxs(v0,{location:e,children:[A.jsx(Rn,{path:"/",element:A.jsx(AS,{})}),A.jsx(Rn,{path:"/generate",element:A.jsx(mS,{})}),A.jsx(Rn,{path:"/manage",element:A.jsx(gS,{})}),A.jsx(Rn,{path:"/print",element:A.jsx(vS,{})}),A.jsx(Rn,{path:"*",element:A.jsx(y0,{to:"/",replace:!0})})]},e.pathname)})}function wS(){return A.jsx(x0,{children:A.jsx(CS,{})})}sa.createRoot(document.getElementById("root")).render(A.jsx(Zd.StrictMode,{children:A.jsx(wS,{})}));