diff --git a/assets/index-DIeOKdya.js b/assets/index-DGFq2vLC.js similarity index 66% rename from assets/index-DIeOKdya.js rename to assets/index-DGFq2vLC.js index ca3c455..2b35bb9 100644 --- a/assets/index-DIeOKdya.js +++ b/assets/index-DGFq2vLC.js @@ -6,7 +6,7 @@ function Nm(e,t){for(var r=0;r>>1,ae=C[X];if(0>>1;Xi(Pa,I))tri(xi,Pa)?(C[X]=xi,C[tr]=I,X=tr):(C[X]=Pa,C[er]=I,X=er);else if(tri(xi,I))C[X]=xi,C[tr]=I,X=tr;else break e}}return F}function i(C,F){var I=C.sortIndex-F.sortIndex;return I!==0?I:C.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],f=1,c=null,d=3,g=!1,m=!1,y=!1,_=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 v(C){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=C)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function w(C){if(y=!1,v(C),!m)if(r(l)!==null)m=!0,$a(x);else{var F=r(u);F!==null&&Ca(w,F.startTime-C)}}function x(C,F){m=!1,y&&(y=!1,p(R),R=-1),g=!0;var I=d;try{for(v(F),c=r(l);c!==null&&(!(c.expirationTime>F)||C&&!We());){var X=c.callback;if(typeof X=="function"){c.callback=null,d=c.priorityLevel;var ae=X(c.expirationTime<=F);F=e.unstable_now(),typeof ae=="function"?c.callback=ae:c===r(l)&&n(l),v(F)}else n(l);c=r(l)}if(c!==null)var Ei=!0;else{var er=r(u);er!==null&&Ca(w,er.startTime-F),Ei=!1}return Ei}finally{c=null,d=I,g=!1}}var T=!1,A=null,R=-1,Q=5,b=-1;function We(){return!(e.unstable_now()-bC||125X?(C.sortIndex=I,t(u,C),r(l)===null&&C===r(u)&&(y?(p(R),R=-1):y=!0,Ca(w,I-X))):(C.sortIndex=ae,t(l,C),m||g||(m=!0,$a(x))),C},e.unstable_shouldYield=We,e.unstable_wrapCallback=function(C){var F=d;return function(){var I=d;d=F;try{return C.apply(this,arguments)}finally{d=I}}}})(Yd);Gd.exports=Yd;var eg=Gd.exports;/** + */(function(e){function t(P,F){var I=P.length;P.push(F);e:for(;0>>1,ae=P[X];if(0>>1;Xi(Pa,I))tri(Ei,Pa)?(P[X]=Ei,P[tr]=I,X=tr):(P[X]=Pa,P[er]=I,X=er);else if(tri(Ei,I))P[X]=Ei,P[tr]=I,X=tr;else break e}}return F}function i(P,F){var I=P.sortIndex-F.sortIndex;return I!==0?I:P.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],f=1,c=null,d=3,g=!1,m=!1,y=!1,_=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 v(P){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=P)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function w(P){if(y=!1,v(P),!m)if(r(l)!==null)m=!0,$a(E);else{var F=r(u);F!==null&&Ca(w,F.startTime-P)}}function E(P,F){m=!1,y&&(y=!1,p(R),R=-1),g=!0;var I=d;try{for(v(F),c=r(l);c!==null&&(!(c.expirationTime>F)||P&&!We());){var X=c.callback;if(typeof X=="function"){c.callback=null,d=c.priorityLevel;var ae=X(c.expirationTime<=F);F=e.unstable_now(),typeof ae=="function"?c.callback=ae:c===r(l)&&n(l),v(F)}else n(l);c=r(l)}if(c!==null)var xi=!0;else{var er=r(u);er!==null&&Ca(w,er.startTime-F),xi=!1}return xi}finally{c=null,d=I,g=!1}}var T=!1,A=null,R=-1,Q=5,b=-1;function We(){return!(e.unstable_now()-bP||125X?(P.sortIndex=I,t(u,P),r(l)===null&&P===r(u)&&(y?(p(R),R=-1):y=!0,Ca(w,I-X))):(P.sortIndex=ae,t(l,P),m||g||(m=!0,$a(E))),P},e.unstable_shouldYield=We,e.unstable_wrapCallback=function(P){var F=d;return function(){var I=d;d=F;try{return P.apply(this,arguments)}finally{d=I}}}})(Yd);Gd.exports=Yd;var eg=Gd.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function Nm(e,t){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),So=Object.prototype.hasOwnProperty,rg=/^[: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]*$/,rc={},nc={};function ng(e){return So.call(nc,e)?!0:So.call(rc,e)?!1:rg.test(e)?nc[e]=!0:(rc[e]=!0,!1)}function ig(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sg(e,t,r,n){if(t===null||typeof t>"u"||ig(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Se(e,t,r,n,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new Se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new Se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new Se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new Se(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){de[e]=new Se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new Se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new Se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new Se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new Se(e,5,!1,e.toLowerCase(),null,!1,!1)});var bl=/[\-:]([a-z])/g;function Ml(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(bl,Ml);de[t]=new Se(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(bl,Ml);de[t]=new Se(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(bl,Ml);de[t]=new Se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new Se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!0,!0)});function jl(e,t,r,n){var i=de.hasOwnProperty(t)?de[t]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),So=Object.prototype.hasOwnProperty,rg=/^[: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]*$/,rc={},nc={};function ng(e){return So.call(nc,e)?!0:So.call(rc,e)?!1:rg.test(e)?nc[e]=!0:(rc[e]=!0,!1)}function ig(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sg(e,t,r,n){if(t===null||typeof t>"u"||ig(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Se(e,t,r,n,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new Se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new Se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new Se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new Se(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){de[e]=new Se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new Se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new Se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new Se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new Se(e,5,!1,e.toLowerCase(),null,!1,!1)});var bl=/[\-:]([a-z])/g;function Ml(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(bl,Ml);de[t]=new Se(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(bl,Ml);de[t]=new Se(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(bl,Ml);de[t]=new Se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new Se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!0,!0)});function jl(e,t,r,n){var i=de.hasOwnProperty(t)?de[t]:null;(i!==null?i.type!==0:n||!(2o||i[a]!==s[o]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{Ra=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?xn(e):""}function ag(e){switch(e.tag){case 5:return xn(e.type);case 16:return xn("Lazy");case 13:return xn("Suspense");case 19:return xn("SuspenseList");case 0:case 2:case 15:return e=Oa(e.type,!1),e;case 11:return e=Oa(e.type.render,!1),e;case 1:return e=Oa(e.type,!0),e;default:return""}}function Co(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 Tr:return"Fragment";case Pr:return"Portal";case Eo:return"Profiler";case zl:return"StrictMode";case xo:return"Suspense";case $o:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zd:return(e.displayName||"Context")+".Consumer";case Xd:return(e._context.displayName||"Context")+".Provider";case Ll: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:Co(e.type)||"Memo";case Pt:t=e._payload,e=e._init;try{return Co(e(t))}catch{}}return null}function og(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 Co(t);case 8:return t===zl?"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 qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lg(e){var t=eh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pi(e){e._valueTracker||(e._valueTracker=lg(e))}function th(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=eh(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ts(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 Po(e,t){var r=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function sc(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=qt(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function rh(e,t){t=t.checked,t!=null&&jl(e,"checked",t,!1)}function To(e,t){rh(e,t);var r=qt(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ao(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ao(e,t.type,qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ac(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ao(e,t,r){(t!=="number"||ts(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var $n=Array.isArray;function Lr(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ti.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Rn={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},ug=["Webkit","ms","Moz","O"];Object.keys(Rn).forEach(function(e){ug.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rn[t]=Rn[e]})});function ah(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Rn.hasOwnProperty(e)&&Rn[e]?(""+t).trim():t+"px"}function oh(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=ah(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var cg=G({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 No(e,t){if(t){if(cg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function Fo(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 Io=null;function Ul(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ko=null,Dr=null,Ur=null;function uc(e){if(e=ui(e)){if(typeof ko!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Ks(t),ko(e.stateNode,e.type,t))}}function lh(e){Dr?Ur?Ur.push(e):Ur=[e]:Dr=e}function uh(){if(Dr){var e=Dr,t=Ur;if(Ur=Dr=null,uc(e),t)for(e=0;e>>=0,e===0?32:31-(Sg(e)/Eg|0)|0}var Ai=64,Ri=4194304;function Cn(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 ss(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~i;o!==0?n=Cn(o):(s&=a,s!==0&&(n=Cn(s)))}else a=r&~i,a!==0?n=Cn(a):s!==0&&(n=Cn(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function oi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=r}function Pg(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=Nn),yc=" ",wc=!1;function Rh(e,t){switch(e){case"keyup":return ey.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ar=!1;function ry(e,t){switch(e){case"compositionend":return Oh(t);case"keypress":return t.which!==32?null:(wc=!0,yc);case"textInput":return e=t.data,e===yc&&wc?null:e;default:return null}}function ny(e,t){if(Ar)return e==="compositionend"||!Yl&&Rh(e,t)?(e=Th(),qi=Vl=Ft=null,Ar=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=xc(r)}}function kh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bh(){for(var e=window,t=ts();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ts(e.document)}return t}function Ql(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 dy(e){var t=bh(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&kh(r.ownerDocument.documentElement,r)){if(n!==null&&Ql(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=$c(r,s);var a=$c(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Rr=null,Do=null,In=null,Uo=!1;function Cc(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Uo||Rr==null||Rr!==ts(n)||(n=Rr,"selectionStart"in n&&Ql(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),In&&Gn(In,n)||(In=n,n=ls(Do,"onSelect"),0Fr||(e.current=Wo[Fr],Wo[Fr]=null,Fr--)}function U(e,t){Fr++,Wo[Fr]=e.current,e.current=t}var Vt={},ge=Yt(Vt),Pe=Yt(!1),fr=Vt;function Vr(e,t){var r=e.type.contextTypes;if(!r)return Vt;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function cs(){K(Pe),K(ge)}function Fc(e,t,r){if(ge.current!==Vt)throw Error(S(168));U(ge,t),U(Pe,r)}function Kh(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(S(108,og(e)||"Unknown",i));return G({},r,n)}function fs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vt,fr=ge.current,U(ge,e),U(Pe,Pe.current),!0}function Ic(e,t,r){var n=e.stateNode;if(!n)throw Error(S(169));r?(e=Kh(e,t,fr),n.__reactInternalMemoizedMergedChildContext=e,K(Pe),K(ge),U(ge,e)):K(Pe),U(Pe,r)}var ft=null,qs=!1,Ka=!1;function qh(e){ft===null?ft=[e]:ft.push(e)}function $y(e){qs=!0,qh(e)}function Qt(){if(!Ka&&ft!==null){Ka=!0;var e=0,t=z;try{var r=ft;for(z=1;e>=a,i-=a,dt=1<<32-Ze(t)+i|r<R?(Q=A,A=null):Q=A.sibling;var b=d(p,A,v[R],w);if(b===null){A===null&&(A=Q);break}e&&A&&b.alternate===null&&t(p,A),h=s(b,h,R),T===null?x=b:T.sibling=b,T=b,A=Q}if(R===v.length)return r(p,A),q&&nr(p,R),x;if(A===null){for(;RR?(Q=A,A=null):Q=A.sibling;var We=d(p,A,b.value,w);if(We===null){A===null&&(A=Q);break}e&&A&&We.alternate===null&&t(p,A),h=s(We,h,R),T===null?x=We:T.sibling=We,T=We,A=Q}if(b.done)return r(p,A),q&&nr(p,R),x;if(A===null){for(;!b.done;R++,b=v.next())b=c(p,b.value,w),b!==null&&(h=s(b,h,R),T===null?x=b:T.sibling=b,T=b);return q&&nr(p,R),x}for(A=n(p,A);!b.done;R++,b=v.next())b=g(A,p,R,b.value,w),b!==null&&(e&&b.alternate!==null&&A.delete(b.key===null?R:b.key),h=s(b,h,R),T===null?x=b:T.sibling=b,T=b);return e&&A.forEach(function(dn){return t(p,dn)}),q&&nr(p,R),x}function _(p,h,v,w){if(typeof v=="object"&&v!==null&&v.type===Tr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ci:e:{for(var x=v.key,T=h;T!==null;){if(T.key===x){if(x=v.type,x===Tr){if(T.tag===7){r(p,T.sibling),h=i(T,v.props.children),h.return=p,p=h;break e}}else if(T.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Pt&&Mc(x)===T.type){r(p,T.sibling),h=i(T,v.props),h.ref=wn(p,T,v),h.return=p,p=h;break e}r(p,T);break}else t(p,T);T=T.sibling}v.type===Tr?(h=cr(v.props.children,p.mode,w,v.key),h.return=p,p=h):(w=Ji(v.type,v.key,v.props,null,p.mode,w),w.ref=wn(p,h,v),w.return=p,p=w)}return a(p);case Pr:e:{for(T=v.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){r(p,h.sibling),h=i(h,v.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=Za(v,p.mode,w),h.return=p,p=h}return a(p);case Pt:return T=v._init,_(p,h,T(v._payload),w)}if($n(v))return m(p,h,v,w);if(pn(v))return y(p,h,v,w);Mi(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(r(p,h.sibling),h=i(h,v),h.return=p,p=h):(r(p,h),h=Xa(v,p.mode,w),h.return=p,p=h),a(p)):r(p,h)}return _}var Gr=Yh(!0),Qh=Yh(!1),ps=Yt(null),vs=null,br=null,eu=null;function tu(){eu=br=vs=null}function ru(e){var t=ps.current;K(ps),e._currentValue=t}function Qo(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Hr(e,t){vs=e,eu=br=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($e=!0),e.firstContext=null)}function He(e){var t=e._currentValue;if(eu!==e)if(e={context:e,memoizedValue:t,next:null},br===null){if(vs===null)throw Error(S(308));br=e,vs.dependencies={lanes:0,firstContext:e}}else br=br.next=e;return t}var or=null;function nu(e){or===null?or=[e]:or.push(e)}function Xh(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,nu(t)):(r.next=i.next,i.next=r),t.interleaved=r,yt(e,n)}function yt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Tt=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zh(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 pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Dt(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,M&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,yt(e,r)}return i=n.interleaved,i===null?(t.next=t,nu(n)):(t.next=i.next,i.next=t),n.interleaved=t,yt(e,r)}function Wi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hl(e,r)}}function jc(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ms(e,t,r,n){var i=e.updateQueue;Tt=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,u=l.next;l.next=null,a===null?s=u:a.next=u,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;a=0,f=u=l=null,o=s;do{var d=o.lane,g=o.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,y=o;switch(d=t,g=r,y.tag){case 1:if(m=y.payload,typeof m=="function"){c=m.call(g,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,d=typeof m=="function"?m.call(g,c,d):m,d==null)break e;c=G({},c,d);break e;case 2:Tt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[o]:d.push(o))}else g={eventTime:g,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=g,l=c):f=f.next=g,a|=d;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;d=o,o=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);pr|=a,e.lanes=a,e.memoizedState=c}}function zc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Va.transition;Va.transition={};try{e(!1),t()}finally{z=r,Va.transition=n}}function vp(){return Ke().memoizedState}function Ay(e,t,r){var n=Bt(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},mp(e))gp(t,r);else if(r=Xh(e,t,r,n),r!==null){var i=we();Je(r,e,n,i),yp(r,t,n)}}function Ry(e,t,r){var n=Bt(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(mp(e))gp(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,r);if(i.hasEagerState=!0,i.eagerState=o,et(o,a)){var l=t.interleaved;l===null?(i.next=i,nu(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=Xh(e,t,i,n),r!==null&&(i=we(),Je(r,e,n,i),yp(r,t,n))}}function mp(e){var t=e.alternate;return e===W||t!==null&&t===W}function gp(e,t){kn=ys=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function yp(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hl(e,r)}}var ws={readContext:He,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},Oy={readContext:He,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:He,useEffect:Dc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Yi(4194308,4,cp.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yi(4,2,e,t)},useMemo:function(e,t){var r=nt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=nt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Ay.bind(null,W,e),[n.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:Lc,useDebugValue:du,useDeferredValue:function(e){return nt().memoizedState=e},useTransition:function(){var e=Lc(!1),t=e[0];return e=Ty.bind(null,e[1]),nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=W,i=nt();if(q){if(r===void 0)throw Error(S(407));r=r()}else{if(r=t(),le===null)throw Error(S(349));hr&30||rp(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,Dc(ip.bind(null,n,s,e),[e]),n.flags|=2048,ri(9,np.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=nt(),t=le.identifierPrefix;if(q){var r=ht,n=dt;r=(n&~(1<<32-Ze(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ei++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{Ra=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?$n(e):""}function ag(e){switch(e.tag){case 5:return $n(e.type);case 16:return $n("Lazy");case 13:return $n("Suspense");case 19:return $n("SuspenseList");case 0:case 2:case 15:return e=Oa(e.type,!1),e;case 11:return e=Oa(e.type.render,!1),e;case 1:return e=Oa(e.type,!0),e;default:return""}}function Co(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 Ar:return"Fragment";case Tr:return"Portal";case xo:return"Profiler";case zl:return"StrictMode";case Eo:return"Suspense";case $o:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zd:return(e.displayName||"Context")+".Consumer";case Xd:return(e._context.displayName||"Context")+".Provider";case Ll: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:Co(e.type)||"Memo";case Tt:t=e._payload,e=e._init;try{return Co(e(t))}catch{}}return null}function og(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 Co(t);case 8:return t===zl?"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 Vt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lg(e){var t=eh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pi(e){e._valueTracker||(e._valueTracker=lg(e))}function th(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=eh(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ts(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 Po(e,t){var r=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function sc(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Vt(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function rh(e,t){t=t.checked,t!=null&&jl(e,"checked",t,!1)}function To(e,t){rh(e,t);var r=Vt(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ao(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ao(e,t.type,Vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ac(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ao(e,t,r){(t!=="number"||ts(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Cn=Array.isArray;function Dr(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ti.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Rn={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},ug=["Webkit","ms","Moz","O"];Object.keys(Rn).forEach(function(e){ug.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rn[t]=Rn[e]})});function ah(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Rn.hasOwnProperty(e)&&Rn[e]?(""+t).trim():t+"px"}function oh(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=ah(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var cg=G({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 No(e,t){if(t){if(cg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function Fo(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 Io=null;function Ul(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ko=null,Ur=null,Br=null;function uc(e){if(e=ui(e)){if(typeof ko!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Ks(t),ko(e.stateNode,e.type,t))}}function lh(e){Ur?Br?Br.push(e):Br=[e]:Ur=e}function uh(){if(Ur){var e=Ur,t=Br;if(Br=Ur=null,uc(e),t)for(e=0;e>>=0,e===0?32:31-(Sg(e)/xg|0)|0}var Ai=64,Ri=4194304;function Pn(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 ss(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~i;o!==0?n=Pn(o):(s&=a,s!==0&&(n=Pn(s)))}else a=r&~i,a!==0?n=Pn(a):s!==0&&(n=Pn(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function oi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=r}function Pg(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=Nn),yc=" ",wc=!1;function Rh(e,t){switch(e){case"keyup":return ey.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rr=!1;function ry(e,t){switch(e){case"compositionend":return Oh(t);case"keypress":return t.which!==32?null:(wc=!0,yc);case"textInput":return e=t.data,e===yc&&wc?null:e;default:return null}}function ny(e,t){if(Rr)return e==="compositionend"||!Yl&&Rh(e,t)?(e=Th(),qi=Vl=It=null,Rr=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ec(r)}}function kh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bh(){for(var e=window,t=ts();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ts(e.document)}return t}function Ql(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 dy(e){var t=bh(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&kh(r.ownerDocument.documentElement,r)){if(n!==null&&Ql(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=$c(r,s);var a=$c(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Or=null,Do=null,In=null,Uo=!1;function Cc(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Uo||Or==null||Or!==ts(n)||(n=Or,"selectionStart"in n&&Ql(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),In&&Gn(In,n)||(In=n,n=ls(Do,"onSelect"),0Ir||(e.current=Wo[Ir],Wo[Ir]=null,Ir--)}function U(e,t){Ir++,Wo[Ir]=e.current,e.current=t}var Wt={},ge=Qt(Wt),Pe=Qt(!1),fr=Wt;function Wr(e,t){var r=e.type.contextTypes;if(!r)return Wt;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function cs(){K(Pe),K(ge)}function Fc(e,t,r){if(ge.current!==Wt)throw Error(S(168));U(ge,t),U(Pe,r)}function Kh(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(S(108,og(e)||"Unknown",i));return G({},r,n)}function fs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wt,fr=ge.current,U(ge,e),U(Pe,Pe.current),!0}function Ic(e,t,r){var n=e.stateNode;if(!n)throw Error(S(169));r?(e=Kh(e,t,fr),n.__reactInternalMemoizedMergedChildContext=e,K(Pe),K(ge),U(ge,e)):K(Pe),U(Pe,r)}var ft=null,qs=!1,Ka=!1;function qh(e){ft===null?ft=[e]:ft.push(e)}function $y(e){qs=!0,qh(e)}function Xt(){if(!Ka&&ft!==null){Ka=!0;var e=0,t=z;try{var r=ft;for(z=1;e>=a,i-=a,dt=1<<32-Ze(t)+i|r<R?(Q=A,A=null):Q=A.sibling;var b=d(p,A,v[R],w);if(b===null){A===null&&(A=Q);break}e&&A&&b.alternate===null&&t(p,A),h=s(b,h,R),T===null?E=b:T.sibling=b,T=b,A=Q}if(R===v.length)return r(p,A),q&&nr(p,R),E;if(A===null){for(;RR?(Q=A,A=null):Q=A.sibling;var We=d(p,A,b.value,w);if(We===null){A===null&&(A=Q);break}e&&A&&We.alternate===null&&t(p,A),h=s(We,h,R),T===null?E=We:T.sibling=We,T=We,A=Q}if(b.done)return r(p,A),q&&nr(p,R),E;if(A===null){for(;!b.done;R++,b=v.next())b=c(p,b.value,w),b!==null&&(h=s(b,h,R),T===null?E=b:T.sibling=b,T=b);return q&&nr(p,R),E}for(A=n(p,A);!b.done;R++,b=v.next())b=g(A,p,R,b.value,w),b!==null&&(e&&b.alternate!==null&&A.delete(b.key===null?R:b.key),h=s(b,h,R),T===null?E=b:T.sibling=b,T=b);return e&&A.forEach(function(hn){return t(p,hn)}),q&&nr(p,R),E}function _(p,h,v,w){if(typeof v=="object"&&v!==null&&v.type===Ar&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ci:e:{for(var E=v.key,T=h;T!==null;){if(T.key===E){if(E=v.type,E===Ar){if(T.tag===7){r(p,T.sibling),h=i(T,v.props.children),h.return=p,p=h;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Tt&&Mc(E)===T.type){r(p,T.sibling),h=i(T,v.props),h.ref=_n(p,T,v),h.return=p,p=h;break e}r(p,T);break}else t(p,T);T=T.sibling}v.type===Ar?(h=cr(v.props.children,p.mode,w,v.key),h.return=p,p=h):(w=Ji(v.type,v.key,v.props,null,p.mode,w),w.ref=_n(p,h,v),w.return=p,p=w)}return a(p);case Tr:e:{for(T=v.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){r(p,h.sibling),h=i(h,v.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=Za(v,p.mode,w),h.return=p,p=h}return a(p);case Tt:return T=v._init,_(p,h,T(v._payload),w)}if(Cn(v))return m(p,h,v,w);if(vn(v))return y(p,h,v,w);Mi(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(r(p,h.sibling),h=i(h,v),h.return=p,p=h):(r(p,h),h=Xa(v,p.mode,w),h.return=p,p=h),a(p)):r(p,h)}return _}var Yr=Yh(!0),Qh=Yh(!1),ps=Qt(null),vs=null,Mr=null,eu=null;function tu(){eu=Mr=vs=null}function ru(e){var t=ps.current;K(ps),e._currentValue=t}function Qo(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Kr(e,t){vs=e,eu=Mr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($e=!0),e.firstContext=null)}function He(e){var t=e._currentValue;if(eu!==e)if(e={context:e,memoizedValue:t,next:null},Mr===null){if(vs===null)throw Error(S(308));Mr=e,vs.dependencies={lanes:0,firstContext:e}}else Mr=Mr.next=e;return t}var or=null;function nu(e){or===null?or=[e]:or.push(e)}function Xh(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,nu(t)):(r.next=i.next,i.next=r),t.interleaved=r,yt(e,n)}function yt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var At=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zh(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 pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ut(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,M&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,yt(e,r)}return i=n.interleaved,i===null?(t.next=t,nu(n)):(t.next=i.next,i.next=t),n.interleaved=t,yt(e,r)}function Wi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hl(e,r)}}function jc(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ms(e,t,r,n){var i=e.updateQueue;At=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,u=l.next;l.next=null,a===null?s=u:a.next=u,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;a=0,f=u=l=null,o=s;do{var d=o.lane,g=o.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,y=o;switch(d=t,g=r,y.tag){case 1:if(m=y.payload,typeof m=="function"){c=m.call(g,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,d=typeof m=="function"?m.call(g,c,d):m,d==null)break e;c=G({},c,d);break e;case 2:At=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[o]:d.push(o))}else g={eventTime:g,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=g,l=c):f=f.next=g,a|=d;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;d=o,o=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);pr|=a,e.lanes=a,e.memoizedState=c}}function zc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Va.transition;Va.transition={};try{e(!1),t()}finally{z=r,Va.transition=n}}function vp(){return Ke().memoizedState}function Ay(e,t,r){var n=Ht(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},mp(e))gp(t,r);else if(r=Xh(e,t,r,n),r!==null){var i=we();Je(r,e,n,i),yp(r,t,n)}}function Ry(e,t,r){var n=Ht(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(mp(e))gp(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,r);if(i.hasEagerState=!0,i.eagerState=o,et(o,a)){var l=t.interleaved;l===null?(i.next=i,nu(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=Xh(e,t,i,n),r!==null&&(i=we(),Je(r,e,n,i),yp(r,t,n))}}function mp(e){var t=e.alternate;return e===W||t!==null&&t===W}function gp(e,t){kn=ys=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function yp(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hl(e,r)}}var ws={readContext:He,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},Oy={readContext:He,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:He,useEffect:Dc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Yi(4194308,4,cp.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yi(4,2,e,t)},useMemo:function(e,t){var r=nt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=nt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Ay.bind(null,W,e),[n.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:Lc,useDebugValue:du,useDeferredValue:function(e){return nt().memoizedState=e},useTransition:function(){var e=Lc(!1),t=e[0];return e=Ty.bind(null,e[1]),nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=W,i=nt();if(q){if(r===void 0)throw Error(S(407));r=r()}else{if(r=t(),le===null)throw Error(S(349));hr&30||rp(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,Dc(ip.bind(null,n,s,e),[e]),n.flags|=2048,ri(9,np.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=nt(),t=le.identifierPrefix;if(q){var r=ht,n=dt;r=(n&~(1<<32-Ze(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ei++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[st]=t,e[Xn]=n,Ap(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fo(r,n),r){case"dialog":B("cancel",e),B("close",e),i=n;break;case"iframe":case"object":case"embed":B("load",e),i=n;break;case"video":case"audio":for(i=0;iXr&&(t.flags|=128,n=!0,_n(s,!1),t.lanes=4194304)}else{if(!n)if(e=gs(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_n(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!q)return pe(t),null}else 2*J()-s.renderingStartTime>Xr&&r!==1073741824&&(t.flags|=128,n=!0,_n(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(r=s.last,r!==null?r.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=J(),t.sibling=null,r=V.current,U(V,n?r&1|2:r&1),t):(pe(t),null);case 22:case 23:return yu(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Re&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function zy(e,t){switch(Zl(t),t.tag){case 1:return Te(t.type)&&cs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yr(),K(Pe),K(ge),ou(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return au(t),null;case 13:if(K(V),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));Wr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(V),null;case 4:return Yr(),null;case 10:return ru(t.type._context),null;case 22:case 23:return yu(),null;case 24:return null;default:return null}}var zi=!1,ve=!1,Ly=typeof WeakSet=="function"?WeakSet:Set,$=null;function Mr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Y(e,t,n)}else r.current=null}function sl(e,t,r){try{r()}catch(n){Y(e,t,n)}}var Xc=!1;function Dy(e,t){if(Bo=as,e=bh(),Ql(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,o=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var g;c!==r||i!==0&&c.nodeType!==3||(o=a+i),c!==s||n!==0&&c.nodeType!==3||(l=a+n),c.nodeType===3&&(a+=c.nodeValue.length),(g=c.firstChild)!==null;)d=c,c=g;for(;;){if(c===e)break t;if(d===r&&++u===i&&(o=a),d===s&&++f===n&&(l=a),(g=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=g}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ho={focusedElem:e,selectionRange:r},as=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,_=m.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ye(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(w){Y(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return m=Xc,Xc=!1,m}function bn(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&sl(t,r,s)}i=i.next}while(i!==n)}}function Gs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function al(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Np(e){var t=e.alternate;t!==null&&(e.alternate=null,Np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[Xn],delete t[Vo],delete t[Ey],delete t[xy])),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 Zc(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 ol(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=us));else if(n!==4&&(e=e.child,e!==null))for(ol(e,t,r),e=e.sibling;e!==null;)ol(e,t,r),e=e.sibling}function ll(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ll(e,t,r),e=e.sibling;e!==null;)ll(e,t,r),e=e.sibling}var ue=null,Qe=!1;function xt(e,t,r){for(r=r.child;r!==null;)Ip(e,t,r),r=r.sibling}function Ip(e,t,r){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Ds,r)}catch{}switch(r.tag){case 5:ve||Mr(r,t);case 6:var n=ue,i=Qe;ue=null,xt(e,t,r),ue=n,Qe=i,ue!==null&&(Qe?(e=ue,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ue.removeChild(r.stateNode));break;case 18:ue!==null&&(Qe?(e=ue,r=r.stateNode,e.nodeType===8?Ha(e.parentNode,r):e.nodeType===1&&Ha(e,r),Vn(e)):Ha(ue,r.stateNode));break;case 4:n=ue,i=Qe,ue=r.stateNode.containerInfo,Qe=!0,xt(e,t,r),ue=n,Qe=i;break;case 0:case 11:case 14:case 15:if(!ve&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&sl(r,t,a),i=i.next}while(i!==n)}xt(e,t,r);break;case 1:if(!ve&&(Mr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){Y(r,t,o)}xt(e,t,r);break;case 21:xt(e,t,r);break;case 22:r.mode&1?(ve=(n=ve)||r.memoizedState!==null,xt(e,t,r),ve=n):xt(e,t,r);break;default:xt(e,t,r)}}function Jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ly),t.forEach(function(n){var i=Yy.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ge(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=a),n&=~s}if(n=i,n=J()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*By(n/1960))-n,10e?16:e,It===null)var n=!1;else{if(e=It,It=null,Es=0,M&6)throw Error(S(331));var i=M;for(M|=4,$=e.current;$!==null;){var s=$,a=s.child;if($.flags&16){var o=s.deletions;if(o!==null){for(var l=0;lJ()-mu?ur(e,0):vu|=r),Ae(e,t)}function Up(e,t){t===0&&(e.mode&1?(t=Ri,Ri<<=1,!(Ri&130023424)&&(Ri=4194304)):t=1);var r=we();e=yt(e,t),e!==null&&(oi(e,t,r),Ae(e,r))}function Gy(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Up(e,r)}function Yy(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(S(314))}n!==null&&n.delete(t),Up(e,r)}var Bp;Bp=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)$e=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return $e=!1,My(e,t,r);$e=!!(e.flags&131072)}else $e=!1,q&&t.flags&1048576&&Vh(t,hs,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Qi(e,t),e=t.pendingProps;var i=Vr(t,ge.current);Hr(t,r),i=uu(null,t,n,e,i,r);var s=cu();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,Te(n)?(s=!0,fs(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iu(t),i.updater=Ws,t.stateNode=i,i._reactInternals=t,Zo(t,n,e,r),t=tl(null,t,n,!0,s,r)):(t.tag=0,q&&s&&Xl(t),ye(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Qi(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Xy(n),e=Ye(n,e),i){case 0:t=el(null,t,n,e,r);break e;case 1:t=Gc(null,t,n,e,r);break e;case 11:t=Vc(null,t,n,e,r);break e;case 14:t=Wc(null,t,n,Ye(n.type,e),r);break e}throw Error(S(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),el(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),Gc(e,t,n,i,r);case 3:e:{if(Cp(t),e===null)throw Error(S(387));n=t.pendingProps,s=t.memoizedState,i=s.element,Zh(e,t),ms(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Qr(Error(S(423)),t),t=Yc(e,t,n,r,i);break e}else if(n!==i){i=Qr(Error(S(424)),t),t=Yc(e,t,n,r,i);break e}else for(Oe=Lt(t.stateNode.containerInfo.firstChild),Fe=t,q=!0,Xe=null,r=Qh(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Wr(),n===i){t=wt(e,t,r);break e}ye(e,t,n,r)}t=t.child}return t;case 5:return Jh(t),e===null&&Yo(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Ko(n,i)?a=null:s!==null&&Ko(n,s)&&(t.flags|=32),$p(e,t),ye(e,t,a,r),t.child;case 6:return e===null&&Yo(t),null;case 13:return Pp(e,t,r);case 4:return su(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Gr(t,null,n,r):ye(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),Vc(e,t,n,i,r);case 7:return ye(e,t,t.pendingProps,r),t.child;case 8:return ye(e,t,t.pendingProps.children,r),t.child;case 12:return ye(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,U(ps,n._currentValue),n._currentValue=a,s!==null)if(et(s.value,a)){if(s.children===i.children&&!Pe.current){t=wt(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=pt(-1,r&-r),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),Qo(s.return,r,t),o.lanes|=r;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(S(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),Qo(a,r,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}ye(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Hr(t,r),i=He(i),n=n(i),t.flags|=1,ye(e,t,n,r),t.child;case 14:return n=t.type,i=Ye(n,t.pendingProps),i=Ye(n.type,i),Wc(e,t,n,i,r);case 15:return Ep(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),Qi(e,t),t.tag=1,Te(n)?(e=!0,fs(t)):e=!1,Hr(t,r),wp(t,n,i),Zo(t,n,i,r),tl(null,t,n,!0,e,r);case 19:return Tp(e,t,r);case 22:return xp(e,t,r)}throw Error(S(156,t.tag))};function Hp(e,t){return mh(e,t)}function Qy(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(e,t,r,n){return new Qy(e,t,r,n)}function _u(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xy(e){if(typeof e=="function")return _u(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ll)return 11;if(e===Dl)return 14}return 2}function Ht(e,t){var r=e.alternate;return r===null?(r=Ue(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ji(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")_u(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Tr:return cr(r.children,i,s,t);case zl:a=8,i|=8;break;case Eo:return e=Ue(12,r,t,i|2),e.elementType=Eo,e.lanes=s,e;case xo:return e=Ue(13,r,t,i),e.elementType=xo,e.lanes=s,e;case $o:return e=Ue(19,r,t,i),e.elementType=$o,e.lanes=s,e;case Jd:return Qs(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xd:a=10;break e;case Zd:a=9;break e;case Ll:a=11;break e;case Dl:a=14;break e;case Pt:a=16,n=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=Ue(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function cr(e,t,r,n){return e=Ue(7,e,n,t),e.lanes=r,e}function Qs(e,t,r,n){return e=Ue(22,e,n,t),e.elementType=Jd,e.lanes=r,e.stateNode={isHidden:!1},e}function Xa(e,t,r){return e=Ue(6,e,null,t),e.lanes=r,e}function Za(e,t,r){return t=Ue(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zy(e,t,r,n,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=Fa(0),this.expirationTimes=Fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Su(e,t,r,n,i,s,a,o,l){return e=new Zy(e,t,r,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ue(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},iu(s),e}function Jy(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wp)}catch(e){console.error(e)}}Wp(),Wd.exports=ke;var i1=Wd.exports,lf=i1;_o.createRoot=lf.createRoot,_o.hydrateRoot=lf.hydrateRoot;/** +`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Ya(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Jo(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Iy=typeof WeakMap=="function"?WeakMap:Map;function _p(e,t,r){r=pt(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ss||(Ss=!0,ul=n),Jo(e,t)},r}function Sp(e,t,r){r=pt(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Jo(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Jo(e,t),typeof n!="function"&&(Bt===null?Bt=new Set([this]):Bt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function Hc(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Iy;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Wy.bind(null,e,t,r),t.then(e,e))}function Kc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qc(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=pt(-1,1),t.tag=2,Ut(r,t,1))),r.lanes|=1),e)}var ky=_t.ReactCurrentOwner,$e=!1;function ye(e,t,r,n){t.child=e===null?Qh(t,null,r,n):Yr(t,e.child,r,n)}function Vc(e,t,r,n,i){r=r.render;var s=t.ref;return Kr(t,i),n=uu(e,t,r,n,s,i),r=cu(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,wt(e,t,i)):(q&&r&&Xl(t),t.flags|=1,ye(e,t,n,i),t.child)}function Wc(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!_u(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,xp(e,t,s,n,i)):(e=Ji(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:Gn,r(a,n)&&e.ref===t.ref)return wt(e,t,i)}return t.flags|=1,e=Kt(s,n),e.ref=t.ref,e.return=t,t.child=e}function xp(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(Gn(s,n)&&e.ref===t.ref)if($e=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&($e=!0);else return t.lanes=e.lanes,wt(e,t,i)}return el(e,t,r,n,i)}function Ep(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(zr,Re),Re|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(zr,Re),Re|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,U(zr,Re),Re|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,U(zr,Re),Re|=n;return ye(e,t,i,r),t.child}function $p(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function el(e,t,r,n,i){var s=Te(r)?fr:ge.current;return s=Wr(t,s),Kr(t,i),r=uu(e,t,r,n,s,i),n=cu(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,wt(e,t,i)):(q&&n&&Xl(t),t.flags|=1,ye(e,t,r,i),t.child)}function Gc(e,t,r,n,i){if(Te(r)){var s=!0;fs(t)}else s=!1;if(Kr(t,i),t.stateNode===null)Qi(e,t),wp(t,r,n),Zo(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=He(u):(u=Te(r)?fr:ge.current,u=Wr(t,u));var f=r.getDerivedStateFromProps,c=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||l!==u)&&Bc(t,a,n,u),At=!1;var d=t.memoizedState;a.state=d,ms(t,n,a,i),l=t.memoizedState,o!==n||d!==l||Pe.current||At?(typeof f=="function"&&(Xo(t,r,f,n),l=t.memoizedState),(o=At||Uc(t,r,o,n,d,l,u))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=u,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,Zh(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Ye(t.type,o),a.props=u,c=t.pendingProps,d=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=He(l):(l=Te(r)?fr:ge.current,l=Wr(t,l));var g=r.getDerivedStateFromProps;(f=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==c||d!==l)&&Bc(t,a,n,l),At=!1,d=t.memoizedState,a.state=d,ms(t,n,a,i);var m=t.memoizedState;o!==c||d!==m||Pe.current||At?(typeof g=="function"&&(Xo(t,r,g,n),m=t.memoizedState),(u=At||Uc(t,r,u,n,d,m,l)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,m,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,m,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),a.props=n,a.state=m,a.context=l,n=u):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return tl(e,t,r,n,s,i)}function tl(e,t,r,n,i,s){$p(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&Ic(t,r,!1),wt(e,t,s);n=t.stateNode,ky.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=Yr(t,e.child,null,s),t.child=Yr(t,null,o,s)):ye(e,t,o,s),t.memoizedState=n.state,i&&Ic(t,r,!0),t.child}function Cp(e){var t=e.stateNode;t.pendingContext?Fc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Fc(e,t.context,!1),su(e,t.containerInfo)}function Yc(e,t,r,n,i){return Gr(),Jl(i),t.flags|=256,ye(e,t,r,n),t.child}var rl={dehydrated:null,treeContext:null,retryLane:0};function nl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Pp(e,t,r){var n=t.pendingProps,i=V.current,s=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),U(V,i&1),e===null)return Yo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,s?(n=t.mode,s=t.child,a={mode:"hidden",children:a},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Qs(a,n,0,null),e=cr(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=nl(r),t.memoizedState=rl,e):hu(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return by(e,t,a,n,o,i,r);if(s){s=n.fallback,a=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Kt(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Kt(o,s):(s=cr(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,a=e.child.memoizedState,a=a===null?nl(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,t.memoizedState=rl,n}return s=e.child,e=s.sibling,n=Kt(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function hu(e,t){return t=Qs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ji(e,t,r,n){return n!==null&&Jl(n),Yr(t,e.child,null,r),e=hu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function by(e,t,r,n,i,s,a){if(r)return t.flags&256?(t.flags&=-257,n=Ya(Error(S(422))),ji(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=Qs({mode:"visible",children:n.children},i,0,null),s=cr(s,i,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&Yr(t,e.child,null,a),t.child.memoizedState=nl(a),t.memoizedState=rl,s);if(!(t.mode&1))return ji(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,s=Error(S(419)),n=Ya(s,n,void 0),ji(e,t,a,n)}if(o=(a&e.childLanes)!==0,$e||o){if(n=le,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,yt(e,i),Je(n,e,i,-1))}return wu(),n=Ya(Error(S(421))),ji(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Gy.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Oe=Dt(i.nextSibling),Fe=t,q=!0,Xe=null,e!==null&&(Me[je++]=dt,Me[je++]=ht,Me[je++]=dr,dt=e.id,ht=e.overflow,dr=t),t=hu(t,n.children),t.flags|=4096,t)}function Qc(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Qo(e.return,t,r)}function Qa(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function Tp(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(ye(e,t,n.children,r),n=V.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qc(e,r,t);else if(e.tag===19)Qc(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(U(V,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&gs(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Qa(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&gs(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Qa(t,!0,r,null,s);break;case"together":Qa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function wt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),pr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,r=Kt(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Kt(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function My(e,t,r){switch(t.tag){case 3:Cp(t),Gr();break;case 5:Jh(t);break;case 1:Te(t.type)&&fs(t);break;case 4:su(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;U(ps,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(U(V,V.current&1),t.flags|=128,null):r&t.child.childLanes?Pp(e,t,r):(U(V,V.current&1),e=wt(e,t,r),e!==null?e.sibling:null);U(V,V.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Tp(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(V,V.current),n)break;return null;case 22:case 23:return t.lanes=0,Ep(e,t,r)}return wt(e,t,r)}var Ap,il,Rp,Op;Ap=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};il=function(){};Rp=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,lr(ot.current);var s=null;switch(r){case"input":i=Po(e,i),n=Po(e,n),s=[];break;case"select":i=G({},i,{value:void 0}),n=G({},n,{value:void 0}),s=[];break;case"textarea":i=Ro(e,i),n=Ro(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=us)}No(r,n);var a;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Un.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in n){var l=n[u];if(o=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==o&&(l!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(s||(s=[]),s.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Un.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&B("scroll",e),s||o===l||(s=[])):(s=s||[]).push(u,l))}r&&(s=s||[]).push("style",r);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Op=function(e,t,r,n){r!==n&&(t.flags|=4)};function Sn(e,t){if(!q)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function jy(e,t,r){var n=t.pendingProps;switch(Zl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pe(t),null;case 1:return Te(t.type)&&cs(),pe(t),null;case 3:return n=t.stateNode,Qr(),K(Pe),K(ge),ou(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(bi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xe!==null&&(dl(Xe),Xe=null))),il(e,t),pe(t),null;case 5:au(t);var i=lr(Jn.current);if(r=t.type,e!==null&&t.stateNode!=null)Rp(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(S(166));return pe(t),null}if(e=lr(ot.current),bi(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[st]=t,n[Xn]=s,e=(t.mode&1)!==0,r){case"dialog":B("cancel",n),B("close",n);break;case"iframe":case"object":case"embed":B("load",n);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[st]=t,e[Xn]=n,Ap(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fo(r,n),r){case"dialog":B("cancel",e),B("close",e),i=n;break;case"iframe":case"object":case"embed":B("load",e),i=n;break;case"video":case"audio":for(i=0;iZr&&(t.flags|=128,n=!0,Sn(s,!1),t.lanes=4194304)}else{if(!n)if(e=gs(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Sn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!q)return pe(t),null}else 2*J()-s.renderingStartTime>Zr&&r!==1073741824&&(t.flags|=128,n=!0,Sn(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(r=s.last,r!==null?r.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=J(),t.sibling=null,r=V.current,U(V,n?r&1|2:r&1),t):(pe(t),null);case 22:case 23:return yu(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Re&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function zy(e,t){switch(Zl(t),t.tag){case 1:return Te(t.type)&&cs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qr(),K(Pe),K(ge),ou(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return au(t),null;case 13:if(K(V),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));Gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(V),null;case 4:return Qr(),null;case 10:return ru(t.type._context),null;case 22:case 23:return yu(),null;case 24:return null;default:return null}}var zi=!1,ve=!1,Ly=typeof WeakSet=="function"?WeakSet:Set,C=null;function jr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Y(e,t,n)}else r.current=null}function sl(e,t,r){try{r()}catch(n){Y(e,t,n)}}var Xc=!1;function Dy(e,t){if(Bo=as,e=bh(),Ql(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,o=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var g;c!==r||i!==0&&c.nodeType!==3||(o=a+i),c!==s||n!==0&&c.nodeType!==3||(l=a+n),c.nodeType===3&&(a+=c.nodeValue.length),(g=c.firstChild)!==null;)d=c,c=g;for(;;){if(c===e)break t;if(d===r&&++u===i&&(o=a),d===s&&++f===n&&(l=a),(g=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=g}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ho={focusedElem:e,selectionRange:r},as=!1,C=t;C!==null;)if(t=C,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,C=e;else for(;C!==null;){t=C;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,_=m.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ye(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(w){Y(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,C=e;break}C=t.return}return m=Xc,Xc=!1,m}function bn(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&sl(t,r,s)}i=i.next}while(i!==n)}}function Gs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function al(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Np(e){var t=e.alternate;t!==null&&(e.alternate=null,Np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[Xn],delete t[Vo],delete t[xy],delete t[Ey])),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 Zc(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 ol(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=us));else if(n!==4&&(e=e.child,e!==null))for(ol(e,t,r),e=e.sibling;e!==null;)ol(e,t,r),e=e.sibling}function ll(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ll(e,t,r),e=e.sibling;e!==null;)ll(e,t,r),e=e.sibling}var ue=null,Qe=!1;function $t(e,t,r){for(r=r.child;r!==null;)Ip(e,t,r),r=r.sibling}function Ip(e,t,r){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Ds,r)}catch{}switch(r.tag){case 5:ve||jr(r,t);case 6:var n=ue,i=Qe;ue=null,$t(e,t,r),ue=n,Qe=i,ue!==null&&(Qe?(e=ue,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ue.removeChild(r.stateNode));break;case 18:ue!==null&&(Qe?(e=ue,r=r.stateNode,e.nodeType===8?Ha(e.parentNode,r):e.nodeType===1&&Ha(e,r),Vn(e)):Ha(ue,r.stateNode));break;case 4:n=ue,i=Qe,ue=r.stateNode.containerInfo,Qe=!0,$t(e,t,r),ue=n,Qe=i;break;case 0:case 11:case 14:case 15:if(!ve&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&sl(r,t,a),i=i.next}while(i!==n)}$t(e,t,r);break;case 1:if(!ve&&(jr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){Y(r,t,o)}$t(e,t,r);break;case 21:$t(e,t,r);break;case 22:r.mode&1?(ve=(n=ve)||r.memoizedState!==null,$t(e,t,r),ve=n):$t(e,t,r);break;default:$t(e,t,r)}}function Jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ly),t.forEach(function(n){var i=Yy.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ge(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=a),n&=~s}if(n=i,n=J()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*By(n/1960))-n,10e?16:e,kt===null)var n=!1;else{if(e=kt,kt=null,xs=0,M&6)throw Error(S(331));var i=M;for(M|=4,C=e.current;C!==null;){var s=C,a=s.child;if(C.flags&16){var o=s.deletions;if(o!==null){for(var l=0;lJ()-mu?ur(e,0):vu|=r),Ae(e,t)}function Up(e,t){t===0&&(e.mode&1?(t=Ri,Ri<<=1,!(Ri&130023424)&&(Ri=4194304)):t=1);var r=we();e=yt(e,t),e!==null&&(oi(e,t,r),Ae(e,r))}function Gy(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Up(e,r)}function Yy(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(S(314))}n!==null&&n.delete(t),Up(e,r)}var Bp;Bp=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)$e=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return $e=!1,My(e,t,r);$e=!!(e.flags&131072)}else $e=!1,q&&t.flags&1048576&&Vh(t,hs,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Qi(e,t),e=t.pendingProps;var i=Wr(t,ge.current);Kr(t,r),i=uu(null,t,n,e,i,r);var s=cu();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,Te(n)?(s=!0,fs(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iu(t),i.updater=Ws,t.stateNode=i,i._reactInternals=t,Zo(t,n,e,r),t=tl(null,t,n,!0,s,r)):(t.tag=0,q&&s&&Xl(t),ye(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Qi(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Xy(n),e=Ye(n,e),i){case 0:t=el(null,t,n,e,r);break e;case 1:t=Gc(null,t,n,e,r);break e;case 11:t=Vc(null,t,n,e,r);break e;case 14:t=Wc(null,t,n,Ye(n.type,e),r);break e}throw Error(S(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),el(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),Gc(e,t,n,i,r);case 3:e:{if(Cp(t),e===null)throw Error(S(387));n=t.pendingProps,s=t.memoizedState,i=s.element,Zh(e,t),ms(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Xr(Error(S(423)),t),t=Yc(e,t,n,r,i);break e}else if(n!==i){i=Xr(Error(S(424)),t),t=Yc(e,t,n,r,i);break e}else for(Oe=Dt(t.stateNode.containerInfo.firstChild),Fe=t,q=!0,Xe=null,r=Qh(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Gr(),n===i){t=wt(e,t,r);break e}ye(e,t,n,r)}t=t.child}return t;case 5:return Jh(t),e===null&&Yo(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Ko(n,i)?a=null:s!==null&&Ko(n,s)&&(t.flags|=32),$p(e,t),ye(e,t,a,r),t.child;case 6:return e===null&&Yo(t),null;case 13:return Pp(e,t,r);case 4:return su(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Yr(t,null,n,r):ye(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),Vc(e,t,n,i,r);case 7:return ye(e,t,t.pendingProps,r),t.child;case 8:return ye(e,t,t.pendingProps.children,r),t.child;case 12:return ye(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,U(ps,n._currentValue),n._currentValue=a,s!==null)if(et(s.value,a)){if(s.children===i.children&&!Pe.current){t=wt(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=pt(-1,r&-r),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),Qo(s.return,r,t),o.lanes|=r;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(S(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),Qo(a,r,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}ye(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Kr(t,r),i=He(i),n=n(i),t.flags|=1,ye(e,t,n,r),t.child;case 14:return n=t.type,i=Ye(n,t.pendingProps),i=Ye(n.type,i),Wc(e,t,n,i,r);case 15:return xp(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ye(n,i),Qi(e,t),t.tag=1,Te(n)?(e=!0,fs(t)):e=!1,Kr(t,r),wp(t,n,i),Zo(t,n,i,r),tl(null,t,n,!0,e,r);case 19:return Tp(e,t,r);case 22:return Ep(e,t,r)}throw Error(S(156,t.tag))};function Hp(e,t){return mh(e,t)}function Qy(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(e,t,r,n){return new Qy(e,t,r,n)}function _u(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xy(e){if(typeof e=="function")return _u(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ll)return 11;if(e===Dl)return 14}return 2}function Kt(e,t){var r=e.alternate;return r===null?(r=Ue(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ji(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")_u(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ar:return cr(r.children,i,s,t);case zl:a=8,i|=8;break;case xo:return e=Ue(12,r,t,i|2),e.elementType=xo,e.lanes=s,e;case Eo:return e=Ue(13,r,t,i),e.elementType=Eo,e.lanes=s,e;case $o:return e=Ue(19,r,t,i),e.elementType=$o,e.lanes=s,e;case Jd:return Qs(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xd:a=10;break e;case Zd:a=9;break e;case Ll:a=11;break e;case Dl:a=14;break e;case Tt:a=16,n=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=Ue(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function cr(e,t,r,n){return e=Ue(7,e,n,t),e.lanes=r,e}function Qs(e,t,r,n){return e=Ue(22,e,n,t),e.elementType=Jd,e.lanes=r,e.stateNode={isHidden:!1},e}function Xa(e,t,r){return e=Ue(6,e,null,t),e.lanes=r,e}function Za(e,t,r){return t=Ue(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zy(e,t,r,n,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=Fa(0),this.expirationTimes=Fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Su(e,t,r,n,i,s,a,o,l){return e=new Zy(e,t,r,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ue(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},iu(s),e}function Jy(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wp)}catch(e){console.error(e)}}Wp(),Wd.exports=ke;var i1=Wd.exports,lf=i1;_o.createRoot=lf.createRoot,_o.hydrateRoot=lf.hydrateRoot;/** * @remix-run/router v1.17.0 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Gp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function a1(){return Math.random().toString(36).substr(2,8)}function cf(e,t){return{usr:e.state,key:e.key,idx:t}}function hl(e,t,r,n){return r===void 0&&(r=null),ii({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rn(t):t,{state:r,key:t&&t.key||n||a1()})}function Cs(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function rn(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function o1(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,a=i.history,o=kt.Pop,l=null,u=f();u==null&&(u=0,a.replaceState(ii({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function c(){o=kt.Pop;let _=f(),p=_==null?null:_-u;u=_,l&&l({action:o,location:y.location,delta:p})}function d(_,p){o=kt.Push;let h=hl(y.location,_,p);u=f()+1;let v=cf(h,u),w=y.createHref(h);try{a.pushState(v,"",w)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(w)}s&&l&&l({action:o,location:y.location,delta:1})}function g(_,p){o=kt.Replace;let h=hl(y.location,_,p);u=f();let v=cf(h,u),w=y.createHref(h);a.replaceState(v,"",w),s&&l&&l({action:o,location:y.location,delta:0})}function m(_){let p=i.location.origin!=="null"?i.location.origin:i.location.href,h=typeof _=="string"?_:Cs(_);return h=h.replace(/ $/,"%20"),te(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let y={get action(){return o},get location(){return e(i,a)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(uf,c),l=_,()=>{i.removeEventListener(uf,c),l=null}},createHref(_){return t(i,_)},createURL:m,encodeLocation(_){let p=m(_);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:g,go(_){return a.go(_)}};return y}var ff;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ff||(ff={}));function l1(e,t,r){return r===void 0&&(r="/"),u1(e,t,r,!1)}function u1(e,t,r,n){let i=typeof t=="string"?rn(t):t,s=Cu(i.pathname||"/",r);if(s==null)return null;let a=Yp(e);c1(a);let o=null;for(let l=0;o==null&&l{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(te(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Kt([n,l.relativePath]),f=r.concat(l);s.children&&s.children.length>0&&(te(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Yp(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:g1(u,s.index),routesMeta:f})};return e.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of Qp(s.path))i(s,a,l)}),t}function Qp(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let a=Qp(n.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function c1(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:y1(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const f1=/^:[\w-]+$/,d1=3,h1=2,p1=1,v1=10,m1=-2,df=e=>e==="*";function g1(e,t){let r=e.split("/"),n=r.length;return r.some(df)&&(n+=m1),t&&(n+=h1),r.filter(i=>!df(i)).reduce((i,s)=>i+(f1.test(s)?d1:s===""?p1:v1),n)}function y1(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function w1(e,t,r){let{routesMeta:n}=e,i={},s="/",a=[];for(let o=0;o{let{paramName:d,isOptional:g}=f;if(d==="*"){let y=o[c]||"";a=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const m=o[c];return g&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function _1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Gp(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function S1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Gp(!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 Cu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function E1(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?rn(e):e;return{pathname:r?r.startsWith("/")?r:x1(r,t):t,search:P1(n),hash:T1(i)}}function x1(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ja(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function $1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Xp(e,t){let r=$1(e);return t?r.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Zp(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=rn(e):(i=ii({},e),te(!i.pathname||!i.pathname.includes("?"),Ja("?","pathname","search",i)),te(!i.pathname||!i.pathname.includes("#"),Ja("#","pathname","hash",i)),te(!i.search||!i.search.includes("#"),Ja("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,o;if(a==null)o=r;else{let c=t.length-1;if(!n&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}o=c>=0?t[c]:"/"}let l=E1(i,o),u=a&&a!=="/"&&a.endsWith("/"),f=(s||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Kt=e=>e.join("/").replace(/\/\/+/g,"/"),C1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,T1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function A1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Jp=["post","put","patch","delete"];new Set(Jp);const R1=["get",...Jp];new Set(R1);/** + */function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Gp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function a1(){return Math.random().toString(36).substr(2,8)}function cf(e,t){return{usr:e.state,key:e.key,idx:t}}function hl(e,t,r,n){return r===void 0&&(r=null),ii({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?nn(t):t,{state:r,key:t&&t.key||n||a1()})}function Cs(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function nn(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function o1(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,a=i.history,o=bt.Pop,l=null,u=f();u==null&&(u=0,a.replaceState(ii({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function c(){o=bt.Pop;let _=f(),p=_==null?null:_-u;u=_,l&&l({action:o,location:y.location,delta:p})}function d(_,p){o=bt.Push;let h=hl(y.location,_,p);u=f()+1;let v=cf(h,u),w=y.createHref(h);try{a.pushState(v,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(w)}s&&l&&l({action:o,location:y.location,delta:1})}function g(_,p){o=bt.Replace;let h=hl(y.location,_,p);u=f();let v=cf(h,u),w=y.createHref(h);a.replaceState(v,"",w),s&&l&&l({action:o,location:y.location,delta:0})}function m(_){let p=i.location.origin!=="null"?i.location.origin:i.location.href,h=typeof _=="string"?_:Cs(_);return h=h.replace(/ $/,"%20"),te(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let y={get action(){return o},get location(){return e(i,a)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(uf,c),l=_,()=>{i.removeEventListener(uf,c),l=null}},createHref(_){return t(i,_)},createURL:m,encodeLocation(_){let p=m(_);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:g,go(_){return a.go(_)}};return y}var ff;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ff||(ff={}));function l1(e,t,r){return r===void 0&&(r="/"),u1(e,t,r,!1)}function u1(e,t,r,n){let i=typeof t=="string"?nn(t):t,s=Cu(i.pathname||"/",r);if(s==null)return null;let a=Yp(e);c1(a);let o=null;for(let l=0;o==null&&l{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(te(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=qt([n,l.relativePath]),f=r.concat(l);s.children&&s.children.length>0&&(te(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Yp(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:g1(u,s.index),routesMeta:f})};return e.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of Qp(s.path))i(s,a,l)}),t}function Qp(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let a=Qp(n.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function c1(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:y1(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const f1=/^:[\w-]+$/,d1=3,h1=2,p1=1,v1=10,m1=-2,df=e=>e==="*";function g1(e,t){let r=e.split("/"),n=r.length;return r.some(df)&&(n+=m1),t&&(n+=h1),r.filter(i=>!df(i)).reduce((i,s)=>i+(f1.test(s)?d1:s===""?p1:v1),n)}function y1(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function w1(e,t,r){let{routesMeta:n}=e,i={},s="/",a=[];for(let o=0;o{let{paramName:d,isOptional:g}=f;if(d==="*"){let y=o[c]||"";a=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const m=o[c];return g&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function _1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Gp(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function S1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Gp(!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 Cu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function x1(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?nn(e):e;return{pathname:r?r.startsWith("/")?r:E1(r,t):t,search:P1(n),hash:T1(i)}}function E1(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ja(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function $1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Xp(e,t){let r=$1(e);return t?r.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Zp(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=nn(e):(i=ii({},e),te(!i.pathname||!i.pathname.includes("?"),Ja("?","pathname","search",i)),te(!i.pathname||!i.pathname.includes("#"),Ja("#","pathname","hash",i)),te(!i.search||!i.search.includes("#"),Ja("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,o;if(a==null)o=r;else{let c=t.length-1;if(!n&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}o=c>=0?t[c]:"/"}let l=x1(i,o),u=a&&a!=="/"&&a.endsWith("/"),f=(s||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const qt=e=>e.join("/").replace(/\/\/+/g,"/"),C1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,T1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function A1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Jp=["post","put","patch","delete"];new Set(Jp);const R1=["get",...Jp];new Set(R1);/** * React Router v6.24.0 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.current=!0}),P.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){n.go(u);return}let c=Zp(u,JSON.parse(a),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Kt([t,c.pathname])),(f.replace?n.replace:n.push)(c,f.state,f)},[t,n,a,s,e])}function k1(){let{matches:e}=P.useContext(Xt),t=e[e.length-1];return t?t.params:{}}function rv(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=P.useContext(wr),{matches:i}=P.useContext(Xt),{pathname:s}=ra(),a=JSON.stringify(Xp(i,n.v7_relativeSplatPath));return P.useMemo(()=>Zp(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function b1(e,t){return M1(e,t)}function M1(e,t,r,n){fi()||te(!1);let{navigator:i}=P.useContext(wr),{matches:s}=P.useContext(Xt),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=ra(),f;if(t){var c;let _=typeof t=="string"?rn(t):t;l==="/"||(c=_.pathname)!=null&&c.startsWith(l)||te(!1),f=_}else f=u;let d=f.pathname||"/",g=d;if(l!=="/"){let _=l.replace(/^\//,"").split("/");g="/"+d.replace(/^\//,"").split("/").slice(_.length).join("/")}let m=l1(e,{pathname:g}),y=U1(m&&m.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:Kt([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:Kt([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,r,n);return t&&y?P.createElement(ta.Provider,{value:{location:si({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kt.Pop}},y):y}function j1(){let e=q1(),t=A1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),r?P.createElement("pre",{style:i},r):null,null)}const z1=P.createElement(j1,null);class L1 extends P.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?P.createElement(Xt.Provider,{value:this.props.routeContext},P.createElement(ev.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function D1(e){let{routeContext:t,match:r,children:n}=e,i=P.useContext(Pu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),P.createElement(Xt.Provider,{value:t},n)}function U1(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if((s=r)!=null&&s.errors)e=r.matches;else return null}let a=e,o=(i=r)==null?void 0:i.errors;if(o!=null){let f=a.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);f>=0||te(!1),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,c,d)=>{let g,m=!1,y=null,_=null;r&&(g=o&&c.route.id?o[c.route.id]:void 0,y=c.route.errorElement||z1,l&&(u<0&&d===0?(m=!0,_=null):u===d&&(m=!0,_=c.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,d+1)),h=()=>{let v;return g?v=y:m?v=_:c.route.Component?v=P.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,P.createElement(D1,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:r!=null},children:v})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?P.createElement(L1,{location:r.location,revalidation:r.revalidation,component:y,error:g,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var nv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nv||{}),Ps=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}(Ps||{});function B1(e){let t=P.useContext(Pu);return t||te(!1),t}function H1(e){let t=P.useContext(O1);return t||te(!1),t}function K1(e){let t=P.useContext(Xt);return t||te(!1),t}function iv(e){let t=K1(),r=t.matches[t.matches.length-1];return r.route.id||te(!1),r.route.id}function q1(){var e;let t=P.useContext(ev),r=H1(Ps.UseRouteError),n=iv(Ps.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function V1(){let{router:e}=B1(nv.UseNavigateStable),t=iv(Ps.UseNavigateStable),r=P.useRef(!1);return tv(()=>{r.current=!0}),P.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,si({fromRouteId:t},s)))},[e,t])}function Tn(e){te(!1)}function W1(e){let{basename:t="/",children:r=null,location:n,navigationType:i=kt.Pop,navigator:s,static:a=!1,future:o}=e;fi()&&te(!1);let l=t.replace(/^\/*/,"/"),u=P.useMemo(()=>({basename:l,navigator:s,static:a,future:si({v7_relativeSplatPath:!1},o)}),[l,o,s,a]);typeof n=="string"&&(n=rn(n));let{pathname:f="/",search:c="",hash:d="",state:g=null,key:m="default"}=n,y=P.useMemo(()=>{let _=Cu(f,l);return _==null?null:{location:{pathname:_,search:c,hash:d,state:g,key:m},navigationType:i}},[l,f,c,d,g,m,i]);return y==null?null:P.createElement(wr.Provider,{value:u},P.createElement(ta.Provider,{children:r,value:y}))}function G1(e){let{children:t,location:r}=e;return b1(pl(t),r)}new Promise(()=>{});function pl(e,t){t===void 0&&(t=[]);let r=[];return P.Children.forEach(e,(n,i)=>{if(!P.isValidElement(n))return;let s=[...t,i];if(n.type===P.Fragment){r.push.apply(r,pl(n.props.children,s));return}n.type!==Tn&&te(!1),!n.props.index||!n.props.children||te(!1);let a={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=pl(n.props.children,s)),r.push(a)}),r}/** + */function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.current=!0}),$.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){n.go(u);return}let c=Zp(u,JSON.parse(a),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:qt([t,c.pathname])),(f.replace?n.replace:n.push)(c,f.state,f)},[t,n,a,s,e])}const k1=$.createContext(null);function b1(e){let t=$.useContext(St).outlet;return t&&$.createElement(k1.Provider,{value:e},t)}function M1(){let{matches:e}=$.useContext(St),t=e[e.length-1];return t?t.params:{}}function rv(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=$.useContext(wr),{matches:i}=$.useContext(St),{pathname:s}=ra(),a=JSON.stringify(Xp(i,n.v7_relativeSplatPath));return $.useMemo(()=>Zp(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function j1(e,t){return z1(e,t)}function z1(e,t,r,n){fi()||te(!1);let{navigator:i}=$.useContext(wr),{matches:s}=$.useContext(St),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=ra(),f;if(t){var c;let _=typeof t=="string"?nn(t):t;l==="/"||(c=_.pathname)!=null&&c.startsWith(l)||te(!1),f=_}else f=u;let d=f.pathname||"/",g=d;if(l!=="/"){let _=l.replace(/^\//,"").split("/");g="/"+d.replace(/^\//,"").split("/").slice(_.length).join("/")}let m=l1(e,{pathname:g}),y=H1(m&&m.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:qt([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:qt([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,r,n);return t&&y?$.createElement(ta.Provider,{value:{location:si({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:bt.Pop}},y):y}function L1(){let e=W1(),t=A1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return $.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},t),r?$.createElement("pre",{style:i},r):null,null)}const D1=$.createElement(L1,null);class U1 extends $.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?$.createElement(St.Provider,{value:this.props.routeContext},$.createElement(ev.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function B1(e){let{routeContext:t,match:r,children:n}=e,i=$.useContext(Pu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),$.createElement(St.Provider,{value:t},n)}function H1(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if((s=r)!=null&&s.errors)e=r.matches;else return null}let a=e,o=(i=r)==null?void 0:i.errors;if(o!=null){let f=a.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);f>=0||te(!1),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,c,d)=>{let g,m=!1,y=null,_=null;r&&(g=o&&c.route.id?o[c.route.id]:void 0,y=c.route.errorElement||D1,l&&(u<0&&d===0?(m=!0,_=null):u===d&&(m=!0,_=c.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,d+1)),h=()=>{let v;return g?v=y:m?v=_:c.route.Component?v=$.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,$.createElement(B1,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:r!=null},children:v})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?$.createElement(U1,{location:r.location,revalidation:r.revalidation,component:y,error:g,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var nv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nv||{}),Ps=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}(Ps||{});function K1(e){let t=$.useContext(Pu);return t||te(!1),t}function q1(e){let t=$.useContext(O1);return t||te(!1),t}function V1(e){let t=$.useContext(St);return t||te(!1),t}function iv(e){let t=V1(),r=t.matches[t.matches.length-1];return r.route.id||te(!1),r.route.id}function W1(){var e;let t=$.useContext(ev),r=q1(Ps.UseRouteError),n=iv(Ps.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function G1(){let{router:e}=K1(nv.UseNavigateStable),t=iv(Ps.UseNavigateStable),r=$.useRef(!1);return tv(()=>{r.current=!0}),$.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,si({fromRouteId:t},s)))},[e,t])}function Y1(e){return b1(e.context)}function Pr(e){te(!1)}function Q1(e){let{basename:t="/",children:r=null,location:n,navigationType:i=bt.Pop,navigator:s,static:a=!1,future:o}=e;fi()&&te(!1);let l=t.replace(/^\/*/,"/"),u=$.useMemo(()=>({basename:l,navigator:s,static:a,future:si({v7_relativeSplatPath:!1},o)}),[l,o,s,a]);typeof n=="string"&&(n=nn(n));let{pathname:f="/",search:c="",hash:d="",state:g=null,key:m="default"}=n,y=$.useMemo(()=>{let _=Cu(f,l);return _==null?null:{location:{pathname:_,search:c,hash:d,state:g,key:m},navigationType:i}},[l,f,c,d,g,m,i]);return y==null?null:$.createElement(wr.Provider,{value:u},$.createElement(ta.Provider,{children:r,value:y}))}function X1(e){let{children:t,location:r}=e;return j1(pl(t),r)}new Promise(()=>{});function pl(e,t){t===void 0&&(t=[]);let r=[];return $.Children.forEach(e,(n,i)=>{if(!$.isValidElement(n))return;let s=[...t,i];if(n.type===$.Fragment){r.push.apply(r,pl(n.props.children,s));return}n.type!==Pr&&te(!1),!n.props.index||!n.props.children||te(!1);let a={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=pl(n.props.children,s)),r.push(a)}),r}/** * React Router DOM v6.24.0 * * Copyright (c) Remix Software Inc. @@ -64,7 +64,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function Q1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function X1(e,t){return e.button===0&&(!t||t==="_self")&&!Q1(e)}const Z1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],J1="6";try{window.__reactRouterVersion=J1}catch{}const e0="startTransition",pf=Wm[e0];function t0(e){let{basename:t,children:r,future:n,window:i}=e,s=P.useRef();s.current==null&&(s.current=s1({window:i,v5Compat:!0}));let a=s.current,[o,l]=P.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},f=P.useCallback(c=>{u&&pf?pf(()=>l(c)):l(c)},[l,u]);return P.useLayoutEffect(()=>a.listen(f),[a,f]),P.createElement(W1,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const r0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",n0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zn=P.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:u,preventScrollReset:f,unstable_viewTransition:c}=t,d=Y1(t,Z1),{basename:g}=P.useContext(wr),m,y=!1;if(typeof u=="string"&&n0.test(u)&&(m=u,r0))try{let v=new URL(window.location.href),w=u.startsWith("//")?new URL(v.protocol+u):new URL(u),x=Cu(w.pathname,g);w.origin===v.origin&&x!=null?u=x+w.search+w.hash:y=!0}catch{}let _=N1(u,{relative:i}),p=i0(u,{replace:a,state:o,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:c});function h(v){n&&n(v),v.defaultPrevented||p(v)}return P.createElement("a",vl({},d,{href:m||_,onClick:y||s?n:h,ref:r,target:l}))});var vf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vf||(vf={}));var mf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mf||(mf={}));function i0(e,t){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:o}=t===void 0?{}:t,l=F1(),u=ra(),f=rv(e,{relative:a});return P.useCallback(c=>{if(X1(c,r)){c.preventDefault();let d=n!==void 0?n:Cs(u)===Cs(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:o})}},[u,l,f,n,i,r,e,s,a,o])}function na(){return E.jsxs("div",{className:"bg-footer-background text-footer-text p-4 justify-center h-[15%] flex items-center gap-1",children:[E.jsx("span",{className:"text-[1.5rem]",children:"©"})," 2024 #VANLLIFE"]})}function sv({children:e}){return E.jsx("button",{className:"bg-orange p-5 rounded-lg w-full font-bold",children:e})}function s0(){return E.jsxs("div",{className:"home-content h-[85%] home",children:[E.jsxs("div",{className:"image w-full h-[85%] text-white p-6 flex flex-col justify-around",children:[E.jsx("p",{className:"text-[3rem] font-bold ",children:"You got the travel plans, we got the travel vans."}),E.jsx("p",{className:"",children:"Add adventure to your life by joining the #vanlife movement. Rent the perfect van to make your perfect road trip."}),E.jsx(sv,{children:"Find your Van"})]}),E.jsx(na,{})]})}function a0(){return E.jsxs("div",{className:" h-[85%]",children:[E.jsx("div",{className:"image2 h-[90%]"}),E.jsxs("div",{className:"bg-main-background flex flex-col p-6 gap-10 ",children:[E.jsx("p",{className:"text-normal-text font-bold text-[2rem]",children:"Don’t squeeze in a sedan when you could relax in a van."}),E.jsxs("div",{className:"flex flex-col gap-16 text-[1.2rem]",children:[E.jsx("p",{children:"Our mission is to enliven your road trip with the perfect travel van rental. Our vans are recertified before each trip to ensure your travel plans can go off without a hitch. (Hitch costs extra 😉)"}),E.jsx("p",{children:"Our team is full of vanlife enthusiasts who know firsthand the magic of touring the world on 4 wheels."})]}),E.jsxs("div",{className:"bg-light-orange rounded-lg flex flex-col gap-10 p-10 mb-10",children:[E.jsx("p",{className:"font-bold text-normal-text text-[1.5rem] ",children:"Your destination is waiting. Your van is ready."}),E.jsx("button",{className:"text-white font-semibold bg-black w-fit p-5 rounded-lg",children:"Explore our vans"})]})]}),E.jsx(na,{})]})}function Ln({children:e,type:t}){let r;return t==="simple"?r="bg-orange-button":t==="rugged"?r="bg-green-button":t==="luxury"?r="bg-black-button":r="bg-light-beige",E.jsx("button",{className:` px-5 py-2 rounded-md ${r} ${r==="bg-light-beige"?"text-gray-text":"text-white capitalize car-button"}`,children:e})}function o0({id:e,name:t,price:r,description:n,image:i,type:s}){return E.jsx("div",{className:"flex flex-col gap-5",children:E.jsxs(zn,{to:`/VanLife/vanDetails/${e}`,children:[E.jsxs("div",{className:"flex flex-col gap-8",children:[E.jsx("img",{src:i,alt:"Photo",className:"rounded-md w-full"}),E.jsxs("div",{className:"flex justify-between items-center font-bold text-[1.2rem]",children:[E.jsx("p",{children:t}),E.jsxs("p",{className:"",children:["$",r," / day"]})]})]}),E.jsx(Ln,{type:s,children:s})]})})}function l0(){const[e,t]=Ne.useState([]);return Ne.useEffect(()=>{fetch("/api/vans").then(r=>r.json()).then(r=>t(r.vans))},[]),E.jsxs("div",{className:"bg-main-background ",children:[E.jsxs("div",{className:"p-10 flex gap-10 flex-col",children:[E.jsx("p",{className:"font-bold text-[2rem]",children:"Explore our van options"}),E.jsxs("div",{className:"flex items-center justify-between text-gray-text flex-wrap gap-4",children:[E.jsxs("div",{className:"flex gap-5 flex-wrap",children:[E.jsx(Ln,{type:"bg-light-beige",children:"Simple"}),E.jsx(Ln,{type:"bg-light-beige",children:"Luxury"}),E.jsx(Ln,{type:"bg-light-beige",children:"Rugged"})]}),E.jsxs("div",{className:"",children:[E.jsx("button",{children:"Clear filters"}),E.jsx("p",{className:"w-full h-[0.1rem] bg-gray-text"})]})]}),E.jsx("div",{className:"grid grid-cols-3 gap-10 car-content",children:e.map(r=>E.jsx(o0,{id:r.id,description:r.description,image:r.imageUrl,name:r.name,price:r.price,type:r.type},r.id))})]}),E.jsx(na,{})]})}var av={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gf=Ne.createContext&&Ne.createContext(av),u0=["attr","size","title"];function c0(e,t){if(e==null)return{};var r=f0(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function f0(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ts(){return Ts=Object.assign?Object.assign.bind():function(e){for(var t=1;tNe.createElement(t.tag,As({key:r},t.attr),ov(t.child)))}function v0(e){return t=>Ne.createElement(m0,Ts({attr:As({},e.attr)},t),ov(e.child))}function m0(e){var t=r=>{var{attr:n,size:i,title:s}=e,a=c0(e,u0),o=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),Ne.createElement("svg",Ts({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:l,style:As(As({color:e.color||r.color},r.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),s&&Ne.createElement("title",null,s),e.children)};return gf!==void 0?Ne.createElement(gf.Consumer,null,r=>t(r)):t(av)}function g0(e){return v0({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(e)}function y0(){const e=k1(),[t,r]=Ne.useState(null);return Ne.useEffect(()=>{fetch(`/api/vans/${e.id}`).then(n=>n.json()).then(n=>r(n.vans))},[e.id]),console.log(t),E.jsxs("div",{children:[t===null?E.jsx("span",{className:"loader"}):E.jsxs("div",{className:"bg-main-background p-10 flex flex-col gap-10",children:[E.jsx(zn,{to:"/vans",children:E.jsxs("div",{className:"flex items-center gap-4 hover:cursor-pointer",children:[E.jsx(g0,{className:"text-gray-text"}),E.jsx("button",{className:"underline decoration-solid font-semibold",children:"Back to all vans"})]})}),E.jsxs("div",{className:"flex flex-col gap-10",children:[E.jsx("img",{src:t.imageUrl,alt:"Photo of car",className:"rounded-lg max-w-[40rem]"}),E.jsx("p",{children:E.jsx(Ln,{type:t.type,children:t.type})}),E.jsx("p",{className:"font-bold text-[2rem]",children:t.name}),E.jsxs("p",{className:"text-[1.5rem] text-gray-text",children:[E.jsxs("span",{className:"font-bold text-normal-text",children:["$",t.price]}),"/day"]}),E.jsx("p",{className:"text-normal-text text-[1.2rem] font-medium",children:t.description}),E.jsx(sv,{children:E.jsx("p",{className:"text-white",children:"Rent this van"})})]})]}),E.jsx(na,{})]})}var w0=typeof De=="object"&&De&&De.Object===Object&&De,lv=w0,_0=lv,S0=typeof self=="object"&&self&&self.Object===Object&&self,E0=_0||S0||Function("return this")(),ut=E0,x0=ut,$0=x0.Symbol,nn=$0,wf=nn,uv=Object.prototype,C0=uv.hasOwnProperty,P0=uv.toString,En=wf?wf.toStringTag:void 0;function T0(e){var t=C0.call(e,En),r=e[En];try{e[En]=void 0;var n=!0}catch{}var i=P0.call(e);return n&&(t?e[En]=r:delete e[En]),i}var A0=T0,R0=Object.prototype,O0=R0.toString;function N0(e){return O0.call(e)}var F0=N0,_f=nn,I0=A0,k0=F0,b0="[object Null]",M0="[object Undefined]",Sf=_f?_f.toStringTag:void 0;function j0(e){return e==null?e===void 0?M0:b0:Sf&&Sf in Object(e)?I0(e):k0(e)}var sn=j0;function z0(e,t){return function(r){return e(t(r))}}var cv=z0,L0=cv,D0=L0(Object.getPrototypeOf,Object),Tu=D0;function U0(e){return e!=null&&typeof e=="object"}var Zt=U0,B0=sn,H0=Tu,K0=Zt,q0="[object Object]",V0=Function.prototype,W0=Object.prototype,fv=V0.toString,G0=W0.hasOwnProperty,Y0=fv.call(Object);function Q0(e){if(!K0(e)||B0(e)!=q0)return!1;var t=H0(e);if(t===null)return!0;var r=G0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&fv.call(r)==Y0}var X0=Q0;const ml=ne(X0);function Z0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var St=Z0,J0=sn,ew=St,tw="[object AsyncFunction]",rw="[object Function]",nw="[object GeneratorFunction]",iw="[object Proxy]";function sw(e){if(!ew(e))return!1;var t=J0(e);return t==rw||t==nw||t==tw||t==iw}var Au=sw;const Ef=ne(Au);var aw=ut,ow=aw["__core-js_shared__"],lw=ow,eo=lw,xf=function(){var e=/[^.]+$/.exec(eo&&eo.keys&&eo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function uw(e){return!!xf&&xf in e}var cw=uw,fw=Function.prototype,dw=fw.toString;function hw(e){if(e!=null){try{return dw.call(e)}catch{}try{return e+""}catch{}}return""}var dv=hw,pw=Au,vw=cw,mw=St,gw=dv,yw=/[\\^$.*+?()[\]{}|]/g,ww=/^\[object .+?Constructor\]$/,_w=Function.prototype,Sw=Object.prototype,Ew=_w.toString,xw=Sw.hasOwnProperty,$w=RegExp("^"+Ew.call(xw).replace(yw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cw(e){if(!mw(e)||vw(e))return!1;var t=pw(e)?$w:ww;return t.test(gw(e))}var Pw=Cw;function Tw(e,t){return e==null?void 0:e[t]}var Aw=Tw,Rw=Pw,Ow=Aw;function Nw(e,t){var r=Ow(e,t);return Rw(r)?r:void 0}var _r=Nw,Fw=_r,Iw=function(){try{var e=Fw(Object,"defineProperty");return e({},"",{}),e}catch{}}(),hv=Iw,$f=hv;function kw(e,t,r){t=="__proto__"&&$f?$f(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var pv=kw;function bw(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var l=a[e?o:++i];if(r(s[l],l,s)===!1)break}return t}}var Mw=bw,jw=Mw,zw=jw(),vv=zw;function Lw(e,t){for(var r=-1,n=Array(e);++r-1&&e%1==0&&e-1&&e%1==0&&e<=r_}var Ru=n_,i_=sn,s_=Ru,a_=Zt,o_="[object Arguments]",l_="[object Array]",u_="[object Boolean]",c_="[object Date]",f_="[object Error]",d_="[object Function]",h_="[object Map]",p_="[object Number]",v_="[object Object]",m_="[object RegExp]",g_="[object Set]",y_="[object String]",w_="[object WeakMap]",__="[object ArrayBuffer]",S_="[object DataView]",E_="[object Float32Array]",x_="[object Float64Array]",$_="[object Int8Array]",C_="[object Int16Array]",P_="[object Int32Array]",T_="[object Uint8Array]",A_="[object Uint8ClampedArray]",R_="[object Uint16Array]",O_="[object Uint32Array]",H={};H[E_]=H[x_]=H[$_]=H[C_]=H[P_]=H[T_]=H[A_]=H[R_]=H[O_]=!0;H[o_]=H[l_]=H[__]=H[u_]=H[S_]=H[c_]=H[f_]=H[d_]=H[h_]=H[p_]=H[v_]=H[m_]=H[g_]=H[y_]=H[w_]=!1;function N_(e){return a_(e)&&s_(e.length)&&!!H[i_(e)]}var F_=N_;function I_(e){return function(t){return e(t)}}var Ou=I_,Os={exports:{}};Os.exports;(function(e,t){var r=lv,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o})(Os,Os.exports);var Nu=Os.exports,k_=F_,b_=Ou,Pf=Nu,Tf=Pf&&Pf.isTypedArray,M_=Tf?b_(Tf):k_,Fu=M_,j_=Dw,z_=ia,L_=Ve,D_=sa,U_=aa,B_=Fu,H_=Object.prototype,K_=H_.hasOwnProperty;function q_(e,t){var r=L_(e),n=!r&&z_(e),i=!r&&!n&&D_(e),s=!r&&!n&&!i&&B_(e),a=r||n||i||s,o=a?j_(e.length,String):[],l=o.length;for(var u in e)(t||K_.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||U_(u,l)))&&o.push(u);return o}var gv=q_,V_=Object.prototype;function W_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||V_;return e===r}var di=W_,G_=cv,Y_=G_(Object.keys,Object),Q_=Y_,X_=di,Z_=Q_,J_=Object.prototype,eS=J_.hasOwnProperty;function tS(e){if(!X_(e))return Z_(e);var t=[];for(var r in Object(e))eS.call(e,r)&&r!="constructor"&&t.push(r);return t}var yv=tS,rS=Au,nS=Ru;function iS(e){return e!=null&&nS(e.length)&&!rS(e)}var Et=iS,sS=gv,aS=yv,oS=Et;function lS(e){return oS(e)?sS(e):aS(e)}var Jt=lS,uS=vv,cS=Jt;function fS(e,t){return e&&uS(e,t,cS)}var dS=fS;function hS(){this.__data__=[],this.size=0}var pS=hS;function vS(e,t){return e===t||e!==e&&t!==t}var oa=vS,mS=oa;function gS(e,t){for(var r=e.length;r--;)if(mS(e[r][0],t))return r;return-1}var la=gS,yS=la,wS=Array.prototype,_S=wS.splice;function SS(e){var t=this.__data__,r=yS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():_S.call(t,r,1),--this.size,!0}var ES=SS,xS=la;function $S(e){var t=this.__data__,r=xS(t,e);return r<0?void 0:t[r][1]}var CS=$S,PS=la;function TS(e){return PS(this.__data__,e)>-1}var AS=TS,RS=la;function OS(e,t){var r=this.__data__,n=RS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var NS=OS,FS=pS,IS=ES,kS=CS,bS=AS,MS=NS;function an(e){var t=-1,r=e==null?0:e.length;for(this.clear();++to))return!1;var u=s.get(e),f=s.get(t);if(u&&f)return u==t&&f==e;var c=-1,d=!0,g=r&_x?new mx:void 0;for(s.set(e,t),s.set(t,e);++c-1}var WP=VP;function GP(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=u2){var u=t?null:o2(e);if(u)return l2(u);a=!1,i=a2,l=new n2}else l=t?[]:o;e:for(;++n0&&r(o)?t>1?Lv(o,t-1,r,n,i):m2(i,o):n||(i[i.length]=o)}return i}var y2=Lv,w2=y2;function _2(e){var t=e==null?0:e.length;return t?w2(e,1):[]}var Dv=_2;const Uv=ne(Dv);var S2=Object.prototype.toString;function E2(e){return S2.call(e)==="[object Function]"}var Bv=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Fs=function(){function e(t,r){for(var n=0;n=0;r--)e[r]===t&&Array.prototype.splice.call(e,r,1)}function x2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var io={},Jf=function(){Fs(e,null,[{key:"getInstance",value:function(r){return io[r]=io[r]||new e,io[r]}}]);function e(){Bv(this,e),this.plurals=[],this.singulars=[],this.uncountables=[],this.humans=[],this.acronyms={},this.acronymRegex=/(?=a)b/}return Fs(e,[{key:"acronym",value:function(r){this.acronyms[r.toLowerCase()]=r;var n=[];for(var i in this.acronyms)x2(this.acronyms,i)&&n.push(this.acronyms[i]);this.acronymRegex=new RegExp(n.join("|"))}},{key:"plural",value:function(r,n){typeof r=="string"&&xr(this.uncountables,r),xr(this.uncountables,n),this.plurals.unshift([r,n])}},{key:"singular",value:function(r,n){typeof r=="string"&&xr(this.uncountables,r),xr(this.uncountables,n),this.singulars.unshift([r,n])}},{key:"irregular",value:function(r,n){xr(this.uncountables,r),xr(this.uncountables,n);var i=r[0],s=r.substr(1),a=n[0],o=n.substr(1);if(i.toUpperCase()===a.toUpperCase())this.plural(new RegExp("("+i+")"+s+"$","i"),"$1"+o),this.plural(new RegExp("("+a+")"+o+"$","i"),"$1"+o),this.singular(new RegExp("("+i+")"+s+"$","i"),"$1"+s),this.singular(new RegExp("("+a+")"+o+"$","i"),"$1"+s);else{var l=Zf(s),u=Zf(o);this.plural(new RegExp(i.toUpperCase()+l+"$"),a.toUpperCase()+o),this.plural(new RegExp(i.toLowerCase()+l+"$"),a.toLowerCase()+o),this.plural(new RegExp(a.toUpperCase()+u+"$"),a.toUpperCase()+o),this.plural(new RegExp(a.toLowerCase()+u+"$"),a.toLowerCase()+o),this.singular(new RegExp(i.toUpperCase()+l+"$"),i.toUpperCase()+s),this.singular(new RegExp(i.toLowerCase()+l+"$"),i.toLowerCase()+s),this.singular(new RegExp(a.toUpperCase()+u+"$"),i.toUpperCase()+s),this.singular(new RegExp(a.toLowerCase()+u+"$"),i.toLowerCase()+s)}}},{key:"uncountable",value:function(){for(var r=arguments.length,n=Array(r),i=0;i0&&arguments[0]!==void 0?arguments[0]:"all";r==="all"?(this.plurals=[],this.singulars=[],this.uncountables=[],this.humans=[]):this[r]=[]}}]),e}();function $2(e){e.plural(/$/,"s"),e.plural(/s$/i,"s"),e.plural(/^(ax|test)is$/i,"$1es"),e.plural(/(octop|vir)us$/i,"$1i"),e.plural(/(octop|vir)i$/i,"$1i"),e.plural(/(alias|status)$/i,"$1es"),e.plural(/(bu)s$/i,"$1ses"),e.plural(/(buffal|tomat)o$/i,"$1oes"),e.plural(/([ti])um$/i,"$1a"),e.plural(/([ti])a$/i,"$1a"),e.plural(/sis$/i,"ses"),e.plural(/(?:([^f])fe|([lr])f)$/i,"$1$2ves"),e.plural(/(hive)$/i,"$1s"),e.plural(/([^aeiouy]|qu)y$/i,"$1ies"),e.plural(/(x|ch|ss|sh)$/i,"$1es"),e.plural(/(matr|vert|ind)(?:ix|ex)$/i,"$1ices"),e.plural(/^(m|l)ouse$/i,"$1ice"),e.plural(/^(m|l)ice$/i,"$1ice"),e.plural(/^(ox)$/i,"$1en"),e.plural(/^(oxen)$/i,"$1"),e.plural(/(quiz)$/i,"$1zes"),e.singular(/s$/i,""),e.singular(/(ss)$/i,"$1"),e.singular(/(n)ews$/i,"$1ews"),e.singular(/([ti])a$/i,"$1um"),e.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i,"$1sis"),e.singular(/(^analy)(sis|ses)$/i,"$1sis"),e.singular(/([^f])ves$/i,"$1fe"),e.singular(/(hive)s$/i,"$1"),e.singular(/(tive)s$/i,"$1"),e.singular(/([lr])ves$/i,"$1f"),e.singular(/([^aeiouy]|qu)ies$/i,"$1y"),e.singular(/(s)eries$/i,"$1eries"),e.singular(/(m)ovies$/i,"$1ovie"),e.singular(/(x|ch|ss|sh)es$/i,"$1"),e.singular(/^(m|l)ice$/i,"$1ouse"),e.singular(/(bus)(es)?$/i,"$1"),e.singular(/(o)es$/i,"$1"),e.singular(/(shoe)s$/i,"$1"),e.singular(/(cris|test)(is|es)$/i,"$1is"),e.singular(/^(a)x[ie]s$/i,"$1xis"),e.singular(/(octop|vir)(us|i)$/i,"$1us"),e.singular(/(alias|status)(es)?$/i,"$1"),e.singular(/^(ox)en/i,"$1"),e.singular(/(vert|ind)ices$/i,"$1ex"),e.singular(/(matr)ices$/i,"$1ix"),e.singular(/(quiz)zes$/i,"$1"),e.singular(/(database)s$/i,"$1"),e.irregular("person","people"),e.irregular("man","men"),e.irregular("child","children"),e.irregular("sex","sexes"),e.irregular("move","moves"),e.irregular("zombie","zombies"),e.uncountable("equipment","information","rice","money","species","series","fish","sheep","jeans","police")}var ed={en:$2};function mr(e,t){if(E2(e)&&(t=e,e=null),e=e||"en",t)t(Jf.getInstance(e));else return Jf.getInstance(e)}for(var td in ed)mr(td,ed[td]);function Hv(e,t){var r=""+e,n,i,s;if(r.length===0)return r;var a=r.toLowerCase().match(/\b\w+$/);if(a&&mr().uncountables.indexOf(a[0])>-1)return r;for(var o=0,l=t.length;o1&&arguments[1]!==void 0?arguments[1]:"en";return Hv(e,mr(t).plurals)}function qv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en";return Hv(e,mr(t).singulars)}function Vv(e){var t=e==null?"":String(e);return t.charAt(0).toUpperCase()+t.slice(1)}function C2(e,t){var r=""+e;return r=r.replace(new RegExp("^(?:"+mr().acronymRegex.source+"(?=\\b|[A-Z_])|\\w)"),function(n){return n.toLowerCase()}),r=r.replace(/(?:_|(\/))([a-z\d]*)/gi,function(n,i,s,a,o){return i||(i=""),""+i+(mr().acronyms[s]||Vv(s))}),r}function P2(e){var t=""+e;return t=t.replace(new RegExp("(?:([A-Za-z\\d])|^)("+mr().acronymRegex.source+")(?=\\b|[^a-z])","g"),function(r,n,i){return""+(n||"")+(n?"_":"")+i.toLowerCase()}),t=t.replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2"),t=t.replace(/([a-z\d])([A-Z])/g,"$1_$2"),t=t.replace(/-/g,"_"),t.toLowerCase()}function T2(e){return e.replace(/_/g,"-")}var rd={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O","×":"x",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",Þ:"Th",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",þ:"th",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",ĝ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"L",ł:"l",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"'n",Ŋ:"NG",ŋ:"ng",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"E",Ж:"ZH",З:"Z",И:"I",Й:"J",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"KH",Ц:"C",Ч:"CH",Ш:"SH",Щ:"SHCH",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"YU",Я:"YA",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"shch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},A2="?",so={};(function(){Fs(e,null,[{key:"getInstance",value:function(r){return so[r]=so[r]||new e,so[r]}}]);function e(){Bv(this,e),this.approximations={};for(var t in rd)this.approximate(t,rd[t])}return Fs(e,[{key:"approximate",value:function(r,n){this.approximations[r]=n}},{key:"transliterate",value:function(r,n){var i=this;return r.replace(/[^\u0000-\u007f]/g,function(s){return i.approximations[s]||n||A2})}}]),e})();function R2(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n=n?e:O2(e,t,r)}var F2=N2,I2="\\ud800-\\udfff",k2="\\u0300-\\u036f",b2="\\ufe20-\\ufe2f",M2="\\u20d0-\\u20ff",j2=k2+b2+M2,z2="\\ufe0e\\ufe0f",L2="\\u200d",D2=RegExp("["+L2+I2+j2+z2+"]");function U2(e){return D2.test(e)}var Gv=U2;function B2(e){return e.split("")}var H2=B2,Yv="\\ud800-\\udfff",K2="\\u0300-\\u036f",q2="\\ufe20-\\ufe2f",V2="\\u20d0-\\u20ff",W2=K2+q2+V2,G2="\\ufe0e\\ufe0f",Y2="["+Yv+"]",El="["+W2+"]",xl="\\ud83c[\\udffb-\\udfff]",Q2="(?:"+El+"|"+xl+")",Qv="[^"+Yv+"]",Xv="(?:\\ud83c[\\udde6-\\uddff]){2}",Zv="[\\ud800-\\udbff][\\udc00-\\udfff]",X2="\\u200d",Jv=Q2+"?",em="["+G2+"]?",Z2="(?:"+X2+"(?:"+[Qv,Xv,Zv].join("|")+")"+em+Jv+")*",J2=em+Jv+Z2,eT="(?:"+[Qv+El+"?",El,Xv,Zv,Y2].join("|")+")",tT=RegExp(xl+"(?="+xl+")|"+eT+J2,"g");function rT(e){return e.match(tT)||[]}var nT=rT,iT=H2,sT=Gv,aT=nT;function oT(e){return sT(e)?aT(e):iT(e)}var lT=oT,uT=F2,cT=Gv,fT=lT,dT=Iv;function hT(e){return function(t){t=dT(t);var r=cT(t)?fT(t):void 0,n=r?r[0]:t.charAt(0),i=r?uT(r,1).join(""):t.slice(1);return n[e]()+i}}var pT=hT,vT=pT,mT=vT("toLowerCase"),gT=mT;const yT=ne(gT);var wT=Lu;function _T(e,t){return wT(e,t)}var ST=_T;const $l=ne(ST);var ET=Et;function xT(e,t){return function(r,n){if(r==null)return r;if(!ET(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s0){if(++t>=SN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var CN=$N,PN=_N,TN=CN,AN=TN(PN),om=AN,RN=pa,ON=am,NN=om;function FN(e,t){return NN(ON(e,t,RN),e+"")}var lm=FN,IN=Ku,kN=tm,bN=dN,MN=lm,jN=Et,zN=MN(function(e,t,r){var n=-1,i=typeof t=="function",s=jN(e)?Array(e.length):[];return kN(e,function(a){s[++n]=i?IN(t,a,r):bN(a,t,r)}),s}),LN=zN;const bt=ne(LN);function DN(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&uI(r[0],r[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++n-1?i[s?t[a]:a]:void 0}}var PI=CI,TI=/\s/;function AI(e){for(var t=e.length;t--&&TI.test(e.charAt(t)););return t}var RI=AI,OI=RI,NI=/^\s+/;function FI(e){return e&&e.slice(0,OI(e)+1).replace(NI,"")}var II=FI,kI=II,vd=St,bI=da,md=NaN,MI=/^[-+]0x[0-9a-f]+$/i,jI=/^0b[01]+$/i,zI=/^0o[0-7]+$/i,LI=parseInt;function DI(e){if(typeof e=="number")return e;if(bI(e))return md;if(vd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=kI(e);var r=jI.test(e);return r||zI.test(e)?LI(e.slice(2),r?2:8):MI.test(e)?md:+e}var UI=DI,BI=UI,gd=1/0,HI=17976931348623157e292;function KI(e){if(!e)return e===0?e:0;if(e=BI(e),e===gd||e===-gd){var t=e<0?-1:1;return t*HI}return e===e?e:0}var qI=KI,VI=qI;function WI(e){var t=VI(e),r=t%1;return t===t?r?t-r:t:0}var cm=WI,GI=zv,YI=va,QI=cm,XI=Math.max;function ZI(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:QI(r);return i<0&&(i=XI(n+i,0)),GI(e,YI(t),i)}var JI=ZI,ek=PI,tk=JI,rk=ek(tk),nk=rk;const oo=ne(nk);var ik=cm;function sk(e){return typeof e=="number"&&e==ik(e)}var ak=sk;const yd=ne(ak);typeof De<"u"&&typeof De.self>"u"&&(De.self={},De.__pretenderNodePolyfill=!0);var ok=Object.create;function Tl(){var e=ok(null);return e.__=void 0,delete e.__,e}var fm=function(t,r,n){this.path=t,this.matcher=r,this.delegate=n};fm.prototype.to=function(t,r){var n=this.delegate;if(n&&n.willAddRoute&&(t=n.willAddRoute(this.matcher.target,t)),this.matcher.add(this.path,t),r){if(r.length===0)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,t,r,this.delegate)}};var ks=function(t){this.routes=Tl(),this.children=Tl(),this.target=t};ks.prototype.add=function(t,r){this.routes[t]=r};ks.prototype.addChild=function(t,r,n,i){var s=new ks(r);this.children[t]=s;var a=qu(t,s,i);i&&i.contextEntered&&i.contextEntered(r,a),n(a)};function qu(e,t,r){function n(i,s){var a=e+i;if(s)s(qu(a,t,r));else return new fm(a,t,r)}return n}function lk(e,t,r){for(var n=0,i=0;i0&&t.charCodeAt(0)===47&&(t=t.substr(1));for(var n=t.split("/"),i=void 0,s=void 0,a=0;a2&&a.slice(o-2)==="[]"&&(l=!0,a=a.slice(0,o-2),n[a]||(n[a]=[])),u=s[1]?Ed(s[1]):""),l?n[a].push(u):n[a]=u}return n};Z.prototype.recognize=function(t){var r,n=[this.rootState],i={},s=!1,a=t.indexOf("#");a!==-1&&(t=t.substr(0,a));var o=t.indexOf("?");if(o!==-1){var l=t.substr(o+1,t.length);t=t.substr(0,o),i=this.parseQueryString(l)}t.charAt(0)!=="/"&&(t="/"+t);var u=t;Z.ENCODE_AND_DECODE_PATH_SEGMENTS?t=hm(t):(t=decodeURI(t),u=decodeURI(u));var f=t.length;f>1&&t.charAt(f-1)==="/"&&(t=t.substr(0,f-1),u=u.substr(0,u.length-1),s=!0);for(var c=0;c=0)&&(r[i]=e[i]);return r}function J1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function e0(e,t){return e.button===0&&(!t||t==="_self")&&!J1(e)}const t0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],r0="6";try{window.__reactRouterVersion=r0}catch{}const n0="startTransition",pf=Wm[n0];function i0(e){let{basename:t,children:r,future:n,window:i}=e,s=$.useRef();s.current==null&&(s.current=s1({window:i,v5Compat:!0}));let a=s.current,[o,l]=$.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},f=$.useCallback(c=>{u&&pf?pf(()=>l(c)):l(c)},[l,u]);return $.useLayoutEffect(()=>a.listen(f),[a,f]),$.createElement(Q1,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const s0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zn=$.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:u,preventScrollReset:f,unstable_viewTransition:c}=t,d=Z1(t,t0),{basename:g}=$.useContext(wr),m,y=!1;if(typeof u=="string"&&a0.test(u)&&(m=u,s0))try{let v=new URL(window.location.href),w=u.startsWith("//")?new URL(v.protocol+u):new URL(u),E=Cu(w.pathname,g);w.origin===v.origin&&E!=null?u=E+w.search+w.hash:y=!0}catch{}let _=N1(u,{relative:i}),p=o0(u,{replace:a,state:o,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:c});function h(v){n&&n(v),v.defaultPrevented||p(v)}return $.createElement("a",vl({},d,{href:m||_,onClick:y||s?n:h,ref:r,target:l}))});var vf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vf||(vf={}));var mf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mf||(mf={}));function o0(e,t){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:o}=t===void 0?{}:t,l=F1(),u=ra(),f=rv(e,{relative:a});return $.useCallback(c=>{if(e0(c,r)){c.preventDefault();let d=n!==void 0?n:Cs(u)===Cs(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:o})}},[u,l,f,n,i,r,e,s,a,o])}function na(){return x.jsxs("div",{className:"bg-footer-background text-footer-text p-4 justify-center h-[15%] flex items-center gap-1",children:[x.jsx("span",{className:"text-[1.5rem]",children:"©"})," 2024 #VANLLIFE"]})}function sv({children:e}){return x.jsx("button",{className:"bg-orange p-5 rounded-lg w-full font-bold",children:e})}function l0(){return x.jsxs("div",{className:"home-content h-[85%] home",children:[x.jsxs("div",{className:"image h-[85%] text-white p-6 flex flex-col justify-around",children:[x.jsx("p",{className:"text-[3rem] font-bold ",children:"You got the travel plans, we got the travel vans."}),x.jsx("p",{className:"",children:"Add adventure to your life by joining the #vanlife movement. Rent the perfect van to make your perfect road trip."}),x.jsx(sv,{children:"Find your Van"})]}),x.jsx(na,{})]})}function u0(){return x.jsxs("div",{className:" h-[85%]",children:[x.jsx("div",{className:"image2 h-[90%]"}),x.jsxs("div",{className:"bg-main-background flex flex-col p-6 gap-10 ",children:[x.jsx("p",{className:"text-normal-text font-bold text-[2rem]",children:"Don’t squeeze in a sedan when you could relax in a van."}),x.jsxs("div",{className:"flex flex-col gap-16 text-[1.2rem]",children:[x.jsx("p",{children:"Our mission is to enliven your road trip with the perfect travel van rental. Our vans are recertified before each trip to ensure your travel plans can go off without a hitch. (Hitch costs extra 😉)"}),x.jsx("p",{children:"Our team is full of vanlife enthusiasts who know firsthand the magic of touring the world on 4 wheels."})]}),x.jsxs("div",{className:"bg-light-orange rounded-lg flex flex-col gap-10 p-10 mb-10",children:[x.jsx("p",{className:"font-bold text-normal-text text-[1.5rem] ",children:"Your destination is waiting. Your van is ready."}),x.jsx("button",{className:"text-white font-semibold bg-black w-fit p-5 rounded-lg",children:"Explore our vans"})]})]}),x.jsx(na,{})]})}function Ln({children:e,type:t}){let r;return t==="simple"?r="bg-orange-button":t==="rugged"?r="bg-green-button":t==="luxury"?r="bg-black-button":r="bg-light-beige",x.jsx("button",{className:` px-5 py-2 rounded-md ${r} ${r==="bg-light-beige"?"text-gray-text":"text-white capitalize car-button"}`,children:e})}function c0({id:e,name:t,price:r,description:n,image:i,type:s}){return x.jsx("div",{className:"flex flex-col gap-5",children:x.jsxs(zn,{to:`/VanLife/vanDetails/${e}`,children:[x.jsxs("div",{className:"flex flex-col gap-8",children:[x.jsx("img",{src:i,alt:"Photo",className:"rounded-md w-full"}),x.jsxs("div",{className:"flex justify-between items-center font-bold text-[1.2rem]",children:[x.jsx("p",{children:t}),x.jsxs("p",{className:"",children:["$",r," / day"]})]})]}),x.jsx(Ln,{type:s,children:s})]})})}function f0(){const[e,t]=Ne.useState([]);return Ne.useEffect(()=>{fetch("/api/vans").then(r=>r.json()).then(r=>t(r.vans))},[]),x.jsxs("div",{className:"bg-main-background ",children:[x.jsxs("div",{className:"p-10 flex gap-10 flex-col",children:[x.jsx("p",{className:"font-bold text-[2rem]",children:"Explore our van options"}),x.jsxs("div",{className:"flex items-center justify-between text-gray-text flex-wrap gap-4",children:[x.jsxs("div",{className:"flex gap-5 flex-wrap",children:[x.jsx(Ln,{type:"bg-light-beige",children:"Simple"}),x.jsx(Ln,{type:"bg-light-beige",children:"Luxury"}),x.jsx(Ln,{type:"bg-light-beige",children:"Rugged"})]}),x.jsxs("div",{className:"",children:[x.jsx("button",{children:"Clear filters"}),x.jsx("p",{className:"w-full h-[0.1rem] bg-gray-text"})]})]}),x.jsx("div",{className:"grid grid-cols-3 gap-10 car-content",children:e.map(r=>x.jsx(c0,{id:r.id,description:r.description,image:r.imageUrl,name:r.name,price:r.price,type:r.type},r.id))})]}),x.jsx(na,{})]})}var av={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gf=Ne.createContext&&Ne.createContext(av),d0=["attr","size","title"];function h0(e,t){if(e==null)return{};var r=p0(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function p0(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ts(){return Ts=Object.assign?Object.assign.bind():function(e){for(var t=1;tNe.createElement(t.tag,As({key:r},t.attr),ov(t.child)))}function y0(e){return t=>Ne.createElement(w0,Ts({attr:As({},e.attr)},t),ov(e.child))}function w0(e){var t=r=>{var{attr:n,size:i,title:s}=e,a=h0(e,d0),o=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),Ne.createElement("svg",Ts({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:l,style:As(As({color:e.color||r.color},r.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),s&&Ne.createElement("title",null,s),e.children)};return gf!==void 0?Ne.createElement(gf.Consumer,null,r=>t(r)):t(av)}function _0(e){return y0({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(e)}function S0(){const e=M1(),[t,r]=Ne.useState(null);return Ne.useEffect(()=>{fetch(`/api/vans/${e.id}`).then(n=>n.json()).then(n=>r(n.vans))},[e.id]),console.log(t),x.jsxs("div",{children:[t===null?x.jsx("span",{className:"loader"}):x.jsxs("div",{className:"bg-main-background p-10 flex flex-col gap-10",children:[x.jsx(zn,{to:"/vans",children:x.jsxs("div",{className:"flex items-center gap-4 hover:cursor-pointer",children:[x.jsx(_0,{className:"text-gray-text"}),x.jsx("button",{className:"underline decoration-solid font-semibold",children:"Back to all vans"})]})}),x.jsxs("div",{className:"flex flex-col gap-10",children:[x.jsx("img",{src:t.imageUrl,alt:"Photo of car",className:"rounded-lg max-w-[40rem]"}),x.jsx("p",{children:x.jsx(Ln,{type:t.type,children:t.type})}),x.jsx("p",{className:"font-bold text-[2rem]",children:t.name}),x.jsxs("p",{className:"text-[1.5rem] text-gray-text",children:[x.jsxs("span",{className:"font-bold text-normal-text",children:["$",t.price]}),"/day"]}),x.jsx("p",{className:"text-normal-text text-[1.2rem] font-medium",children:t.description}),x.jsx(sv,{children:x.jsx("p",{className:"text-white",children:"Rent this van"})})]})]}),x.jsx(na,{})]})}function x0(){return x.jsxs("header",{className:"bg-main-background flex justify-between p-5 items-center h-[15%]",children:[x.jsx(zn,{to:"/VanLife/",className:" font-extrabold text-[2rem]",children:"#VANLIFE"}),x.jsxs("nav",{className:"flex gap-5 text-gray-text font-semibold",children:[x.jsx(zn,{to:"/VanLife/about",children:"About"}),x.jsx(zn,{to:"/VanLife/vans",children:"Vans"})]})]})}function E0(){return x.jsxs("div",{className:"h-screen",children:[x.jsx(x0,{}),x.jsx(Y1,{})]})}var $0=typeof De=="object"&&De&&De.Object===Object&&De,lv=$0,C0=lv,P0=typeof self=="object"&&self&&self.Object===Object&&self,T0=C0||P0||Function("return this")(),ut=T0,A0=ut,R0=A0.Symbol,sn=R0,wf=sn,uv=Object.prototype,O0=uv.hasOwnProperty,N0=uv.toString,En=wf?wf.toStringTag:void 0;function F0(e){var t=O0.call(e,En),r=e[En];try{e[En]=void 0;var n=!0}catch{}var i=N0.call(e);return n&&(t?e[En]=r:delete e[En]),i}var I0=F0,k0=Object.prototype,b0=k0.toString;function M0(e){return b0.call(e)}var j0=M0,_f=sn,z0=I0,L0=j0,D0="[object Null]",U0="[object Undefined]",Sf=_f?_f.toStringTag:void 0;function B0(e){return e==null?e===void 0?U0:D0:Sf&&Sf in Object(e)?z0(e):L0(e)}var an=B0;function H0(e,t){return function(r){return e(t(r))}}var cv=H0,K0=cv,q0=K0(Object.getPrototypeOf,Object),Tu=q0;function V0(e){return e!=null&&typeof e=="object"}var Zt=V0,W0=an,G0=Tu,Y0=Zt,Q0="[object Object]",X0=Function.prototype,Z0=Object.prototype,fv=X0.toString,J0=Z0.hasOwnProperty,ew=fv.call(Object);function tw(e){if(!Y0(e)||W0(e)!=Q0)return!1;var t=G0(e);if(t===null)return!0;var r=J0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&fv.call(r)==ew}var rw=tw;const ml=ne(rw);function nw(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xt=nw,iw=an,sw=xt,aw="[object AsyncFunction]",ow="[object Function]",lw="[object GeneratorFunction]",uw="[object Proxy]";function cw(e){if(!sw(e))return!1;var t=iw(e);return t==ow||t==lw||t==aw||t==uw}var Au=cw;const xf=ne(Au);var fw=ut,dw=fw["__core-js_shared__"],hw=dw,eo=hw,Ef=function(){var e=/[^.]+$/.exec(eo&&eo.keys&&eo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pw(e){return!!Ef&&Ef in e}var vw=pw,mw=Function.prototype,gw=mw.toString;function yw(e){if(e!=null){try{return gw.call(e)}catch{}try{return e+""}catch{}}return""}var dv=yw,ww=Au,_w=vw,Sw=xt,xw=dv,Ew=/[\\^$.*+?()[\]{}|]/g,$w=/^\[object .+?Constructor\]$/,Cw=Function.prototype,Pw=Object.prototype,Tw=Cw.toString,Aw=Pw.hasOwnProperty,Rw=RegExp("^"+Tw.call(Aw).replace(Ew,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ow(e){if(!Sw(e)||_w(e))return!1;var t=ww(e)?Rw:$w;return t.test(xw(e))}var Nw=Ow;function Fw(e,t){return e==null?void 0:e[t]}var Iw=Fw,kw=Nw,bw=Iw;function Mw(e,t){var r=bw(e,t);return kw(r)?r:void 0}var _r=Mw,jw=_r,zw=function(){try{var e=jw(Object,"defineProperty");return e({},"",{}),e}catch{}}(),hv=zw,$f=hv;function Lw(e,t,r){t=="__proto__"&&$f?$f(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var pv=Lw;function Dw(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var l=a[e?o:++i];if(r(s[l],l,s)===!1)break}return t}}var Uw=Dw,Bw=Uw,Hw=Bw(),vv=Hw;function Kw(e,t){for(var r=-1,n=Array(e);++r-1&&e%1==0&&e-1&&e%1==0&&e<=o_}var Ru=l_,u_=an,c_=Ru,f_=Zt,d_="[object Arguments]",h_="[object Array]",p_="[object Boolean]",v_="[object Date]",m_="[object Error]",g_="[object Function]",y_="[object Map]",w_="[object Number]",__="[object Object]",S_="[object RegExp]",x_="[object Set]",E_="[object String]",$_="[object WeakMap]",C_="[object ArrayBuffer]",P_="[object DataView]",T_="[object Float32Array]",A_="[object Float64Array]",R_="[object Int8Array]",O_="[object Int16Array]",N_="[object Int32Array]",F_="[object Uint8Array]",I_="[object Uint8ClampedArray]",k_="[object Uint16Array]",b_="[object Uint32Array]",H={};H[T_]=H[A_]=H[R_]=H[O_]=H[N_]=H[F_]=H[I_]=H[k_]=H[b_]=!0;H[d_]=H[h_]=H[C_]=H[p_]=H[P_]=H[v_]=H[m_]=H[g_]=H[y_]=H[w_]=H[__]=H[S_]=H[x_]=H[E_]=H[$_]=!1;function M_(e){return f_(e)&&c_(e.length)&&!!H[u_(e)]}var j_=M_;function z_(e){return function(t){return e(t)}}var Ou=z_,Os={exports:{}};Os.exports;(function(e,t){var r=lv,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o})(Os,Os.exports);var Nu=Os.exports,L_=j_,D_=Ou,Pf=Nu,Tf=Pf&&Pf.isTypedArray,U_=Tf?D_(Tf):L_,Fu=U_,B_=qw,H_=ia,K_=Ve,q_=sa,V_=aa,W_=Fu,G_=Object.prototype,Y_=G_.hasOwnProperty;function Q_(e,t){var r=K_(e),n=!r&&H_(e),i=!r&&!n&&q_(e),s=!r&&!n&&!i&&W_(e),a=r||n||i||s,o=a?B_(e.length,String):[],l=o.length;for(var u in e)(t||Y_.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||V_(u,l)))&&o.push(u);return o}var gv=Q_,X_=Object.prototype;function Z_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||X_;return e===r}var di=Z_,J_=cv,eS=J_(Object.keys,Object),tS=eS,rS=di,nS=tS,iS=Object.prototype,sS=iS.hasOwnProperty;function aS(e){if(!rS(e))return nS(e);var t=[];for(var r in Object(e))sS.call(e,r)&&r!="constructor"&&t.push(r);return t}var yv=aS,oS=Au,lS=Ru;function uS(e){return e!=null&&lS(e.length)&&!oS(e)}var Et=uS,cS=gv,fS=yv,dS=Et;function hS(e){return dS(e)?cS(e):fS(e)}var Jt=hS,pS=vv,vS=Jt;function mS(e,t){return e&&pS(e,t,vS)}var gS=mS;function yS(){this.__data__=[],this.size=0}var wS=yS;function _S(e,t){return e===t||e!==e&&t!==t}var oa=_S,SS=oa;function xS(e,t){for(var r=e.length;r--;)if(SS(e[r][0],t))return r;return-1}var la=xS,ES=la,$S=Array.prototype,CS=$S.splice;function PS(e){var t=this.__data__,r=ES(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():CS.call(t,r,1),--this.size,!0}var TS=PS,AS=la;function RS(e){var t=this.__data__,r=AS(t,e);return r<0?void 0:t[r][1]}var OS=RS,NS=la;function FS(e){return NS(this.__data__,e)>-1}var IS=FS,kS=la;function bS(e,t){var r=this.__data__,n=kS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var MS=bS,jS=wS,zS=TS,LS=OS,DS=IS,US=MS;function on(e){var t=-1,r=e==null?0:e.length;for(this.clear();++to))return!1;var u=s.get(e),f=s.get(t);if(u&&f)return u==t&&f==e;var c=-1,d=!0,g=r&CE?new SE:void 0;for(s.set(e,t),s.set(t,e);++c-1}var ZP=XP;function JP(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=p2){var u=t?null:d2(e);if(u)return h2(u);a=!1,i=f2,l=new l2}else l=t?[]:o;e:for(;++n0&&r(o)?t>1?Lv(o,t-1,r,n,i):S2(i,o):n||(i[i.length]=o)}return i}var E2=Lv,$2=E2;function C2(e){var t=e==null?0:e.length;return t?$2(e,1):[]}var Dv=C2;const Uv=ne(Dv);var P2=Object.prototype.toString;function T2(e){return P2.call(e)==="[object Function]"}var Bv=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Fs=function(){function e(t,r){for(var n=0;n=0;r--)e[r]===t&&Array.prototype.splice.call(e,r,1)}function A2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var io={},Jf=function(){Fs(e,null,[{key:"getInstance",value:function(r){return io[r]=io[r]||new e,io[r]}}]);function e(){Bv(this,e),this.plurals=[],this.singulars=[],this.uncountables=[],this.humans=[],this.acronyms={},this.acronymRegex=/(?=a)b/}return Fs(e,[{key:"acronym",value:function(r){this.acronyms[r.toLowerCase()]=r;var n=[];for(var i in this.acronyms)A2(this.acronyms,i)&&n.push(this.acronyms[i]);this.acronymRegex=new RegExp(n.join("|"))}},{key:"plural",value:function(r,n){typeof r=="string"&&Er(this.uncountables,r),Er(this.uncountables,n),this.plurals.unshift([r,n])}},{key:"singular",value:function(r,n){typeof r=="string"&&Er(this.uncountables,r),Er(this.uncountables,n),this.singulars.unshift([r,n])}},{key:"irregular",value:function(r,n){Er(this.uncountables,r),Er(this.uncountables,n);var i=r[0],s=r.substr(1),a=n[0],o=n.substr(1);if(i.toUpperCase()===a.toUpperCase())this.plural(new RegExp("("+i+")"+s+"$","i"),"$1"+o),this.plural(new RegExp("("+a+")"+o+"$","i"),"$1"+o),this.singular(new RegExp("("+i+")"+s+"$","i"),"$1"+s),this.singular(new RegExp("("+a+")"+o+"$","i"),"$1"+s);else{var l=Zf(s),u=Zf(o);this.plural(new RegExp(i.toUpperCase()+l+"$"),a.toUpperCase()+o),this.plural(new RegExp(i.toLowerCase()+l+"$"),a.toLowerCase()+o),this.plural(new RegExp(a.toUpperCase()+u+"$"),a.toUpperCase()+o),this.plural(new RegExp(a.toLowerCase()+u+"$"),a.toLowerCase()+o),this.singular(new RegExp(i.toUpperCase()+l+"$"),i.toUpperCase()+s),this.singular(new RegExp(i.toLowerCase()+l+"$"),i.toLowerCase()+s),this.singular(new RegExp(a.toUpperCase()+u+"$"),i.toUpperCase()+s),this.singular(new RegExp(a.toLowerCase()+u+"$"),i.toLowerCase()+s)}}},{key:"uncountable",value:function(){for(var r=arguments.length,n=Array(r),i=0;i0&&arguments[0]!==void 0?arguments[0]:"all";r==="all"?(this.plurals=[],this.singulars=[],this.uncountables=[],this.humans=[]):this[r]=[]}}]),e}();function R2(e){e.plural(/$/,"s"),e.plural(/s$/i,"s"),e.plural(/^(ax|test)is$/i,"$1es"),e.plural(/(octop|vir)us$/i,"$1i"),e.plural(/(octop|vir)i$/i,"$1i"),e.plural(/(alias|status)$/i,"$1es"),e.plural(/(bu)s$/i,"$1ses"),e.plural(/(buffal|tomat)o$/i,"$1oes"),e.plural(/([ti])um$/i,"$1a"),e.plural(/([ti])a$/i,"$1a"),e.plural(/sis$/i,"ses"),e.plural(/(?:([^f])fe|([lr])f)$/i,"$1$2ves"),e.plural(/(hive)$/i,"$1s"),e.plural(/([^aeiouy]|qu)y$/i,"$1ies"),e.plural(/(x|ch|ss|sh)$/i,"$1es"),e.plural(/(matr|vert|ind)(?:ix|ex)$/i,"$1ices"),e.plural(/^(m|l)ouse$/i,"$1ice"),e.plural(/^(m|l)ice$/i,"$1ice"),e.plural(/^(ox)$/i,"$1en"),e.plural(/^(oxen)$/i,"$1"),e.plural(/(quiz)$/i,"$1zes"),e.singular(/s$/i,""),e.singular(/(ss)$/i,"$1"),e.singular(/(n)ews$/i,"$1ews"),e.singular(/([ti])a$/i,"$1um"),e.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i,"$1sis"),e.singular(/(^analy)(sis|ses)$/i,"$1sis"),e.singular(/([^f])ves$/i,"$1fe"),e.singular(/(hive)s$/i,"$1"),e.singular(/(tive)s$/i,"$1"),e.singular(/([lr])ves$/i,"$1f"),e.singular(/([^aeiouy]|qu)ies$/i,"$1y"),e.singular(/(s)eries$/i,"$1eries"),e.singular(/(m)ovies$/i,"$1ovie"),e.singular(/(x|ch|ss|sh)es$/i,"$1"),e.singular(/^(m|l)ice$/i,"$1ouse"),e.singular(/(bus)(es)?$/i,"$1"),e.singular(/(o)es$/i,"$1"),e.singular(/(shoe)s$/i,"$1"),e.singular(/(cris|test)(is|es)$/i,"$1is"),e.singular(/^(a)x[ie]s$/i,"$1xis"),e.singular(/(octop|vir)(us|i)$/i,"$1us"),e.singular(/(alias|status)(es)?$/i,"$1"),e.singular(/^(ox)en/i,"$1"),e.singular(/(vert|ind)ices$/i,"$1ex"),e.singular(/(matr)ices$/i,"$1ix"),e.singular(/(quiz)zes$/i,"$1"),e.singular(/(database)s$/i,"$1"),e.irregular("person","people"),e.irregular("man","men"),e.irregular("child","children"),e.irregular("sex","sexes"),e.irregular("move","moves"),e.irregular("zombie","zombies"),e.uncountable("equipment","information","rice","money","species","series","fish","sheep","jeans","police")}var ed={en:R2};function mr(e,t){if(T2(e)&&(t=e,e=null),e=e||"en",t)t(Jf.getInstance(e));else return Jf.getInstance(e)}for(var td in ed)mr(td,ed[td]);function Hv(e,t){var r=""+e,n,i,s;if(r.length===0)return r;var a=r.toLowerCase().match(/\b\w+$/);if(a&&mr().uncountables.indexOf(a[0])>-1)return r;for(var o=0,l=t.length;o1&&arguments[1]!==void 0?arguments[1]:"en";return Hv(e,mr(t).plurals)}function qv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en";return Hv(e,mr(t).singulars)}function Vv(e){var t=e==null?"":String(e);return t.charAt(0).toUpperCase()+t.slice(1)}function O2(e,t){var r=""+e;return r=r.replace(new RegExp("^(?:"+mr().acronymRegex.source+"(?=\\b|[A-Z_])|\\w)"),function(n){return n.toLowerCase()}),r=r.replace(/(?:_|(\/))([a-z\d]*)/gi,function(n,i,s,a,o){return i||(i=""),""+i+(mr().acronyms[s]||Vv(s))}),r}function N2(e){var t=""+e;return t=t.replace(new RegExp("(?:([A-Za-z\\d])|^)("+mr().acronymRegex.source+")(?=\\b|[^a-z])","g"),function(r,n,i){return""+(n||"")+(n?"_":"")+i.toLowerCase()}),t=t.replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2"),t=t.replace(/([a-z\d])([A-Z])/g,"$1_$2"),t=t.replace(/-/g,"_"),t.toLowerCase()}function F2(e){return e.replace(/_/g,"-")}var rd={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O","×":"x",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",Þ:"Th",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",þ:"th",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",ĝ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"L",ł:"l",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"'n",Ŋ:"NG",ŋ:"ng",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"E",Ж:"ZH",З:"Z",И:"I",Й:"J",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"KH",Ц:"C",Ч:"CH",Ш:"SH",Щ:"SHCH",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"YU",Я:"YA",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"j",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"shch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},I2="?",so={};(function(){Fs(e,null,[{key:"getInstance",value:function(r){return so[r]=so[r]||new e,so[r]}}]);function e(){Bv(this,e),this.approximations={};for(var t in rd)this.approximate(t,rd[t])}return Fs(e,[{key:"approximate",value:function(r,n){this.approximations[r]=n}},{key:"transliterate",value:function(r,n){var i=this;return r.replace(/[^\u0000-\u007f]/g,function(s){return i.approximations[s]||n||I2})}}]),e})();function k2(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n=n?e:b2(e,t,r)}var j2=M2,z2="\\ud800-\\udfff",L2="\\u0300-\\u036f",D2="\\ufe20-\\ufe2f",U2="\\u20d0-\\u20ff",B2=L2+D2+U2,H2="\\ufe0e\\ufe0f",K2="\\u200d",q2=RegExp("["+K2+z2+B2+H2+"]");function V2(e){return q2.test(e)}var Gv=V2;function W2(e){return e.split("")}var G2=W2,Yv="\\ud800-\\udfff",Y2="\\u0300-\\u036f",Q2="\\ufe20-\\ufe2f",X2="\\u20d0-\\u20ff",Z2=Y2+Q2+X2,J2="\\ufe0e\\ufe0f",eT="["+Yv+"]",xl="["+Z2+"]",El="\\ud83c[\\udffb-\\udfff]",tT="(?:"+xl+"|"+El+")",Qv="[^"+Yv+"]",Xv="(?:\\ud83c[\\udde6-\\uddff]){2}",Zv="[\\ud800-\\udbff][\\udc00-\\udfff]",rT="\\u200d",Jv=tT+"?",em="["+J2+"]?",nT="(?:"+rT+"(?:"+[Qv,Xv,Zv].join("|")+")"+em+Jv+")*",iT=em+Jv+nT,sT="(?:"+[Qv+xl+"?",xl,Xv,Zv,eT].join("|")+")",aT=RegExp(El+"(?="+El+")|"+sT+iT,"g");function oT(e){return e.match(aT)||[]}var lT=oT,uT=G2,cT=Gv,fT=lT;function dT(e){return cT(e)?fT(e):uT(e)}var hT=dT,pT=j2,vT=Gv,mT=hT,gT=Iv;function yT(e){return function(t){t=gT(t);var r=vT(t)?mT(t):void 0,n=r?r[0]:t.charAt(0),i=r?pT(r,1).join(""):t.slice(1);return n[e]()+i}}var wT=yT,_T=wT,ST=_T("toLowerCase"),xT=ST;const ET=ne(xT);var $T=Lu;function CT(e,t){return $T(e,t)}var PT=CT;const $l=ne(PT);var TT=Et;function AT(e,t){return function(r,n){if(r==null)return r;if(!TT(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s0){if(++t>=PN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ON=RN,NN=CN,FN=ON,IN=FN(NN),om=IN,kN=pa,bN=am,MN=om;function jN(e,t){return MN(bN(e,t,kN),e+"")}var lm=jN,zN=Ku,LN=tm,DN=gN,UN=lm,BN=Et,HN=UN(function(e,t,r){var n=-1,i=typeof t=="function",s=BN(e)?Array(e.length):[];return LN(e,function(a){s[++n]=i?zN(t,a,r):DN(a,t,r)}),s}),KN=HN;const Mt=ne(KN);function qN(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&pI(r[0],r[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++n-1?i[s?t[a]:a]:void 0}}var NI=OI,FI=/\s/;function II(e){for(var t=e.length;t--&&FI.test(e.charAt(t)););return t}var kI=II,bI=kI,MI=/^\s+/;function jI(e){return e&&e.slice(0,bI(e)+1).replace(MI,"")}var zI=jI,LI=zI,vd=xt,DI=da,md=NaN,UI=/^[-+]0x[0-9a-f]+$/i,BI=/^0b[01]+$/i,HI=/^0o[0-7]+$/i,KI=parseInt;function qI(e){if(typeof e=="number")return e;if(DI(e))return md;if(vd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=LI(e);var r=BI.test(e);return r||HI.test(e)?KI(e.slice(2),r?2:8):UI.test(e)?md:+e}var VI=qI,WI=VI,gd=1/0,GI=17976931348623157e292;function YI(e){if(!e)return e===0?e:0;if(e=WI(e),e===gd||e===-gd){var t=e<0?-1:1;return t*GI}return e===e?e:0}var QI=YI,XI=QI;function ZI(e){var t=XI(e),r=t%1;return t===t?r?t-r:t:0}var cm=ZI,JI=zv,ek=va,tk=cm,rk=Math.max;function nk(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:tk(r);return i<0&&(i=rk(n+i,0)),JI(e,ek(t),i)}var ik=nk,sk=NI,ak=ik,ok=sk(ak),lk=ok;const oo=ne(lk);var uk=cm;function ck(e){return typeof e=="number"&&e==uk(e)}var fk=ck;const yd=ne(fk);typeof De<"u"&&typeof De.self>"u"&&(De.self={},De.__pretenderNodePolyfill=!0);var dk=Object.create;function Tl(){var e=dk(null);return e.__=void 0,delete e.__,e}var fm=function(t,r,n){this.path=t,this.matcher=r,this.delegate=n};fm.prototype.to=function(t,r){var n=this.delegate;if(n&&n.willAddRoute&&(t=n.willAddRoute(this.matcher.target,t)),this.matcher.add(this.path,t),r){if(r.length===0)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,t,r,this.delegate)}};var ks=function(t){this.routes=Tl(),this.children=Tl(),this.target=t};ks.prototype.add=function(t,r){this.routes[t]=r};ks.prototype.addChild=function(t,r,n,i){var s=new ks(r);this.children[t]=s;var a=qu(t,s,i);i&&i.contextEntered&&i.contextEntered(r,a),n(a)};function qu(e,t,r){function n(i,s){var a=e+i;if(s)s(qu(a,t,r));else return new fm(a,t,r)}return n}function hk(e,t,r){for(var n=0,i=0;i0&&t.charCodeAt(0)===47&&(t=t.substr(1));for(var n=t.split("/"),i=void 0,s=void 0,a=0;a2&&a.slice(o-2)==="[]"&&(l=!0,a=a.slice(0,o-2),n[a]||(n[a]=[])),u=s[1]?xd(s[1]):""),l?n[a].push(u):n[a]=u}return n};Z.prototype.recognize=function(t){var r,n=[this.rootState],i={},s=!1,a=t.indexOf("#");a!==-1&&(t=t.substr(0,a));var o=t.indexOf("?");if(o!==-1){var l=t.substr(o+1,t.length);t=t.substr(0,o),i=this.parseQueryString(l)}t.charAt(0)!=="/"&&(t="/"+t);var u=t;Z.ENCODE_AND_DECODE_PATH_SEGMENTS?t=hm(t):(t=decodeURI(t),u=decodeURI(u));var f=t.length;f>1&&t.charAt(f-1)==="/"&&(t=t.substr(0,f-1),u=u.substr(0,u.length-1),s=!0);for(var c=0;c=0;t--)Sk(e[t],this)}Ms.prototype={addEventListener:function(t,r){this._eventListeners[t]=this._eventListeners[t]||[],this._eventListeners[t].push(r)},removeEventListener:function(t,r){for(var n=this._eventListeners[t]||[],i=0,s=n.length;ij.UNSENT&&this.sendFlag&&(this._readyStateChange(j.UNSENT),this.sendFlag=!1),typeof this.onerror=="function"&&this.onerror()},getResponseHeader:function(t){if(this.readyState=2&&(o=o.slice(2)):vt(n)?o=r[4]:n?i&&(o=o.slice(2)):a>=2&&vt(t.protocol)&&(o=r[4]),{protocol:n,slashes:i||vt(n),slashesCount:a,rest:o}}function Mk(e,t){if(e==="")return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,i=r[n-1],s=!1,a=0;n--;)r[n]==="."?r.splice(n,1):r[n]===".."?(r.splice(n,1),a++):a&&(n===0&&(s=!0),r.splice(n,1),a--);return s&&r.unshift(""),(i==="."||i==="..")&&r.push(""),r.join("/")}function lt(e,t,r){if(e=Wu(e),!(this instanceof lt))return new lt(e,t,r);var n,i,s,a,o,l,u=Al.slice(),f=typeof t,c=this,d=0;for(f!=="object"&&f!=="string"&&(r=t,t=null),r&&typeof r!="function"&&(r=Sa.parse),t=gm(t),i=ym(e||"",t),n=!i.protocol&&!i.slashes,c.slashes=i.slashes||n&&t.slashes,c.protocol=i.protocol||t.protocol||"",e=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||Ik.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!vt(c.protocol)))&&(u[3]=[/(.*)/,"pathname"]);d-1};function wi(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Yu(e){return typeof e!="string"&&(e=String(e)),e}function Qu(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return Ee.iterable&&(t[Symbol.iterator]=function(){return t}),t}function re(e){this.map={},e instanceof re?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}re.prototype.append=function(e,t){e=wi(e),t=Yu(t);var r=this.map[e];this.map[e]=r?r+", "+t:t};re.prototype.delete=function(e){delete this.map[wi(e)]};re.prototype.get=function(e){return e=wi(e),this.has(e)?this.map[e]:null};re.prototype.has=function(e){return this.map.hasOwnProperty(wi(e))};re.prototype.set=function(e,t){this.map[wi(e)]=Yu(t)};re.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)};re.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),Qu(e)};re.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Qu(e)};re.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),Qu(e)};Ee.iterable&&(re.prototype[Symbol.iterator]=re.prototype.entries);function lo(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function wm(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function Hk(e){var t=new FileReader,r=wm(t);return t.readAsArrayBuffer(e),r}function Kk(e){var t=new FileReader,r=wm(t);return t.readAsText(e),r}function qk(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}function Wt(e,t){if(!(this instanceof Wt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof Wt){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new re(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new re(t.headers)),this.method=Wk(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Wt.prototype.clone=function(){return new Wt(this,{body:this._bodyInit})};function Gk(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),i=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function Yk(e){var t=new re,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(` -`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),s=i.shift().trim();if(s){var a=i.join(":").trim();t.append(s,a)}}),t}_m.call(Wt.prototype);function tt(e,t){if(!(this instanceof tt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new re(t.headers),this.url=t.url||"",this._initBody(e)}_m.call(tt.prototype);tt.prototype.clone=function(){return new tt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new re(this.headers),url:this.url})};tt.error=function(){var e=new tt(null,{status:0,statusText:""});return e.type="error",e};var Qk=[301,302,303,307,308];tt.redirect=function(e,t){if(Qk.indexOf(t)===-1)throw new RangeError("Invalid status code");return new tt(null,{status:t,headers:{location:e}})};var Nt=me.DOMException;try{new Nt}catch{Nt=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},Nt.prototype=Object.create(Error.prototype),Nt.prototype.constructor=Nt}function Xu(e,t){return new Promise(function(r,n){var i=new Wt(e,t);if(i.signal&&i.signal.aborted)return n(new Nt("Aborted","AbortError"));var s=new XMLHttpRequest;function a(){s.abort()}s.onload=function(){var l={status:s.status,statusText:s.statusText,headers:Yk(s.getAllResponseHeaders()||"")};l.url="responseURL"in s?s.responseURL:l.headers.get("X-Request-URL");var u="response"in s?s.response:s.responseText;setTimeout(function(){r(new tt(u,l))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){n(new Nt("Aborted","AbortError"))},0)};function o(l){try{return l===""&&me.location.href?me.location.href:l}catch{return l}}s.open(i.method,o(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(Ee.blob?s.responseType="blob":Ee.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof re)?Object.getOwnPropertyNames(t.headers).forEach(function(l){s.setRequestHeader(l,Yu(t.headers[l]))}):i.headers.forEach(function(l,u){s.setRequestHeader(u,l)}),i.signal&&(i.signal.addEventListener("abort",a),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",a)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Xu.polyfill=!0;me.fetch||(me.fetch=Xu,me.Headers=re,me.Request=Wt,me.Response=tt);var Od=Object.freeze({__proto__:null,Headers:re,Request:Wt,Response:tt,get DOMException(){return Nt},fetch:Xu});function Xk(e,t){var r=["error","timeout","abort","readystatechange"],n=[],i=["readyState","responseText","response","responseXML","responseURL","status","statusText"],s=e._passthroughRequest=new t;s.open(e.method,e.url,e.async,e.username,e.password),e.responseType==="arraybuffer"&&(i=["readyState","response","status","statusText"],s.responseType=e.responseType),"onload"in s&&r.push("load"),e.async&&e.responseType!=="arraybuffer"&&(r.push("progress"),n.push("progress"));function a(d,g,m){for(var y=0;y=this._nextId&&(this._nextId=+t+1),this._ids[t]=!0}inc(){var t=this.get()+1;return this._nextId=t,t}fetch(){var t=this.get();return this._ids[t]=!0,this.inc(),t.toString()}reset(){this._nextId=1,this._ids={}}}var rb=console.warn;class Le{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;this.code=t,this.headers=r,t===204?n!==void 0&&n!==""?rb(`Mirage: One of your route handlers is returning a custom + */var Rt=function(t,r,n,i){this.type=t,this.bubbles=r,this.cancelable=n,this.target=i};Rt.prototype={stopPropagation:function(){},preventDefault:function(){this.defaultPrevented=!0}};var Ek={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Multiple Choice",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};function $k(e){var t;if(typeof DOMParser<"u"){var r=new DOMParser;t=r.parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t}var Ck={"Accept-Charset":!0,"Accept-Encoding":!0,Connection:!0,"Content-Length":!0,Cookie:!0,Cookie2:!0,"Content-Transfer-Encoding":!0,Date:!0,Expect:!0,Host:!0,"Keep-Alive":!0,Referer:!0,TE:!0,Trailer:!0,"Transfer-Encoding":!0,Upgrade:!0,"User-Agent":!0,Via:!0};function Pk(e,t){t.addEventListener(e,function(r){var n=t["on"+e];n&&typeof n=="function"&&n.call(r.target,r)})}function Ms(){this._eventListeners={};for(var e=["loadstart","progress","load","abort","loadend"],t=e.length-1;t>=0;t--)Pk(e[t],this)}Ms.prototype={addEventListener:function(t,r){this._eventListeners[t]=this._eventListeners[t]||[],this._eventListeners[t].push(r)},removeEventListener:function(t,r){for(var n=this._eventListeners[t]||[],i=0,s=n.length;ij.UNSENT&&this.sendFlag&&(this._readyStateChange(j.UNSENT),this.sendFlag=!1),typeof this.onerror=="function"&&this.onerror()},getResponseHeader:function(t){if(this.readyState=2&&(o=o.slice(2)):vt(n)?o=r[4]:n?i&&(o=o.slice(2)):a>=2&&vt(t.protocol)&&(o=r[4]),{protocol:n,slashes:i||vt(n),slashesCount:a,rest:o}}function Uk(e,t){if(e==="")return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,i=r[n-1],s=!1,a=0;n--;)r[n]==="."?r.splice(n,1):r[n]===".."?(r.splice(n,1),a++):a&&(n===0&&(s=!0),r.splice(n,1),a--);return s&&r.unshift(""),(i==="."||i==="..")&&r.push(""),r.join("/")}function lt(e,t,r){if(e=Wu(e),!(this instanceof lt))return new lt(e,t,r);var n,i,s,a,o,l,u=Al.slice(),f=typeof t,c=this,d=0;for(f!=="object"&&f!=="string"&&(r=t,t=null),r&&typeof r!="function"&&(r=Sa.parse),t=gm(t),i=ym(e||"",t),n=!i.protocol&&!i.slashes,c.slashes=i.slashes||n&&t.slashes,c.protocol=i.protocol||t.protocol||"",e=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||zk.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!vt(c.protocol)))&&(u[3]=[/(.*)/,"pathname"]);d-1};function wi(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Yu(e){return typeof e!="string"&&(e=String(e)),e}function Qu(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return xe.iterable&&(t[Symbol.iterator]=function(){return t}),t}function re(e){this.map={},e instanceof re?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}re.prototype.append=function(e,t){e=wi(e),t=Yu(t);var r=this.map[e];this.map[e]=r?r+", "+t:t};re.prototype.delete=function(e){delete this.map[wi(e)]};re.prototype.get=function(e){return e=wi(e),this.has(e)?this.map[e]:null};re.prototype.has=function(e){return this.map.hasOwnProperty(wi(e))};re.prototype.set=function(e,t){this.map[wi(e)]=Yu(t)};re.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)};re.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),Qu(e)};re.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Qu(e)};re.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),Qu(e)};xe.iterable&&(re.prototype[Symbol.iterator]=re.prototype.entries);function lo(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function wm(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function Gk(e){var t=new FileReader,r=wm(t);return t.readAsArrayBuffer(e),r}function Yk(e){var t=new FileReader,r=wm(t);return t.readAsText(e),r}function Qk(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}function Gt(e,t){if(!(this instanceof Gt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof Gt){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new re(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new re(t.headers)),this.method=Zk(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Gt.prototype.clone=function(){return new Gt(this,{body:this._bodyInit})};function Jk(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),i=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function eb(e){var t=new re,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(` +`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),s=i.shift().trim();if(s){var a=i.join(":").trim();t.append(s,a)}}),t}_m.call(Gt.prototype);function tt(e,t){if(!(this instanceof tt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new re(t.headers),this.url=t.url||"",this._initBody(e)}_m.call(tt.prototype);tt.prototype.clone=function(){return new tt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new re(this.headers),url:this.url})};tt.error=function(){var e=new tt(null,{status:0,statusText:""});return e.type="error",e};var tb=[301,302,303,307,308];tt.redirect=function(e,t){if(tb.indexOf(t)===-1)throw new RangeError("Invalid status code");return new tt(null,{status:t,headers:{location:e}})};var Ft=me.DOMException;try{new Ft}catch{Ft=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},Ft.prototype=Object.create(Error.prototype),Ft.prototype.constructor=Ft}function Xu(e,t){return new Promise(function(r,n){var i=new Gt(e,t);if(i.signal&&i.signal.aborted)return n(new Ft("Aborted","AbortError"));var s=new XMLHttpRequest;function a(){s.abort()}s.onload=function(){var l={status:s.status,statusText:s.statusText,headers:eb(s.getAllResponseHeaders()||"")};l.url="responseURL"in s?s.responseURL:l.headers.get("X-Request-URL");var u="response"in s?s.response:s.responseText;setTimeout(function(){r(new tt(u,l))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){n(new Ft("Aborted","AbortError"))},0)};function o(l){try{return l===""&&me.location.href?me.location.href:l}catch{return l}}s.open(i.method,o(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(xe.blob?s.responseType="blob":xe.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof re)?Object.getOwnPropertyNames(t.headers).forEach(function(l){s.setRequestHeader(l,Yu(t.headers[l]))}):i.headers.forEach(function(l,u){s.setRequestHeader(u,l)}),i.signal&&(i.signal.addEventListener("abort",a),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",a)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Xu.polyfill=!0;me.fetch||(me.fetch=Xu,me.Headers=re,me.Request=Gt,me.Response=tt);var Od=Object.freeze({__proto__:null,Headers:re,Request:Gt,Response:tt,get DOMException(){return Ft},fetch:Xu});function rb(e,t){var r=["error","timeout","abort","readystatechange"],n=[],i=["readyState","responseText","response","responseXML","responseURL","status","statusText"],s=e._passthroughRequest=new t;s.open(e.method,e.url,e.async,e.username,e.password),e.responseType==="arraybuffer"&&(i=["readyState","response","status","statusText"],s.responseType=e.responseType),"onload"in s&&r.push("load"),e.async&&e.responseType!=="arraybuffer"&&(r.push("progress"),n.push("progress"));function a(d,g,m){for(var y=0;y=this._nextId&&(this._nextId=+t+1),this._ids[t]=!0}inc(){var t=this.get()+1;return this._nextId=t,t}fetch(){var t=this.get();return this._ids[t]=!0,this.inc(),t.toString()}reset(){this._nextId=1,this._ids={}}}var ob=console.warn;class Le{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;this.code=t,this.headers=r,t===204?n!==void 0&&n!==""?ob(`Mirage: One of your route handlers is returning a custom 204 Response that has data, but this is a violation of the HTTP spec and could lead to unexpected behavior. 204 responses should have no - content (an empty string) as their body.`):this.data="":(n===void 0||n==="")&&!Object.prototype.hasOwnProperty.call(this.headers,"Content-Type")?this.data={}:this.data=n,t!==204&&!Object.prototype.hasOwnProperty.call(this.headers,"Content-Type")&&(this.headers["Content-Type"]="application/json")}toRackResponse(){return[this.code,this.headers,this.data]}}function Fd(e,t,r,n,i,s,a){try{var o=e[s](a),l=o.value}catch(u){return void r(u)}o.done?t(l):Promise.resolve(l).then(n,i)}function nb(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function a(l){Fd(s,n,i,a,o,"next",l)}function o(l){Fd(s,n,i,a,o,"throw",l)}a(void 0)})}}function $t(e,t,r){return(t=ab(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ib(e){for(var t=1;t-1?this[i]="Mirage: ".concat(r[i]):this[i]=r[i]}}zs.prototype=Object.create(Error.prototype);class _i{constructor(t,r){this.modelName=void 0,typeof t=="object"?(this.modelName=void 0,this.opts=t):(this.modelName=t?D(t):"",this.opts=r||{}),this.name="",this.ownerModelName=""}setSchema(t){this.schema=t}isReflexive(){var t=!!(this.modelName===this.ownerModelName&&this.opts.inverse),r=this.opts.inverse===void 0&&this.ownerModelName===this.modelName;return t||r}get isPolymorphic(){return this.opts.polymorphic}get type(){throw new Error("Subclasses of Association must implement a getter for type")}get foreignKey(){return this.getForeignKey()}get identifier(){throw new Error("Subclasses of Association must implement a getter for identifier")}}var $r={};class Dn extends _i{get identifier(){if(typeof $r[this.name]!="string"){var t="".concat(N(this.name),"Id");$r[this.name]=t}return $r[this.name]}get type(){return"belongsTo"}getForeignKeyArray(){return[N(this.ownerModelName),this.getForeignKey()]}getForeignKey(){if(typeof $r[this.name]!="string"){var t="".concat(N(this.name),"Id");$r[this.name]=t}return $r[this.name]}addMethodsToModelClass(t,r){var n=t.prototype,i=this,s=this.getForeignKey(),a={[r]:this};n.belongsToAssociations=Object.assign(n.belongsToAssociations,a),Object.keys(n.belongsToAssociations).forEach(o=>{var l=n.belongsToAssociations[o];n.belongsToAssociationFks[l.getForeignKey()]=l}),this.schema.addDependentAssociation(this,this.modelName),n.associationKeys.add(r),n.associationIdKeys.add(s),Object.defineProperty(n,s,{get(){this._tempAssociations=this._tempAssociations||{};var o=this._tempAssociations[r],l;return o===null?l=null:i.isPolymorphic?o?l={id:o.id,type:o.modelName}:l=this.attrs[s]:o?l=o.id:l=this.attrs[s],l},set(o){var l;o===null?l=null:o!==void 0&&(i.isPolymorphic?(O(typeof o=="object","You're setting an ID on the polymorphic association '".concat(i.name,"' but you didn't pass in an object. Polymorphic IDs need to be in the form { type, id }.")),l=i.schema[i.schema.toCollectionName(o.type)].find(o.id)):(l=i.schema[i.schema.toCollectionName(i.modelName)].find(o),O(l,"Couldn't find ".concat(i.modelName," with id = ").concat(o)))),this[r]=l}}),Object.defineProperty(n,r,{get(){this._tempAssociations=this._tempAssociations||{};var o=this._tempAssociations[r],l=this[s],u=null;return o?u=o:l!==null&&(i.isPolymorphic?u=i.schema[i.schema.toCollectionName(l.type)].find(l.id):u=i.schema[i.schema.toCollectionName(i.modelName)].find(l)),u},set(o){if(this._tempAssociations=this._tempAssociations||{},this._tempAssociations[r]=o,o&&o.hasInverseFor(i)){var l=o.inverseFor(i);o.associate(this,l)}}}),n["new".concat(js(r))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].new(l);return this[r]=u,u},n["create".concat(js(r))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].create(l);return this[r]=u,this.save(),u.reload()}}disassociateAllDependentsFromTarget(t){var r=this.ownerModelName,n;this.isPolymorphic?n={type:t.modelName,id:t.id}:n=t.id;var i=this.schema[this.schema.toCollectionName(r)].where(s=>{var a=s[this.getForeignKey()];return a?typeof a=="object"?a.type===n.type&&a.id===n.id:a===n:!1});i.models.forEach(s=>{s.disassociate(t,this),s.save()})}}function Ct(e){return Array.isArray(e)?e.map(Ct):Object.assign({},e)}class lb{constructor(t,r,n){this.name=t,this._records=[],this.identityManager=new n,r&&this.insert(r)}all(){return Ct(this._records)}insert(t){return Array.isArray(t)?zT(t,r=>this._insertRecord(r)):this._insertRecord(t)}find(t){if(Array.isArray(t)){var r=this._findRecords(t).filter(Boolean).map(Ct);return r}else{var n=this._findRecord(t);return n?Ct(n):null}}findBy(t){var r=this._findRecordBy(t);return r?Ct(r):null}where(t){return this._findRecordsWhere(t).map(Ct)}firstOrCreate(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.where(t),[i]=n;if(i)return i;var s=Object.assign(r,t),a=this.insert(s);return a}update(t,r){var n;if(typeof r>"u"){r=t;var i=[];return this._records.forEach(u=>{var f=Object.assign({},u);this._updateRecord(u,r),$l(f,u)||i.push(u)}),i}else if(typeof t=="number"||typeof t=="string"){var s=t,a=this._findRecord(s);return this._updateRecord(a,r),a}else if(Array.isArray(t)){var o=t;return n=this._findRecords(o),n.forEach(u=>{this._updateRecord(u,r)}),n}else if(typeof t=="object"){var l=t;return n=this._findRecordsWhere(l),n.forEach(u=>{this._updateRecord(u,r)}),n}}remove(t){var r;if(typeof t>"u")this._records=[],this.identityManager.reset();else if(typeof t=="number"||typeof t=="string"){var n=this._findRecord(t),i=this._records.indexOf(n);this._records.splice(i,1)}else Array.isArray(t)?(r=this._findRecords(t),r.forEach(s=>{var a=this._records.indexOf(s);this._records.splice(a,1)})):typeof t=="object"&&(r=this._findRecordsWhere(t),r.forEach(s=>{var a=this._records.indexOf(s);this._records.splice(a,1)}))}_findRecord(t){return t=t.toString(),this._records.find(r=>r.id===t)}_findRecordBy(t){return this._findRecordsWhere(t)[0]}_findRecords(t){return t.map(this._findRecord,this)}_findRecordsWhere(t){var r=this._records;function n(s){var a=Object.keys(t);return a.every(function(o){return String(s[o])===String(t[o])})}var i=typeof t=="object"?n:t;return r.filter(i)}_insertRecord(t){var r=Ct(t);return r&&(r.id===void 0||r.id===null)?r.id=this.identityManager.fetch(r):(r.id=r.id.toString(),this.identityManager.set(r.id)),this._records.push(r),Ct(r)}_updateRecord(t,r){var n=r&&Object.prototype.hasOwnProperty.call(r,"id")?r.id.toString():null,i=t.id;if(n&&i!==n)throw new Error("Updating the ID of a record is not permitted");for(var s in r)s!=="id"&&(t[s]=r[s])}}class Em{constructor(t,r){this._collections=[],this.registerIdentityManagers(r),t&&this.loadData(t)}loadData(t){for(var r in t)this.createCollection(r,ZO(t[r]))}dump(){return this._collections.reduce((t,r)=>(t[r.name]=r.all(),t),{})}createCollection(t,r){if(this[t])r&&this[t].insert(r);else{var n=this.identityManagerFor(t),i=new lb(t,r,n);Object.defineProperty(this,t,{get(){var s=i.all();return["insert","find","findBy","where","update","remove","firstOrCreate"].forEach(function(a){s[a]=function(){return i[a](...arguments)}}),s}}),Object.defineProperty(this,"_".concat(t),{get(){var s=[];return["insert","find","findBy","where","update","remove","firstOrCreate"].forEach(function(a){s[a]=function(){return i[a](...arguments)}}),s}}),this._collections.push(i)}return this}createCollections(){for(var t=arguments.length,r=new Array(t),n=0;nthis.createCollection(i))}emptyData(){this._collections.forEach(t=>t.remove())}identityManagerFor(t){return this._identityManagers[this._container.inflector.singularize(t)]||this._identityManagers.application||tb}registerIdentityManagers(t){this._identityManagers=t||{}}}class Ce{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];O(t&&typeof t=="string","You must pass a `modelName` into a Collection"),this.modelName=t,this.models=r}get length(){return this.models.length}update(){for(var t=arguments.length,r=new Array(t),n=0;ni.toString()===t.toString());if(r){var n=this.models.indexOf(r);this.models.splice(n,1)}return this}includes(t){return this.models.some(r=>r.toString()===t.toString())}filter(t){var r=this.models.filter(t);return new Ce(this.modelName,r)}sort(t){var r=this.models.concat().sort(t);return new Ce(this.modelName,r)}slice(){var t=this.models.slice(...arguments);return new Ce(this.modelName,t)}mergeCollection(t){return this.models=this.models.concat(t.models),this}toString(){return"collection:".concat(this.modelName,"(").concat(this.models.map(t=>t.id).join(","),")")}}class ce{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.models=t}get length(){return this.models.length}update(){for(var t=arguments.length,r=new Array(t),n=0;n$l(i.attrs,t.attrs));if(r){var n=this.models.indexOf(r);this.models.splice(n,1)}return this}includes(t){return this.models.some(r=>$l(r.attrs,t.attrs))}filter(t){var r=this.models.filter(t);return new ce(r)}sort(t){var r=this.models.concat().sort(t);return new ce(r)}slice(){var t=this.models.slice(...arguments);return new ce(t)}mergeCollection(t){return this.models=this.models.concat(t.models),this}toString(){return"collection:".concat(this.modelName,"(").concat(this.models.map(t=>t.id).join(","),")")}}var Cr={};class An extends _i{get identifier(){if(typeof Cr[this.name]!="string"){var t="".concat(N(this._container.inflector.singularize(this.name)),"Ids");Cr[this.name]=t}return Cr[this.name]}get type(){return"hasMany"}getForeignKeyArray(){return[N(this.ownerModelName),this.getForeignKey()]}getForeignKey(){if(typeof Cr[this.name]!="string"){var t="".concat(this._container.inflector.singularize(N(this.name)),"Ids");Cr[this.name]=t}return Cr[this.name]}addMethodsToModelClass(t,r){var n=t.prototype,i=this,s=this.getForeignKey(),a={[r]:this};n.hasManyAssociations=Object.assign(n.hasManyAssociations,a),Object.keys(n.hasManyAssociations).forEach(o=>{var l=n.hasManyAssociations[o];n.hasManyAssociationFks[l.getForeignKey()]=l}),this.schema.addDependentAssociation(this,this.modelName),n.associationKeys.add(r),n.associationIdKeys.add(s),Object.defineProperty(n,s,{get(){this._tempAssociations=this._tempAssociations||{};var o=this._tempAssociations[r],l=[];return o?i.isPolymorphic?l=o.models.map(u=>({type:u.modelName,id:u.id})):l=o.models.map(u=>u.id):l=this.attrs[s]||[],l},set(o){var l;if(o===null)l=[];else if(o!==void 0)if(O(Array.isArray(o),"You must pass an array in when setting ".concat(s," on ").concat(this)),i.isPolymorphic){O(o.every(f=>typeof f=="object"&&typeof f.type<"u"&&typeof f.id<"u"),"You must pass in an array of polymorphic identifiers (objects of shape { type, id }) when setting ".concat(s," on ").concat(this));var u=o.map(f=>{var{type:c,id:d}=f;return i.schema[i.schema.toCollectionName(c)].find(d)});l=new ce(u)}else l=i.schema[i.schema.toCollectionName(i.modelName)].find(o);this[r]=l}}),Object.defineProperty(n,r,{get(){this._tempAssociations=this._tempAssociations||{};var o=null;if(this._tempAssociations[r])o=this._tempAssociations[r];else{if(i.isPolymorphic)if(this[s]){var l=this[s],u=l.map(f=>{var{type:c,id:d}=f;return i.schema[i.schema.toCollectionName(c)].find(d)});o=new ce(u)}else o=new ce(i.modelName);else this[s]?o=i.schema[i.schema.toCollectionName(i.modelName)].find(this[s]):o=new Ce(i.modelName);this._tempAssociations[r]=o}return o},set(o){(o instanceof Ce||o instanceof ce)&&(o=o.models),o=o?ya(o):[],this._tempAssociations=this._tempAssociations||{};var l;i.isPolymorphic?l=new ce(o):l=new Ce(i.modelName,o),this._tempAssociations[r]=l,o.forEach(u=>{if(u.hasInverseFor(i)){var f=u.inverseFor(i);u.associate(this,f)}})}}),n["new".concat(js(N(this._container.inflector.singularize(i.name))))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].new(l),f=this[r].models;return f.push(u),this[r]=f,u},n["create".concat(js(N(this._container.inflector.singularize(i.name))))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].create(l),f=this[r].models;return f.push(u),this[r]=f,this.save(),u.reload()}}disassociateAllDependentsFromTarget(t){var r=this.ownerModelName,n;this.isPolymorphic?n={type:t.modelName,id:t.id}:n=t.id;var i=this.schema[this.schema.toCollectionName(r)].where(s=>{var a=s[this.getForeignKey()];return a&&a.find(o=>typeof o=="object"?o.type===n.type&&o.id===n.id:o===n)});i.models.forEach(s=>{s.disassociate(t,this),s.save()})}}var vo={};class xa{getModelClassFromPath(t){if(t){if(typeof vo[t]!="string"){for(var r=t.split("/"),n,i=r.length-1;i>=0;i--){var s=r[i];if(s.length&&s[0]!==":"){n=s;break}}vo[t]=D(N(this._container.inflector.singularize(n)))}return vo[t]}}_getIdForRequest(t,r){var n;return t&&t.params&&t.params.id?n=t.params.id:r&&r.data&&r.data.id&&(n=r.data.id),n}_getJsonApiDocForRequest(t,r){var n;return t&&t.requestBody&&(n=JSON.parse(t.requestBody)),this.serializerOrRegistry.normalize(n,r)}_getAttrsForRequest(t,r){var n=this._getJsonApiDocForRequest(t,r),i=this._getIdForRequest(t,n),s={};return O(n.data&&(n.data.attributes||n.data.type||n.data.relationships),"You're using a shorthand or #normalizedRequestAttrs, but your serializer's normalize function did not return a valid JSON:API document. Consult the docs for the normalize hook on the Serializer class."),n.data.attributes&&(s=Object.keys(n.data.attributes).reduce((a,o)=>(a[N(o)]=n.data.attributes[o],a),{})),n.data.relationships&&Object.keys(n.data.relationships).forEach(a=>{var o=n.data.relationships[a],l=this.schema.modelClassFor(r),u=l.associationFor(N(a)),f;O(u,"You're passing the relationship '".concat(a,"' to the '").concat(r,"' model via a ").concat(t.method," to '").concat(t.url,"', but you did not define the '").concat(a,"' association on the '").concat(r,"' model.")),u.isPolymorphic?f=o.data:u instanceof An?f=o.data&&o.data.map(c=>c.id):f=o.data&&o.data.id,s[u.identifier]=f},{}),i&&(s.id=i),s}_getAttrsForFormRequest(t){var{requestBody:r}=t,n,i=[];return O(r&&typeof r=="string","You're using the helper method #normalizedFormData, but the request body is empty or not a valid url encoded string."),i=r.split("&"),n=i.reduce((s,a)=>{var[o,l]=a.split("=");return s[o]=decodeURIComponent(l.replace(/\+/g," ")),s},{}),n}}class xm extends xa{constructor(t,r,n,i,s){super(s),this.schema=t,this.serializerOrRegistry=r,this.userFunction=n,this.path=i}handle(t){return this.userFunction(this.schema,t)}setRequest(t){this.request=t}serialize(t,r){var n;return r?n=this.serializerOrRegistry.serializerFor(r,{explicit:!0}):n=this.serializerOrRegistry,n.serialize(t,this.request)}normalizedRequestAttrs(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,{path:r,request:n,request:{requestHeaders:i}}=this,s,a={};for(var o in i)a[o.toLowerCase()]=i[o];return/x-www-form-urlencoded/.test(a["content-type"])?s=this._getAttrsForFormRequest(n):(t?O(D(t)===t,"You called normalizedRequestAttrs('".concat(t,"'), but normalizedRequestAttrs was intended to be used with the dasherized version of the model type. Please change this to normalizedRequestAttrs('").concat(D(t),"').")):t=this.getModelClassFromPath(r),O(this.schema.hasModelForModelName(t),"You're using a shorthand or the #normalizedRequestAttrs helper but the detected model of '".concat(t,"' does not exist. You might need to pass in the correct modelName as the first argument to #normalizedRequestAttrs.")),s=this._getAttrsForRequest(n,t)),s}}class ub{constructor(t,r,n){this.schema=t,this.serializerOrRegistry=r,this.object=n}handle(){return this.object}}class Si extends xa{constructor(t,r,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};super(),n=n||this.getModelClassFromPath(i),this.schema=t,this.serializerOrRegistry=r,this.shorthand=n,this.options=s;var a=Array.isArray(n)?"array":typeof n;if(a==="string"){var o=this.schema[this.schema.toCollectionName(n)];this.handle=u=>this.handleStringShorthand(u,o)}else if(a==="array"){var l=n.map(u=>this.schema[this.schema.toCollectionName(u)]);this.handle=u=>this.handleArrayShorthand(u,l)}}}class cb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t);if(s){var a=r.find(s);return a||new Le(404)}else if(this.options.coalesce){var o=this.serializerOrRegistry.getCoalescedIds(t,i);if(o)return r.find(o)}return r.all()}handleArrayShorthand(t,r){var n=this.shorthand,i=this._getIdForRequest(t);return O(!i||this._container.inflector.singularize(n[0])!==n[0],`It looks like you're using the "Single record with + content (an empty string) as their body.`):this.data="":(n===void 0||n==="")&&!Object.prototype.hasOwnProperty.call(this.headers,"Content-Type")?this.data={}:this.data=n,t!==204&&!Object.prototype.hasOwnProperty.call(this.headers,"Content-Type")&&(this.headers["Content-Type"]="application/json")}toRackResponse(){return[this.code,this.headers,this.data]}}function Fd(e,t,r,n,i,s,a){try{var o=e[s](a),l=o.value}catch(u){return void r(u)}o.done?t(l):Promise.resolve(l).then(n,i)}function lb(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function a(l){Fd(s,n,i,a,o,"next",l)}function o(l){Fd(s,n,i,a,o,"throw",l)}a(void 0)})}}function Ct(e,t,r){return(t=fb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ub(e){for(var t=1;t-1?this[i]="Mirage: ".concat(r[i]):this[i]=r[i]}}zs.prototype=Object.create(Error.prototype);class _i{constructor(t,r){this.modelName=void 0,typeof t=="object"?(this.modelName=void 0,this.opts=t):(this.modelName=t?D(t):"",this.opts=r||{}),this.name="",this.ownerModelName=""}setSchema(t){this.schema=t}isReflexive(){var t=!!(this.modelName===this.ownerModelName&&this.opts.inverse),r=this.opts.inverse===void 0&&this.ownerModelName===this.modelName;return t||r}get isPolymorphic(){return this.opts.polymorphic}get type(){throw new Error("Subclasses of Association must implement a getter for type")}get foreignKey(){return this.getForeignKey()}get identifier(){throw new Error("Subclasses of Association must implement a getter for identifier")}}var $r={};class Dn extends _i{get identifier(){if(typeof $r[this.name]!="string"){var t="".concat(N(this.name),"Id");$r[this.name]=t}return $r[this.name]}get type(){return"belongsTo"}getForeignKeyArray(){return[N(this.ownerModelName),this.getForeignKey()]}getForeignKey(){if(typeof $r[this.name]!="string"){var t="".concat(N(this.name),"Id");$r[this.name]=t}return $r[this.name]}addMethodsToModelClass(t,r){var n=t.prototype,i=this,s=this.getForeignKey(),a={[r]:this};n.belongsToAssociations=Object.assign(n.belongsToAssociations,a),Object.keys(n.belongsToAssociations).forEach(o=>{var l=n.belongsToAssociations[o];n.belongsToAssociationFks[l.getForeignKey()]=l}),this.schema.addDependentAssociation(this,this.modelName),n.associationKeys.add(r),n.associationIdKeys.add(s),Object.defineProperty(n,s,{get(){this._tempAssociations=this._tempAssociations||{};var o=this._tempAssociations[r],l;return o===null?l=null:i.isPolymorphic?o?l={id:o.id,type:o.modelName}:l=this.attrs[s]:o?l=o.id:l=this.attrs[s],l},set(o){var l;o===null?l=null:o!==void 0&&(i.isPolymorphic?(O(typeof o=="object","You're setting an ID on the polymorphic association '".concat(i.name,"' but you didn't pass in an object. Polymorphic IDs need to be in the form { type, id }.")),l=i.schema[i.schema.toCollectionName(o.type)].find(o.id)):(l=i.schema[i.schema.toCollectionName(i.modelName)].find(o),O(l,"Couldn't find ".concat(i.modelName," with id = ").concat(o)))),this[r]=l}}),Object.defineProperty(n,r,{get(){this._tempAssociations=this._tempAssociations||{};var o=this._tempAssociations[r],l=this[s],u=null;return o?u=o:l!==null&&(i.isPolymorphic?u=i.schema[i.schema.toCollectionName(l.type)].find(l.id):u=i.schema[i.schema.toCollectionName(i.modelName)].find(l)),u},set(o){if(this._tempAssociations=this._tempAssociations||{},this._tempAssociations[r]=o,o&&o.hasInverseFor(i)){var l=o.inverseFor(i);o.associate(this,l)}}}),n["new".concat(js(r))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].new(l);return this[r]=u,u},n["create".concat(js(r))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].create(l);return this[r]=u,this.save(),u.reload()}}disassociateAllDependentsFromTarget(t){var r=this.ownerModelName,n;this.isPolymorphic?n={type:t.modelName,id:t.id}:n=t.id;var i=this.schema[this.schema.toCollectionName(r)].where(s=>{var a=s[this.getForeignKey()];return a?typeof a=="object"?a.type===n.type&&a.id===n.id:a===n:!1});i.models.forEach(s=>{s.disassociate(t,this),s.save()})}}function Pt(e){return Array.isArray(e)?e.map(Pt):Object.assign({},e)}class hb{constructor(t,r,n){this.name=t,this._records=[],this.identityManager=new n,r&&this.insert(r)}all(){return Pt(this._records)}insert(t){return Array.isArray(t)?HT(t,r=>this._insertRecord(r)):this._insertRecord(t)}find(t){if(Array.isArray(t)){var r=this._findRecords(t).filter(Boolean).map(Pt);return r}else{var n=this._findRecord(t);return n?Pt(n):null}}findBy(t){var r=this._findRecordBy(t);return r?Pt(r):null}where(t){return this._findRecordsWhere(t).map(Pt)}firstOrCreate(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.where(t),[i]=n;if(i)return i;var s=Object.assign(r,t),a=this.insert(s);return a}update(t,r){var n;if(typeof r>"u"){r=t;var i=[];return this._records.forEach(u=>{var f=Object.assign({},u);this._updateRecord(u,r),$l(f,u)||i.push(u)}),i}else if(typeof t=="number"||typeof t=="string"){var s=t,a=this._findRecord(s);return this._updateRecord(a,r),a}else if(Array.isArray(t)){var o=t;return n=this._findRecords(o),n.forEach(u=>{this._updateRecord(u,r)}),n}else if(typeof t=="object"){var l=t;return n=this._findRecordsWhere(l),n.forEach(u=>{this._updateRecord(u,r)}),n}}remove(t){var r;if(typeof t>"u")this._records=[],this.identityManager.reset();else if(typeof t=="number"||typeof t=="string"){var n=this._findRecord(t),i=this._records.indexOf(n);this._records.splice(i,1)}else Array.isArray(t)?(r=this._findRecords(t),r.forEach(s=>{var a=this._records.indexOf(s);this._records.splice(a,1)})):typeof t=="object"&&(r=this._findRecordsWhere(t),r.forEach(s=>{var a=this._records.indexOf(s);this._records.splice(a,1)}))}_findRecord(t){return t=t.toString(),this._records.find(r=>r.id===t)}_findRecordBy(t){return this._findRecordsWhere(t)[0]}_findRecords(t){return t.map(this._findRecord,this)}_findRecordsWhere(t){var r=this._records;function n(s){var a=Object.keys(t);return a.every(function(o){return String(s[o])===String(t[o])})}var i=typeof t=="object"?n:t;return r.filter(i)}_insertRecord(t){var r=Pt(t);return r&&(r.id===void 0||r.id===null)?r.id=this.identityManager.fetch(r):(r.id=r.id.toString(),this.identityManager.set(r.id)),this._records.push(r),Pt(r)}_updateRecord(t,r){var n=r&&Object.prototype.hasOwnProperty.call(r,"id")?r.id.toString():null,i=t.id;if(n&&i!==n)throw new Error("Updating the ID of a record is not permitted");for(var s in r)s!=="id"&&(t[s]=r[s])}}class xm{constructor(t,r){this._collections=[],this.registerIdentityManagers(r),t&&this.loadData(t)}loadData(t){for(var r in t)this.createCollection(r,nN(t[r]))}dump(){return this._collections.reduce((t,r)=>(t[r.name]=r.all(),t),{})}createCollection(t,r){if(this[t])r&&this[t].insert(r);else{var n=this.identityManagerFor(t),i=new hb(t,r,n);Object.defineProperty(this,t,{get(){var s=i.all();return["insert","find","findBy","where","update","remove","firstOrCreate"].forEach(function(a){s[a]=function(){return i[a](...arguments)}}),s}}),Object.defineProperty(this,"_".concat(t),{get(){var s=[];return["insert","find","findBy","where","update","remove","firstOrCreate"].forEach(function(a){s[a]=function(){return i[a](...arguments)}}),s}}),this._collections.push(i)}return this}createCollections(){for(var t=arguments.length,r=new Array(t),n=0;nthis.createCollection(i))}emptyData(){this._collections.forEach(t=>t.remove())}identityManagerFor(t){return this._identityManagers[this._container.inflector.singularize(t)]||this._identityManagers.application||ab}registerIdentityManagers(t){this._identityManagers=t||{}}}class Ce{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];O(t&&typeof t=="string","You must pass a `modelName` into a Collection"),this.modelName=t,this.models=r}get length(){return this.models.length}update(){for(var t=arguments.length,r=new Array(t),n=0;ni.toString()===t.toString());if(r){var n=this.models.indexOf(r);this.models.splice(n,1)}return this}includes(t){return this.models.some(r=>r.toString()===t.toString())}filter(t){var r=this.models.filter(t);return new Ce(this.modelName,r)}sort(t){var r=this.models.concat().sort(t);return new Ce(this.modelName,r)}slice(){var t=this.models.slice(...arguments);return new Ce(this.modelName,t)}mergeCollection(t){return this.models=this.models.concat(t.models),this}toString(){return"collection:".concat(this.modelName,"(").concat(this.models.map(t=>t.id).join(","),")")}}class ce{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.models=t}get length(){return this.models.length}update(){for(var t=arguments.length,r=new Array(t),n=0;n$l(i.attrs,t.attrs));if(r){var n=this.models.indexOf(r);this.models.splice(n,1)}return this}includes(t){return this.models.some(r=>$l(r.attrs,t.attrs))}filter(t){var r=this.models.filter(t);return new ce(r)}sort(t){var r=this.models.concat().sort(t);return new ce(r)}slice(){var t=this.models.slice(...arguments);return new ce(t)}mergeCollection(t){return this.models=this.models.concat(t.models),this}toString(){return"collection:".concat(this.modelName,"(").concat(this.models.map(t=>t.id).join(","),")")}}var Cr={};class An extends _i{get identifier(){if(typeof Cr[this.name]!="string"){var t="".concat(N(this._container.inflector.singularize(this.name)),"Ids");Cr[this.name]=t}return Cr[this.name]}get type(){return"hasMany"}getForeignKeyArray(){return[N(this.ownerModelName),this.getForeignKey()]}getForeignKey(){if(typeof Cr[this.name]!="string"){var t="".concat(this._container.inflector.singularize(N(this.name)),"Ids");Cr[this.name]=t}return Cr[this.name]}addMethodsToModelClass(t,r){var n=t.prototype,i=this,s=this.getForeignKey(),a={[r]:this};n.hasManyAssociations=Object.assign(n.hasManyAssociations,a),Object.keys(n.hasManyAssociations).forEach(o=>{var l=n.hasManyAssociations[o];n.hasManyAssociationFks[l.getForeignKey()]=l}),this.schema.addDependentAssociation(this,this.modelName),n.associationKeys.add(r),n.associationIdKeys.add(s),Object.defineProperty(n,s,{get(){this._tempAssociations=this._tempAssociations||{};var o=this._tempAssociations[r],l=[];return o?i.isPolymorphic?l=o.models.map(u=>({type:u.modelName,id:u.id})):l=o.models.map(u=>u.id):l=this.attrs[s]||[],l},set(o){var l;if(o===null)l=[];else if(o!==void 0)if(O(Array.isArray(o),"You must pass an array in when setting ".concat(s," on ").concat(this)),i.isPolymorphic){O(o.every(f=>typeof f=="object"&&typeof f.type<"u"&&typeof f.id<"u"),"You must pass in an array of polymorphic identifiers (objects of shape { type, id }) when setting ".concat(s," on ").concat(this));var u=o.map(f=>{var{type:c,id:d}=f;return i.schema[i.schema.toCollectionName(c)].find(d)});l=new ce(u)}else l=i.schema[i.schema.toCollectionName(i.modelName)].find(o);this[r]=l}}),Object.defineProperty(n,r,{get(){this._tempAssociations=this._tempAssociations||{};var o=null;if(this._tempAssociations[r])o=this._tempAssociations[r];else{if(i.isPolymorphic)if(this[s]){var l=this[s],u=l.map(f=>{var{type:c,id:d}=f;return i.schema[i.schema.toCollectionName(c)].find(d)});o=new ce(u)}else o=new ce(i.modelName);else this[s]?o=i.schema[i.schema.toCollectionName(i.modelName)].find(this[s]):o=new Ce(i.modelName);this._tempAssociations[r]=o}return o},set(o){(o instanceof Ce||o instanceof ce)&&(o=o.models),o=o?ya(o):[],this._tempAssociations=this._tempAssociations||{};var l;i.isPolymorphic?l=new ce(o):l=new Ce(i.modelName,o),this._tempAssociations[r]=l,o.forEach(u=>{if(u.hasInverseFor(i)){var f=u.inverseFor(i);u.associate(this,f)}})}}),n["new".concat(js(N(this._container.inflector.singularize(i.name))))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].new(l),f=this[r].models;return f.push(u),this[r]=f,u},n["create".concat(js(N(this._container.inflector.singularize(i.name))))]=function(){var o,l;i.isPolymorphic?(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1]):(o=i.modelName,l=arguments.length<=0?void 0:arguments[0]);var u=i.schema[i.schema.toCollectionName(o)].create(l),f=this[r].models;return f.push(u),this[r]=f,this.save(),u.reload()}}disassociateAllDependentsFromTarget(t){var r=this.ownerModelName,n;this.isPolymorphic?n={type:t.modelName,id:t.id}:n=t.id;var i=this.schema[this.schema.toCollectionName(r)].where(s=>{var a=s[this.getForeignKey()];return a&&a.find(o=>typeof o=="object"?o.type===n.type&&o.id===n.id:o===n)});i.models.forEach(s=>{s.disassociate(t,this),s.save()})}}var vo={};class Ea{getModelClassFromPath(t){if(t){if(typeof vo[t]!="string"){for(var r=t.split("/"),n,i=r.length-1;i>=0;i--){var s=r[i];if(s.length&&s[0]!==":"){n=s;break}}vo[t]=D(N(this._container.inflector.singularize(n)))}return vo[t]}}_getIdForRequest(t,r){var n;return t&&t.params&&t.params.id?n=t.params.id:r&&r.data&&r.data.id&&(n=r.data.id),n}_getJsonApiDocForRequest(t,r){var n;return t&&t.requestBody&&(n=JSON.parse(t.requestBody)),this.serializerOrRegistry.normalize(n,r)}_getAttrsForRequest(t,r){var n=this._getJsonApiDocForRequest(t,r),i=this._getIdForRequest(t,n),s={};return O(n.data&&(n.data.attributes||n.data.type||n.data.relationships),"You're using a shorthand or #normalizedRequestAttrs, but your serializer's normalize function did not return a valid JSON:API document. Consult the docs for the normalize hook on the Serializer class."),n.data.attributes&&(s=Object.keys(n.data.attributes).reduce((a,o)=>(a[N(o)]=n.data.attributes[o],a),{})),n.data.relationships&&Object.keys(n.data.relationships).forEach(a=>{var o=n.data.relationships[a],l=this.schema.modelClassFor(r),u=l.associationFor(N(a)),f;O(u,"You're passing the relationship '".concat(a,"' to the '").concat(r,"' model via a ").concat(t.method," to '").concat(t.url,"', but you did not define the '").concat(a,"' association on the '").concat(r,"' model.")),u.isPolymorphic?f=o.data:u instanceof An?f=o.data&&o.data.map(c=>c.id):f=o.data&&o.data.id,s[u.identifier]=f},{}),i&&(s.id=i),s}_getAttrsForFormRequest(t){var{requestBody:r}=t,n,i=[];return O(r&&typeof r=="string","You're using the helper method #normalizedFormData, but the request body is empty or not a valid url encoded string."),i=r.split("&"),n=i.reduce((s,a)=>{var[o,l]=a.split("=");return s[o]=decodeURIComponent(l.replace(/\+/g," ")),s},{}),n}}class Em extends Ea{constructor(t,r,n,i,s){super(s),this.schema=t,this.serializerOrRegistry=r,this.userFunction=n,this.path=i}handle(t){return this.userFunction(this.schema,t)}setRequest(t){this.request=t}serialize(t,r){var n;return r?n=this.serializerOrRegistry.serializerFor(r,{explicit:!0}):n=this.serializerOrRegistry,n.serialize(t,this.request)}normalizedRequestAttrs(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,{path:r,request:n,request:{requestHeaders:i}}=this,s,a={};for(var o in i)a[o.toLowerCase()]=i[o];return/x-www-form-urlencoded/.test(a["content-type"])?s=this._getAttrsForFormRequest(n):(t?O(D(t)===t,"You called normalizedRequestAttrs('".concat(t,"'), but normalizedRequestAttrs was intended to be used with the dasherized version of the model type. Please change this to normalizedRequestAttrs('").concat(D(t),"').")):t=this.getModelClassFromPath(r),O(this.schema.hasModelForModelName(t),"You're using a shorthand or the #normalizedRequestAttrs helper but the detected model of '".concat(t,"' does not exist. You might need to pass in the correct modelName as the first argument to #normalizedRequestAttrs.")),s=this._getAttrsForRequest(n,t)),s}}class pb{constructor(t,r,n){this.schema=t,this.serializerOrRegistry=r,this.object=n}handle(){return this.object}}class Si extends Ea{constructor(t,r,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};super(),n=n||this.getModelClassFromPath(i),this.schema=t,this.serializerOrRegistry=r,this.shorthand=n,this.options=s;var a=Array.isArray(n)?"array":typeof n;if(a==="string"){var o=this.schema[this.schema.toCollectionName(n)];this.handle=u=>this.handleStringShorthand(u,o)}else if(a==="array"){var l=n.map(u=>this.schema[this.schema.toCollectionName(u)]);this.handle=u=>this.handleArrayShorthand(u,l)}}}class vb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t);if(s){var a=r.find(s);return a||new Le(404)}else if(this.options.coalesce){var o=this.serializerOrRegistry.getCoalescedIds(t,i);if(o)return r.find(o)}return r.all()}handleArrayShorthand(t,r){var n=this.shorthand,i=this._getIdForRequest(t);return O(!i||this._container.inflector.singularize(n[0])!==n[0],`It looks like you're using the "Single record with related records" version of the array shorthand, in addition to opting in to the model layer. This shorthand was made when there was no serializer layer. Now that you're using models, please ensure your relationships are defined, and create a serializer for the parent - model, adding the relationships there.`),r.map(s=>s.all())}}class fb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getAttrsForRequest(t,r.camelizedModelName);return r.create(s)}}class db extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t),a=r.find(s);if(!a)return new Le(404);var o=this._getAttrsForRequest(t,r.camelizedModelName);return a.update(o)}}class hb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t),a=r.find(s);if(!a)return new Le(404);a.destroy()}handleArrayShorthand(t,r){var n=this._getIdForRequest(t),i=r[0].find(n),s=r.slice(1).map(a=>this._container.inflector.pluralize(a.camelizedModelName));s.forEach(a=>i[a].destroy()),i.destroy()}}class pb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t);if(s){var a=r.find(s);return a?new Le(204):new Le(404)}else if(this.options.coalesce&&t.queryParams&&t.queryParams.ids){var o=r.find(t.queryParams.ids);return o?new Le(204):new Le(404)}else return new Le(204)}}var vb={get:200,put:204,post:201,delete:204};function mb(e){var{verb:t,schema:r,serializerOrRegistry:n,path:i,rawHandler:s,options:a,middleware:o}=e,l,u=[r,n,s,i,a,o],f=typeof s;return f==="function"?l=new xm(...u):f==="object"&&s?l=new ub(...u):t==="get"?l=new cb(...u):t==="post"?l=new fb(...u):t==="put"||t==="patch"?l=new db(...u):t==="delete"?l=new hb(...u):t==="head"&&(l=new pb(...u)),l}class $m{constructor(t){var{schema:r,verb:n,rawHandler:i,customizedCode:s,options:a,path:o,serializerOrRegistry:l,middleware:u}=t;this.verb=n,this.customizedCode=s,this.serializerOrRegistry=l,this.middleware=u||[],this.handler=mb({verb:n,schema:r,path:o,serializerOrRegistry:l,rawHandler:i,options:a})}handle(t){return this._getMirageResponseForRequest(t,this.middleware).then(r=>this.serialize(r,t)).then(r=>r.toRackResponse())}_getMirageResponseForRequest(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n;try{this.handler instanceof xm&&this.handler.setRequest(t),n=this.handleWithMiddleware(t,[...r,(s,a)=>this.handler.handle(a)])}catch(s){if(s instanceof zs)n=new Le(500,{},s);else{var i=s.message||s;n=new Le(500,{},{message:i,stack:"Mirage: Your ".concat(t.method," handler for the url ").concat(t.url,` threw an error: + model, adding the relationships there.`),r.map(s=>s.all())}}class mb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getAttrsForRequest(t,r.camelizedModelName);return r.create(s)}}class gb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t),a=r.find(s);if(!a)return new Le(404);var o=this._getAttrsForRequest(t,r.camelizedModelName);return a.update(o)}}class yb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t),a=r.find(s);if(!a)return new Le(404);a.destroy()}handleArrayShorthand(t,r){var n=this._getIdForRequest(t),i=r[0].find(n),s=r.slice(1).map(a=>this._container.inflector.pluralize(a.camelizedModelName));s.forEach(a=>i[a].destroy()),i.destroy()}}class wb extends Si{handleStringShorthand(t,r){var n=this.shorthand,i=N(n);O(r,"The route handler for ".concat(t.url," is trying to access the ").concat(i," model, but that model doesn't exist."));var s=this._getIdForRequest(t);if(s){var a=r.find(s);return a?new Le(204):new Le(404)}else if(this.options.coalesce&&t.queryParams&&t.queryParams.ids){var o=r.find(t.queryParams.ids);return o?new Le(204):new Le(404)}else return new Le(204)}}var _b={get:200,put:204,post:201,delete:204};function Sb(e){var{verb:t,schema:r,serializerOrRegistry:n,path:i,rawHandler:s,options:a,middleware:o}=e,l,u=[r,n,s,i,a,o],f=typeof s;return f==="function"?l=new Em(...u):f==="object"&&s?l=new pb(...u):t==="get"?l=new vb(...u):t==="post"?l=new mb(...u):t==="put"||t==="patch"?l=new gb(...u):t==="delete"?l=new yb(...u):t==="head"&&(l=new wb(...u)),l}class $m{constructor(t){var{schema:r,verb:n,rawHandler:i,customizedCode:s,options:a,path:o,serializerOrRegistry:l,middleware:u}=t;this.verb=n,this.customizedCode=s,this.serializerOrRegistry=l,this.middleware=u||[],this.handler=Sb({verb:n,schema:r,path:o,serializerOrRegistry:l,rawHandler:i,options:a})}handle(t){return this._getMirageResponseForRequest(t,this.middleware).then(r=>this.serialize(r,t)).then(r=>r.toRackResponse())}_getMirageResponseForRequest(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n;try{this.handler instanceof Em&&this.handler.setRequest(t),n=this.handleWithMiddleware(t,[...r,(s,a)=>this.handler.handle(a)])}catch(s){if(s instanceof zs)n=new Le(500,{},s);else{var i=s.message||s;n=new Le(500,{},{message:i,stack:"Mirage: Your ".concat(t.method," handler for the url ").concat(t.url,` threw an error: -`).concat(s.stack||s)})}}return this._toMirageResponse(n)}handleWithMiddleware(t,r){var n=this,[i,...s]=r;return i(this.schema,t,function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t;return n.handleWithMiddleware(a,s)})}_toMirageResponse(t){var r;return new Promise((n,i)=>{Promise.resolve(t).then(s=>{if(s instanceof Le)r=t;else{var a=this._getCodeForResponse(s);r=new Le(a,{},s)}n(r)}).catch(i)})}_getCodeForResponse(t){var r;return this.customizedCode?r=this.customizedCode:(r=vb[this.verb],r===204&&t!==void 0&&t!==""&&(r=200)),r}serialize(t,r){return t.data=this.serializerOrRegistry.serialize(t.data,r),t}}function Cm(e,t){class r extends this{constructor(){for(var i=arguments.length,s=new Array(i),a=0;a{this.attrs[s]=n[s]!==void 0?n[s]:null}),Object.keys(n).forEach(s=>{var a=n[s];this._validateAttr(s,a),this._setupAttr(s,a),this._setupRelationship(s,a)}),this}save(){var t=this._schema.toInternalCollectionName(this.modelName);return this.isNew()?(this.attrs=this._schema.db[t].insert(this.attrs),this._definePlainAttribute("id")):(this._schema.isSaving[this.toString()]=!0,this._schema.db[t].update(this.attrs.id,this.attrs)),this._saveAssociations(),this._schema.isSaving[this.toString()]=!1,this}update(t,r){var n;return t==null?this:(typeof t=="object"?n=t:(n={})[t]=r,Object.keys(n).forEach(function(i){!this.associationKeys.has(i)&&!this.associationIdKeys.has(i)&&this._definePlainAttribute(i),this[i]=n[i]},this),this.save(),this)}destroy(){if(this.isSaved()){this._disassociateFromDependents();var t=this._schema.toInternalCollectionName(this.modelName);this._schema.db[t].remove(this.attrs.id)}}isNew(){var t=!1,r=this.attrs.id!==void 0&&this.attrs.id!==null;if(r){var n=this._schema.toInternalCollectionName(this.modelName),i=this._schema.db[n].find(this.attrs.id);i&&(t=!0)}return!t}isSaved(){return!this.isNew()}reload(){if(this.id){var t=this._schema.toInternalCollectionName(this.modelName),r=this._schema.db[t].find(this.id);Object.keys(r).filter(function(n){return n!=="id"}).forEach(function(n){this.attrs[n]=r[n]},this)}return this._tempAssociations={},this}toJSON(){return ib({},this.attrs)}get associations(){return this._schema.associationsFor(this.modelName)}associationFor(t){return this.associations[t]}inverseFor(t){return this._explicitInverseFor(t)||this._implicitInverseFor(t)}_explicitInverseFor(t){this._checkForMultipleExplicitInverses(t);var r=this._schema.associationsFor(this.modelName),n=t.opts.inverse,i=n?r[n]:null,s=i&&i.isPolymorphic,a=i&&i.modelName===t.ownerModelName,o=i&&i.opts.inverse;return o&&i.opts.inverse!==t.name&&O(!1,"You specified an inverse of ".concat(n," for ").concat(t.name,", but it does not match ").concat(i.modelName," ").concat(i.name,"'s inverse")),s||a?i:null}_checkForMultipleExplicitInverses(t){var r=this._schema.associationsFor(this.modelName),n=Object.keys(r).filter(i=>{var s=r[i],a=t.ownerModelName===s.modelName,o=t.name===s.opts.inverse;return a&&o});O(n.length<=1,"The ".concat(this.modelName," model has defined multiple explicit inverse associations for the ").concat(t.ownerModelName,".").concat(t.name," association."))}_implicitInverseFor(t){var r=this._schema.associationsFor(this.modelName),n=t.ownerModelName;return ao(r).filter(i=>i.modelName===n).reduce((i,s)=>{var a=s.opts.inverse,o=a===void 0,l=a===t.name,u=o||l;return u&&(O(!i,"The ".concat(this.modelName," model has multiple possible inverse associations for the ").concat(t.ownerModelName,".").concat(t.name," association.")),i=s),i},null)}hasInverseFor(t){return!!this.inverseFor(t)}alreadyAssociatedWith(t,r){var n=this[r.name];if(n&&t)return n instanceof ze?n.isSaved()&&t.isSaved()?n.toString()===t.toString():n===t:n.includes(t)}associate(t,r){if(!this.alreadyAssociatedWith(t,r)){var{name:n}=r;r instanceof An?this[n].includes(t)||this[n].add(t):this[n]=t}}disassociate(t,r){var n=r.getForeignKey();if(r instanceof An){var i;if(r.isPolymorphic){var s=this[n].find(a=>{var{type:o,id:l}=a;return o===t.modelName&&l===t.id});i=s&&this[n].indexOf(s)}else i=this[n].map(a=>a.toString()).indexOf(t.id.toString());i>-1&&this.attrs[n].splice(i,1)}else this.attrs[n]=null}get isSaving(){return this._schema.isSaving[this.toString()]}_setupAttr(t,r){var n=this.associationKeys.has(t)||this.associationIdKeys.has(t);n||(this.attrs[t]=r,this._definePlainAttribute(t))}_definePlainAttribute(t){var r=Object.getOwnPropertyDescriptor(this,t);r&&r.get||(Object.prototype.hasOwnProperty.call(this.attrs,t)||(this.attrs[t]=null),Object.defineProperty(this,t,{get(){return this.attrs[t]},set(n){this.attrs[t]=n}}))}_setupRelationship(t,r){var n=this.associationIdKeys.has(t)||this.fks.includes(t),i=this.associationKeys.has(t);n&&(r!=null&&this._validateForeignKeyExistsInDatabase(t,r),this.attrs[t]=r),i&&(this[t]=r)}_validateAttr(t,r){if(this.associationKeys.has(t)){var n=this.associationFor(t),i=r===null;if(n instanceof An){var s=r instanceof Ce||r instanceof ce,a=Array.isArray(r)&&r.every(d=>d instanceof ze);O(s||a||i,"You're trying to create a ".concat(this.modelName,' model and you passed in "').concat(r,'" under the ').concat(t," key, but that key is a HasMany relationship. You must pass in a Collection, PolymorphicCollection, array of Models, or null."))}else n instanceof Dn&&O(r instanceof ze||i,"You're trying to create a ".concat(this.modelName,' model and you passed in "').concat(r,'" under the ').concat(t," key, but that key is a BelongsTo relationship. You must pass in a Model or null."))}if(this.associationIdKeys.has(t)&&t.endsWith("Ids")){var o=Array.isArray(r),l=r===null;O(o||l,"You're trying to create a ".concat(this.modelName,' model and you passed in "').concat(r,'" under the ').concat(t," key, but that key is a foreign key for a HasMany relationship. You must pass in an array of ids or null."))}{var u=r instanceof ze||r instanceof Ce||r instanceof ce,f=Array.isArray(r)&&r.length&&r.every(d=>d instanceof ze);if(u||f){var c=r;O(this.associationKeys.has(t),"You're trying to create a ".concat(this.modelName," model and you passed in a ").concat(c.toString()," under the ").concat(t," key, but you haven't defined that key as an association on your model."))}}}_validateForeignKeyExistsInDatabase(t,r){if(Array.isArray(r)){var n=this.hasManyAssociationFks[t],i;n.isPolymorphic?(i=r.map(u=>{var{type:f,id:c}=u;return this._schema.db[this._schema.toInternalCollectionName(f)].find(c)}),i=ya(i)):i=this._schema.db[this._schema.toInternalCollectionName(n.modelName)].find(r);var s=n.isPolymorphic?r.map(u=>"".concat(u.type,":").concat(u.id)).join(","):r;O(i.length===r.length,"You're instantiating a ".concat(this.modelName," that has a ").concat(t," of ").concat(s,", but some of those records don't exist in the database."))}else{var a=this.belongsToAssociationFks[t],o;a.isPolymorphic?o=this._schema.db[this._schema.toInternalCollectionName(r.type)].find(r.id):o=this._schema.db[this._schema.toInternalCollectionName(a.modelName)].find(r);var l=a.isPolymorphic?"".concat(r.type,":").concat(r.id):r;O(o,"You're instantiating a ".concat(this.modelName," that has a ").concat(t," of ").concat(l,", but that record doesn't exist in the database."))}}_saveAssociations(){this._saveBelongsToAssociations(),this._saveHasManyAssociations()}_saveBelongsToAssociations(){ao(this.belongsToAssociations).forEach(t=>{this._disassociateFromOldInverses(t),this._saveNewAssociates(t),this._associateWithNewInverses(t)})}_saveHasManyAssociations(){ao(this.hasManyAssociations).forEach(t=>{this._disassociateFromOldInverses(t),this._saveNewAssociates(t),this._associateWithNewInverses(t)})}_disassociateFromOldInverses(t){t instanceof An?this._disassociateFromHasManyInverses(t):t instanceof Dn&&this._disassociateFromBelongsToInverse(t)}_disassociateFromHasManyInverses(t){var r=t.getForeignKey(),n=this._tempAssociations&&this._tempAssociations[t.name],i=this.attrs[r];if(n&&i){var s;t.isPolymorphic?s=i.map(a=>{var{type:o,id:l}=a;return this._schema[this._schema.toCollectionName(o)].find(l)}):s=this._schema[this._schema.toCollectionName(t.modelName)].find(i||[]).models,s.filter(a=>!a.isSaving&&!n.includes(a)&&a.hasInverseFor(t)).forEach(a=>{var o=a.inverseFor(t);a.disassociate(this,o),a.save()})}}_disassociateFromBelongsToInverse(t){var r=t.getForeignKey(),n=this._tempAssociations&&this._tempAssociations[t.name],i=this.attrs[r];if(n!==void 0&&i){var s;if(t.isPolymorphic?s=this._schema[this._schema.toCollectionName(i.type)].find(i.id):s=this._schema[this._schema.toCollectionName(t.modelName)].find(i),s.hasInverseFor(t)){var a=s.inverseFor(t);s.disassociate(this,a),s._updateInDb(s.attrs)}}}_disassociateFromDependents(){this._schema.dependentAssociationsFor(this.modelName).forEach(t=>{t.disassociateAllDependentsFromTarget(this)})}_saveNewAssociates(t){var r=t.getForeignKey(),n=this._tempAssociations&&this._tempAssociations[t.name];if(n!==void 0){if(this.__isSavingNewChildren=!0,delete this._tempAssociations[t.name],n instanceof Ce)n.models.filter(s=>!s.isSaving).forEach(s=>{s.save()}),this._updateInDb({[r]:n.models.map(s=>s.id)});else if(n instanceof ce)n.models.filter(s=>!s.isSaving).forEach(s=>{s.save()}),this._updateInDb({[r]:n.models.map(s=>({type:s.modelName,id:s.id}))});else if(n===null)this._updateInDb({[r]:null});else if(this.equals(n))this._updateInDb({[r]:this.id});else if(!n.isSaving){n.save(),this._syncTempAssociations(n);var i;t.isPolymorphic?i={id:n.id,type:n.modelName}:i=n.id,this._updateInDb({[r]:i})}this.__isSavingNewChildren=!1}}_associateWithNewInverses(t){if(!this.__isSavingNewChildren){var r=this[t.name];r instanceof ze?this._associateModelWithInverse(r,t):(r instanceof Ce||r instanceof ce)&&r.models.forEach(n=>{this._associateModelWithInverse(n,t)}),delete this._tempAssociations[t.name]}}_associateModelWithInverse(t,r){if(t.hasInverseFor(r)){var n=t.inverseFor(r),i=n.getForeignKey(),s=this.id;if(n instanceof Dn){var a;n.isPolymorphic?a={type:this.modelName,id:s}:a=s,this._schema.db[this._schema.toInternalCollectionName(t.modelName)].update(t.id,{[i]:a})}else{var o=this._schema.db[this._schema.toInternalCollectionName(t.modelName)],l=o.find(t.id)[n.getForeignKey()]||[],u=Object.assign([],l),f,c;n.isPolymorphic?(f={type:this.modelName,id:s},c=u.some(d=>d.type==this.modelName&&d.id==s)):(f=s,c=u.includes(s)),c||u.push(f),o.update(t.id,{[i]:u})}}}_updateInDb(t){this.attrs=this._schema.db[this._schema.toInternalCollectionName(this.modelName)].update(this.attrs.id,t)}_syncTempAssociations(t){Object.keys(this._tempAssociations).forEach(r=>{this._tempAssociations[r]&&this._tempAssociations[r].toString()===t.toString()&&(this._tempAssociations[r]=t)})}toString(){var t=this.id?"(".concat(this.id,")"):"";return"model:".concat(this.modelName).concat(t)}equals(t){return this.toString()===t.toString()}}ze.extend=Cm;ze.findBelongsToAssociation=function(e){return this.prototype.belongsToAssociations[e]};class qe{constructor(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.registry=t,this.type=r,this.request=n,this.attrs=this.attrs||void 0,this.include=this.include||[],this.root=this.root||void 0,this.embed=this.embed||void 0,this._embedFn=Ef(this.embed)?this.embed:()=>!!this.embed,this.serializeIds=this.serializeIds||void 0,this.primaryKey=this.primaryKey||void 0}serialize(t){return this.primaryResource=t,this.buildPayload(t)}normalize(t){return t}buildPayload(t,r,n,i){if(!t&&Cl(r))return i;if(t){var[s,a]=this.getHashForPrimaryResource(t),o=this.isCollection(t)?t.models:[t];return this.buildPayload(void 0,a,o,s)}else{var l=r.shift(),[u,f]=this.getHashForIncludedResource(l),c=f.filter(m=>!n.map(y=>y.toString()).includes(m.toString())).concat(r),d=(this.isCollection(l)?l.models:[l]).concat(n),g=this.mergePayloads(i,u);return this.buildPayload(void 0,c,d,g)}}getHashForPrimaryResource(t){var[r,n]=this.getHashForResource(t),i;if(this.root){O(!(t instanceof ce),"The base Serializer class cannot serialize a top-level PolymorphicCollection when root is true, since PolymorphicCollections have no type.");var s=this.serializerFor(t.modelName),a=s.keyForResource(t);i={[a]:r}}else i=r;return[i,n]}getHashForIncludedResource(t){var r,n;if(t instanceof ce)r={},n=t.models;else{var i=this.serializerFor(t.modelName),[s,a]=i.getHashForResource(t),o=i.keyForRelationship(t.modelName);r=Array.isArray(s)?{[o]:s}:{[o]:[s]},n=a}return[r,n]}getHashForResource(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=this,a;i&&t.modelName&&(s=this.serializerFor(t.modelName)),this.isModel(t)?a=s._hashForModel(t,r,n):a=t.models.map(l=>{var u=s;return u||(u=this.serializerFor(l.modelName)),u._hashForModel(l,r,n)});var o=um(ya(Uv(s.getKeysForIncluded().map(l=>this.isCollection(t)?t.models.map(u=>u[l]):t[l]))),l=>l.toString());return[a,o]}mergePayloads(t,r){var n,[i]=Object.keys(r);return t[i]?(n=t,n[i]=t[i].concat(r[i])):n=Object.assign(t,r),n}keyForResource(t){var{modelName:r}=t;return this.isModel(t)?this.keyForModel(r):this.keyForCollection(r)}keyForModel(t){return N(t)}keyForCollection(t){return this._container.inflector.pluralize(this.keyForModel(t))}_hashForModel(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this._attrsForModel(t);if(r&&t.fks.forEach(a=>{delete i[a]}),this.embed){var s=Object.assign({},n);s[t.modelName]=s[t.modelName]||{},s[t.modelName][t.id]=!0,this.getKeysForEmbedded().forEach(a=>{var o=t[a];if(o&&!bv(s,"".concat(o.modelName,".").concat(o.id))){var[l]=this.getHashForResource(o,!0,s,!0),u=this.keyForEmbeddedRelationship(a);if(i[u]=l,this.isModel(o)){var f="".concat(N(a),"Id");delete i[f]}}})}return this._maybeAddAssociationIds(t,i)}_attrsForModel(t){var r={};return this.attrs?r=this.attrs.reduce((n,i)=>(n[i]=t[i],n),{}):r=Object.assign(r,t.attrs),t.fks.forEach(n=>delete r[n]),this._formatAttributeKeys(r)}_maybeAddAssociationIds(t,r){var n=Object.assign({},r);return this.serializeIds==="always"?[...t.associationKeys].filter(i=>!this._embedFn(i)).forEach(i=>{var s=t[i],a=t.associationFor(i);if(this.isCollection(s)){var o=this.keyForRelationshipIds(i);n[o]=t["".concat(this._container.inflector.singularize(i),"Ids")]}else if(this.isModel(s)&&a.isPolymorphic){var l=this.keyForPolymorphicForeignKeyType(i),u=this.keyForPolymorphicForeignKeyId(i);n[l]=t["".concat(i,"Id")].type,n[u]=t["".concat(i,"Id")].id}else if(s){var f=this.keyForForeignKey(i);n[f]=t["".concat(i,"Id")]}}):this.serializeIds==="included"&&this.getKeysForIncluded().forEach(i=>{var s=t[i],a=t.associationFor(i);if(this.isCollection(s)){var o=this.keyForRelationshipIds(i);n[o]=t["".concat(this._container.inflector.singularize(i),"Ids")]}else if(this.isModel(s)&&a.isPolymorphic){var l=this.keyForPolymorphicForeignKeyType(i),u=this.keyForPolymorphicForeignKeyId(i);n[l]=t["".concat(i,"Id")].type,n[u]=t["".concat(i,"Id")].id}else if(this.isModel(s)){var f=this.keyForForeignKey(i);n[f]=t["".concat(i,"Id")]}}),n}keyForAttribute(t){return t==="id"?this.keyForId():t}keyForRelationship(t){return N(this._container.inflector.pluralize(t))}keyForEmbeddedRelationship(t){return N(t)}keyForRelationshipIds(t){return"".concat(this._container.inflector.singularize(N(t)),"Ids")}keyForForeignKey(t){return"".concat(N(t),"Id")}keyForPolymorphicForeignKeyId(t){return"".concat(N(t),"Id")}keyForPolymorphicForeignKeyType(t){return"".concat(N(t),"Type")}isModel(t){return t instanceof ze}isCollection(t){return t instanceof Ce||t instanceof ce}isModelOrCollection(t){return this.isModel(t)||this.isCollection(t)}serializerFor(t){return this.registry.serializerFor(t)}getAssociationKeys(){return Ef(this.include)?this.include(this.request,this.primaryResource):this.include}getKeysForEmbedded(){return this.getAssociationKeys().filter(t=>this._embedFn(t))}getKeysForIncluded(){return this.getAssociationKeys().filter(t=>!this._embedFn(t))}get schema(){return this.registry.schema}keyForId(){return this.primaryKey}valueForId(t){return t}_formatAttributeKeys(t){var r={};for(var n in t){var i=t[n];n==="id"&&(i=this.valueForId(i));var s=this.keyForAttribute(n);r[s]=i}return r}getCoalescedIds(){}}qe.prototype.include=[];qe.prototype.root=!0;qe.prototype.embed=!1;qe.prototype.primaryKey="id";qe.prototype.serializeIds="included";qe.extend=Cm;class Pm extends qe{constructor(){super(...arguments),this.alwaysIncludeLinkageData=this.alwaysIncludeLinkageData||void 0}keyForModel(t){return D(t)}keyForCollection(t){return D(t)}keyForAttribute(t){return D(t)}keyForRelationship(t){return D(t)}links(){}getHashForPrimaryResource(t){this._createRequestedIncludesGraph(t);var r=this.getHashForResource(t),n={data:r},i=this.getAddToIncludesForResource(t);return[n,i]}getHashForIncludedResource(t){var r=this.serializerFor(t.modelName),n=r.getHashForResource(t),i={included:this.isModel(t)?[n]:n},s=[];return this.hasQueryParamIncludes()||(s=this.getAddToIncludesForResource(t)),[i,s]}getHashForResource(t){var r;return this.isModel(t)?r=this.getResourceObjectForModel(t):r=t.models.map(n=>this.getResourceObjectForModel(n)),r}getAddToIncludesForResource(t){var r;if(this.hasQueryParamIncludes())r=this.getQueryParamIncludes();else{var n=this.serializerFor(t.modelName);r=n.getKeysForIncluded()}return this.getAddToIncludesForResourceAndPaths(t,r)}getAddToIncludesForResourceAndPaths(t,r){var n=[];return r.forEach(i=>{var s=i.split("."),a=this.getIncludesForResourceAndPath(t,...s);n.push(a)}),um(ya(Uv(n)),i=>i.toString())}getIncludesForResourceAndPath(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{var f=u[s];this.isModel(f)?o.push(f):this.isCollection(f)&&(o=o.concat(f.models))});return a=a.concat(o),n.length&&o.forEach(u=>{a=a.concat(this.getIncludesForResourceAndPath(u,...n))}),a}getResourceObjectForModel(t){var r=this._attrsForModel(t,!0);delete r.id;var n={type:this.typeKeyForModel(t),id:t.id,attributes:r};return this._maybeAddRelationshipsToResourceObjectForModel(n,t)}_maybeAddRelationshipsToResourceObjectForModel(t,r){var n={};return r.associationKeys.forEach(i=>{var s=r[i],a=this.keyForRelationship(i),o={};if(this.hasLinksForRelationship(r,i)){var l=this.serializerFor(r.modelName),u=l.links(r);o.links=u[i]}if(this.alwaysIncludeLinkageData||this.shouldIncludeLinkageData(i,r)||this._relationshipIsIncludedForModel(i,r)){var f=null;this.isModel(s)?f={type:this.typeKeyForModel(s),id:s.id}:this.isCollection(s)&&(f=s.models.map(c=>({type:this.typeKeyForModel(c),id:c.id}))),o.data=f}Cl(o)||(n[a]=o)}),Cl(n)||(t.relationships=n),t}hasLinksForRelationship(t,r){var n=this.serializerFor(t.modelName),i=n.links&&n.links(t);return i&&i[r]!=null}_relationshipIsIncludedForModel(t,r){if(this.hasQueryParamIncludes()){var n=this.request._includesGraph,i=this._graphKeyForModel(r),s;return n.data[i]?s=n.data[i]:n.included[this._container.inflector.pluralize(r.modelName)]&&(s=n.included[this._container.inflector.pluralize(r.modelName)][i]),s&&s.relationships&&Object.prototype.hasOwnProperty.call(s.relationships,D(t))}else{var a=this.getKeysForIncluded();return a.includes(t)}}_createRequestedIncludesGraph(t){var r={data:{}};if(this.isModel(t)){var n=this._graphKeyForModel(t);r.data[n]={},this._addPrimaryModelToRequestedIncludesGraph(r,t)}else this.isCollection(t)&&t.models.forEach(i=>{var s=this._graphKeyForModel(i);r.data[s]={},this._addPrimaryModelToRequestedIncludesGraph(r,i)});this.request._includesGraph=r}_addPrimaryModelToRequestedIncludesGraph(t,r){if(this.hasQueryParamIncludes()){var n=this._graphKeyForModel(r);this.getQueryParamIncludes().filter(i=>!!i.trim()).forEach(i=>{t.data[n].relationships=t.data[n].relationships||{};var s=i.split(".").map(D),a=s[0],o=a,l=N(a),u=r.associationKeys.has(l);O(u,'You tried to include "'.concat(a,'" with ').concat(r,' but no association named "').concat(l,'" is defined on the model.'));var f=r[l],c;this.isModel(f)?c=this._graphKeyForModel(f):this.isCollection(f)?c=f.models.map(this._graphKeyForModel):c=null,t.data[n].relationships[o]=c,f&&this._addResourceToRequestedIncludesGraph(t,f,s.slice(1))})}}_addResourceToRequestedIncludesGraph(t,r,n){t.included=t.included||{};var i=this.isCollection(r)?r.models:[r];i.forEach(s=>{var a=this._container.inflector.pluralize(s.modelName);t.included[a]=t.included[a]||{},this._addModelToRequestedIncludesGraph(t,s,n)})}_addModelToRequestedIncludesGraph(t,r,n){var i=this._container.inflector.pluralize(r.modelName),s=this._graphKeyForModel(r);t.included[i][s]=t.included[i][s]||{},n.length&&this._addResourceRelationshipsToRequestedIncludesGraph(t,i,s,r,n)}_addResourceRelationshipsToRequestedIncludesGraph(t,r,n,i,s){t.included[r][n].relationships=t.included[r][n].relationships||{};var a=s[0],o=i[N(a)],l;this.isModel(o)?l=this._graphKeyForModel(o):this.isCollection(o)&&(l=o.models.map(this._graphKeyForModel)),t.included[r][n].relationships[a]=l,o&&this._addResourceToRequestedIncludesGraph(t,o,s.slice(1))}_graphKeyForModel(t){return"".concat(t.modelName,":").concat(t.id)}getQueryParamIncludes(){var t=bv(this,"request.queryParams.include");return t&&!Array.isArray(t)&&(t=t.split(",")),t}hasQueryParamIncludes(){return!!this.getQueryParamIncludes()}typeKeyForModel(t){return D(this._container.inflector.pluralize(t.modelName))}getCoalescedIds(t){var r=t.queryParams&&t.queryParams["filter[id]"];return typeof r=="string"?r.split(","):r}shouldIncludeLinkageData(t,r){return!1}}Pm.prototype.alwaysIncludeLinkageData=!1;class Tm{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.schema=t,this._serializerMap=r}normalize(t,r){return this.serializerFor(r).normalize(t)}serialize(t,r){if(this.request=r,this._isModelOrCollection(t)){var n=this.serializerFor(t.modelName);return n.serialize(t,r)}else return Array.isArray(t)&&t.some(this._isCollection)?t.reduce((i,s)=>{var a=this.serializerFor(s.modelName);return a.embed?i[this._container.inflector.pluralize(s.modelName)]=a.serialize(s,r):i=Object.assign(i,a.serialize(s,r)),i},{}):t}serializerFor(t){var{explicit:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t&&this._serializerMap&&this._serializerMap[N(t)];return r?O(!!n,"You passed in ".concat(t," as an explicit serializer type but that serializer doesn't exist.")):(n=n||this._serializerMap.application||qe,O(!n||n.prototype.embed||n.prototype.root||new n instanceof Pm,"You cannot have a serializer that sideloads (embed: false) and disables the root (root: false).")),new n(this,t,this.request)}_isModel(t){return t instanceof ze}_isCollection(t){return t instanceof Ce||t instanceof ce}_isModelOrCollection(t){return this._isModel(t)||this._isCollection(t)}registerSerializers(t){var r=this._serializerMap||{};this._serializerMap=Object.assign(r,t)}getCoalescedIds(t,r){return this.serializerFor(r).getCoalescedIds(t)}}var mo={},go={},yo={};class Am{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};O(t,"A schema requires a db"),this.db=t,this._registry={},this._dependentAssociations={polymorphic:[]},this.registerModels(r),this.isSaving={}}registerModels(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};OF(t,(r,n)=>{this.registerModel(n,t[n])})}registerModel(t,r){var n=N(t),i=D(n);r=r.extend(),this._registry[n]=this._registry[n]||{class:null,foreignKeys:[]},this._registry[n].class=r,r.prototype._schema=this,r.prototype.modelName=i,r.prototype.hasManyAssociations={},r.prototype.hasManyAssociationFks={},r.prototype.belongsToAssociations={},r.prototype.belongsToAssociationFks={},r.prototype.associationKeys=new Set,r.prototype.associationIdKeys=new Set,r.prototype.dependentAssociations=[];var s={};for(var a in r.prototype)if(r.prototype[a]instanceof _i){var o=r.prototype[a];o.name=a,o.modelName=o.modelName||this.toModelName(a),o.ownerModelName=i,o.setSchema(this);var[l,u]=o.getForeignKeyArray();s[l]=s[l]||[],O(!s[l].includes(u),"Your '".concat(t,"' model definition has multiple possible inverse relationships of type '").concat(l,"'. Please use explicit inverses.")),s[l].push(u),this._addForeignKeyToRegistry(l,u),o.addMethodsToModelClass(r,a)}var f=this.toCollectionName(i);return this.db[f]||this.db.createCollection(f),this[f]={camelizedModelName:n,new:c=>this.new(n,c),create:c=>this.create(n,c),all:c=>this.all(n,c),find:c=>this.find(n,c),findBy:c=>this.findBy(n,c),findOrCreateBy:c=>this.findOrCreateBy(n,c),where:c=>this.where(n,c),none:c=>this.none(n,c),first:c=>this.first(n,c)},this}modelFor(t){return this._registry[t]}new(t,r){return this._instantiateModel(D(t),r)}create(t,r){return this.new(t,r).save()}all(t){var r=this.collectionForType(t);return this._hydrate(r,D(t))}none(t){return this._hydrate([],D(t))}find(t,r){var n=this.collectionForType(t),i=n.find(r);return Array.isArray(r)&&O(i.length===r.length,"Couldn't find all ".concat(this._container.inflector.pluralize(t)," with ids: (").concat(r.join(","),") (found ").concat(i.length," results, but was looking for ").concat(r.length,")")),this._hydrate(i,D(t))}findBy(t,r){var n=this.collectionForType(t),i=n.findBy(r);return this._hydrate(i,D(t))}findOrCreateBy(t,r){var n=this.collectionForType(t),i=n.findBy(r),s;return i?s=this._hydrate(i,D(t)):s=this.create(t,r),s}where(t,r){var n=this.collectionForType(t),i=n.where(r);return this._hydrate(i,D(t))}first(t){var r=this.collectionForType(t),n=r[0];return this._hydrate(n,D(t))}modelClassFor(t){var r=this._registry[N(t)];return O(r,"Model not registered: ".concat(t)),r.class.prototype}addDependentAssociation(t,r){t.isPolymorphic?this._dependentAssociations.polymorphic.push(t):(this._dependentAssociations[r]=this._dependentAssociations[r]||[],this._dependentAssociations[r].push(t))}dependentAssociationsFor(t){var r=this._dependentAssociations[t]||[],n=this._dependentAssociations.polymorphic||[];return r.concat(n)}associationsFor(t){var r=this.modelClassFor(t);return Object.assign({},r.belongsToAssociations,r.hasManyAssociations)}hasModelForModelName(t){return this.modelFor(N(t))}collectionForType(t){var r=this.toCollectionName(t);return O(this.db[r],"You're trying to find model(s) of type ".concat(t," but this collection doesn't exist in the database.")),this.db[r]}toCollectionName(t){if(typeof mo[t]!="string"){var r=D(t),n=N(this._container.inflector.pluralize(r));mo[t]=n}return mo[t]}toInternalCollectionName(t){if(typeof go[t]!="string"){var r="_".concat(this.toCollectionName(t));go[t]=r}return go[t]}toModelName(t){if(typeof yo[t]!="string"){var r=D(t),n=this._container.inflector.singularize(r);yo[t]=n}return yo[t]}_addForeignKeyToRegistry(t,r){this._registry[t]=this._registry[t]||{class:null,foreignKeys:[]};var n=this._registry[t].foreignKeys;n.includes(r)||n.push(r)}_instantiateModel(t,r){var n=this._modelFor(t),i=this._foreignKeysFor(t);return new n(this,t,r,i)}_modelFor(t){return this._registry[N(t)].class}_foreignKeysFor(t){return this._registry[N(t)].foreignKeys}_hydrate(t,r){if(Array.isArray(t)){var n=t.map(function(i){return this._instantiateModel(r,i)},this);return new Ce(r,n)}else return t?this._instantiateModel(r,t):null}}var gb={Db:Em,Association:_i,RouteHandler:$m,BaseRouteHandler:xa,Serializer:qe,SerializerRegistry:Tm,Schema:Am},yb={singularize:qv,pluralize:Kv};class Rm{constructor(){this.inflector=yb}register(t,r){this[t]=r}create(t){var r=gb[t];r.prototype._container=this;for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s/.+\.hot-update.json$/.test(e.url)],Ol={coalesce:!1,timing:void 0};function _b(e){if(!e||typeof e!="object")return!1;for(var t=Object.keys(Ol),r=Object.keys(e),n=0;n-1)return!0}return!1}function Sb(e){var[t]=e.splice(-1);_b(t)?t=Pl({},Ol,t):(e.push(t),t=Ol);for(var r=2-e.length;r-- >0;)e.push(void 0);return e.push(t),e}class Eb{constructor(){$t(this,"urlPrefix",void 0),$t(this,"namespace",void 0),$t(this,"timing",void 0),$t(this,"passthroughChecks",void 0),$t(this,"pretender",void 0),$t(this,"mirageServer",void 0),$t(this,"trackRequests",void 0)}create(t,r){var n=this;this.mirageServer=t,this.pretender=this._create(t,r),t.pretender=this.pretender,this.passthroughChecks=this.passthroughChecks||[],this.config(r),[["get"],["post"],["put"],["delete","del"],["patch"],["head"],["options"]].forEach(i=>{var[s,a]=i;this[s]=function(o){for(var l,u=arguments.length,f=new Array(u>1?u-1:0),c=1;cn.timing;return(l=n.pretender)===null||l===void 0?void 0:l[s](_,y,p)},t[s]=this[s],a&&(this[a]=this[s],t[a]=this[s])})}config(t){var r,n,i=typeof t.useDefaultPassthroughs<"u"?t.useDefaultPassthroughs:!0;i&&this._configureDefaultPassthroughs();var s=t.trackRequests!==void 0&&t.trackRequests!==this.trackRequests;O(!s,"You cannot modify Pretender's request tracking once the server is created"),this.timing=(r=(n=t.timing)!==null&&n!==void 0?n:this.timing)!==null&&r!==void 0?r:400,this.urlPrefix=this.urlPrefix||t.urlPrefix||"",this.namespace=this.namespace||t.namespace||""}_configureDefaultPassthroughs(){wb.forEach(t=>{this.passthrough(t)})}_create(t,r){if(typeof window<"u")return this.trackRequests=r.trackRequests||!1,new Ea(function(){this.passthroughRequest=function(i,s,a){t.shouldLog()&&console.log("Mirage: Passthrough request for ".concat(i.toUpperCase()," ").concat(a.url))},this.handledRequest=function(i,s,a){if(t.shouldLog()){console.groupCollapsed("Mirage: [".concat(a.status,"] ").concat(i.toUpperCase()," ").concat(a.url));var{requestBody:o,responseText:l}=a,u,f;try{u=JSON.parse(o)}catch{u=o}try{f=JSON.parse(l)}catch{f=l}console.groupCollapsed("Response"),console.log(f),console.groupEnd(),console.groupCollapsed("Request (data)"),console.log(u),console.groupEnd(),console.groupCollapsed("Request (raw)"),console.log(a),console.groupEnd(),console.groupEnd()}};var n=this.checkPassthrough;this.checkPassthrough=function(i){var s=t.passthroughChecks.some(o=>o(i));if(s){var a=i.url.includes("?")?i.url.substr(0,i.url.indexOf("?")):i.url;this[i.method.toLowerCase()](a,this.passthrough)}return n.apply(this,arguments)},this.unhandledRequest=function(i,s){s=decodeURI(s);var a="";this.namespace===""?a="There is no existing namespace defined. Please define one":a="The existing namespace is ".concat(this.namespace),O("Your app tried to ".concat(i," '").concat(s,"', but there was no route defined to handle this request. Define a route for this endpoint in your routes() config. Did you forget to define a namespace? ").concat(a))}},{trackRequests:this.trackRequests})}passthrough(){for(var t=arguments.length,r=new Array(t),n=0;n1&&Array.isArray(s)&&(i=r.pop()),r.forEach(a=>{typeof a=="function"?this.passthroughChecks.push(a):i.forEach(o=>{var l=this._getFullPath(a);this.pretender[o](l,this.pretender.passthrough)})})}}_getFullPath(t){t=t[0]==="/"?t.slice(1):t;var r="",n=this.urlPrefix?this.urlPrefix.trim():"",i="";if(this.urlPrefix&&this.namespace&&(this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]==="/"&&(i=this.namespace.substring(0,this.namespace.length-1).substring(1)),this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i=this.namespace.substring(1)),this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]==="/"&&(i=this.namespace.substring(0,this.namespace.length-1)),this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i=this.namespace)),this.namespace&&!this.urlPrefix){if(this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]==="/"&&(i=this.namespace.substring(0,this.namespace.length-1)),this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i=this.namespace),this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]==="/"){var s=this.namespace.substring(0,this.namespace.length-1);i="/".concat(s)}this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i="/".concat(this.namespace))}return this.namespace||(i=""),/^https?:\/\//.test(t)?r+=t:(n.length&&(r+=n[n.length-1]==="/"?n:"".concat(n,"/")),r+=i,r[r.length-1]!=="/"&&(r+="/"),r+=t,/^https?:\/\//.test(r)||(r="/".concat(r),r=r.replace(/\/+/g,"/"))),r}start(){}shutdown(){this.pretender.shutdown()}}var wo={},xb={singularize:qv,pluralize:Kv};function $b(e){var t=new Cb(e);return t}class Cb{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._container=new Rm,this.config(t),this.db=this.db||void 0,this.schema=this.schema||void 0,this.middleware=[]}get namespace(){return this.interceptor.namespace}set namespace(t){this.interceptor.namespace=t}get urlPrefix(){return this.interceptor.urlPrefix}set urlPrefix(t){this.interceptor.urlPrefix=t}get timing(){return this.interceptor.timing}set timing(t){this.interceptor.timing=t}get passthroughChecks(){return this.interceptor.passthroughChecks}set passthroughChecks(t){this.interceptor.passthroughChecks=t}config(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interceptor||(t.interceptor=new Eb),this.interceptor?this.interceptor.config(t):(this.interceptor=t.interceptor,this.interceptor.create(this,t));var r=t.environment&&this.environment&&this.environment!==t.environment;O(!r,"You cannot modify Mirage's environment once the server is created"),this.environment=t.environment||this.environment||"development",t.routes&&(O(!t.baseConfig,"The routes option is an alias for the baseConfig option. You can't pass both options into your server definition."),t.baseConfig=t.routes),t.seeds&&(O(!t.scenarios,"The seeds option is an alias for the scenarios.default option. You can't pass both options into your server definition."),t.scenarios={default:t.seeds}),this._config=t,this.inflector=t.inflector||xb,this._container.register("inflector",this.inflector),this.logging=t.logging!==void 0?this.logging:void 0,this.testConfig=this.testConfig||void 0,this.trackRequests=t.trackRequests,this.db?this.db.registerIdentityManagers(t.identityManagers):this.db=this._container.create("Db",void 0,t.identityManagers),this.schema?(this.schema.registerModels(t.models),this.serializerOrRegistry.registerSerializers(t.serializers||{})):(this.schema=this._container.create("Schema",this.db,t.models),this.serializerOrRegistry=this._container.create("SerializerRegistry",this.schema,t.serializers));var n=this._hasModulesOfType(t,"factories"),i=t.scenarios&&Object.prototype.hasOwnProperty.call(t.scenarios,"default");t.baseConfig&&this.loadConfig(t.baseConfig),this.isTest()&&(this.loadConfig(t.testConfig),typeof window<"u"&&(window.server=this)),this.isTest()&&n?this.loadFactories(t.factories):!this.isTest()&&i?(this.loadFactories(t.factories),t.scenarios.default(this)):this.loadFixtures()}start(){var t=this;return nb(function*(){var r,n;yield(r=(n=t.interceptor).start)===null||r===void 0?void 0:r.call(n)})()}isTest(){return this.environment==="test"}shouldLog(){return typeof this.logging<"u"?this.logging:!this.isTest()}loadConfig(t){t==null||t.call(this),this.timing=this.isTest()?0:this.timing||0}passthrough(){for(var t,r,n=arguments.length,i=new Array(n),s=0;s!t[o]);if(a.length)throw new Error("Fixtures not found: ".concat(a.join(", ")));t=tI(t,...s)}this.db.loadData(t)}loadFactories(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=this._factoryMap||{};this._factoryMap=Pl(r,t),Object.keys(t).forEach(n=>{var i=this.schema.toCollectionName(n);this.db.createCollection(i)})}factoryFor(t){var r=N(t);if(this._factoryMap&&this._factoryMap[r])return this._factoryMap[r]}build(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;im&&typeof m=="string"),a=oo(n,m=>ml(m)),o=N(t);this.factorySequences=this.factorySequences||{},this.factorySequences[o]=this.factorySequences[o]+1||0;var l=this.factoryFor(t);if(l){l=l.extend({});var u=l.attrs||{};this._validateTraits(s,l,t);var f=this._mergeExtensions(u,s,a);this._mapAssociationsFromAttributes(t,u,a),this._mapAssociationsFromAttributes(t,f);var c=l.extend(f),d=new c,g=this.factorySequences[o];return d.build(g)}else return a}buildList(t,r){O(yd(r),"second argument has to be an integer, you passed: ".concat(typeof r));for(var n=[],i=arguments.length,s=new Array(i>2?i-2:0),a=2;a1?r-1:0),i=1;im&&typeof m=="string"),a=oo(n,m=>ml(m)),o=oo(n,m=>m&&Array.isArray(m)),l=this.build(t,...s,a),u;if(this.schema&&this.schema[this.schema.toCollectionName(t)]){var f=this.schema[this.schema.toCollectionName(t)];u=f.create(l)}else{var c,d;o?c=o:(d=this.schema?this.schema.toInternalCollectionName(t):"_".concat(this.inflector.pluralize(t)),c=this.db[d]),O(c,"You called server.create('".concat(t,"') but no model or factory was found.")),u=c.insert(l)}var g=this.factoryFor(t);return g&&g.extractAfterCreateCallbacks({traits:s}).forEach(m=>{m(u,this)}),u}createList(t,r){O(this._modelOrFactoryExistsForType(t),"You called server.createList('".concat(t,"') but no model or factory was found. Make sure you're passing in the singularized version of the model or factory name.")),O(yd(r),"second argument has to be an integer, you passed: ".concat(typeof r));for(var n=[],i=this.schema?this.schema.toInternalCollectionName(t):"_".concat(this.inflector.pluralize(t)),s=this.db[i],a=arguments.length,o=new Array(a>2?a-2:0),l=2;l1&&arguments[1]!==void 0?arguments[1]:{};if(t=this.inflector.pluralize(t),i=i||"/".concat(t),r=r||[],n=n||[],r.length>0&&n.length>0)throw"cannot use both :only and :except options";var s={index:{methods:["get"],path:"".concat(i)},show:{methods:["get"],path:"".concat(i,"/:id")},create:{methods:["post"],path:"".concat(i)},update:{methods:["put","patch"],path:"".concat(i,"/:id")},delete:{methods:["del"],path:"".concat(i,"/:id")}},a=Object.keys(s),o=r.length>0&&r||n.length>0&&a.filter(l=>n.indexOf(l)===-1)||a;o.forEach(l=>{var u=s[l];u.methods.forEach(f=>i===t?this[f](u.path):this[f](u.path,t))})}_serialize(t){return typeof t=="string"||t instanceof Blob||t instanceof ArrayBuffer||t instanceof FormData||t instanceof ReadableStream||t instanceof URLSearchParams||t&&typeof t=="object"&&"isView"in t&&t.isView()?t:JSON.stringify(t)}registerRouteHandler(t,r,n,i,s){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:this.middleware,o=this._container.create("RouteHandler",{schema:this.schema,verb:t,rawHandler:n,customizedCode:i,options:s,path:r,serializerOrRegistry:this.serializerOrRegistry,middleware:a});return l=>o.handle(l).then(u=>{var[f,c,d]=u;return[f,c,this._serialize(d)]})}_hasModulesOfType(t,r){var n=t[r];return n?Object.keys(n).length>0:!1}_typeIsPluralForModel(t){if(typeof wo[t]!="boolean"){var r=this._modelOrFactoryExistsForTypeOrCollectionName(t),n=t===this.inflector.pluralize(t),i=this.inflector.singularize(t)===this.inflector.pluralize(t),s=n&&!i&&r;wo[t]=s}return wo[t]}_modelOrFactoryExistsForType(t){var r=this.schema&&this.schema.modelFor(N(t)),n=this.db[this.schema.toInternalCollectionName(t)];return(r||n)&&!this._typeIsPluralForModel(t)}_modelOrFactoryExistsForTypeOrCollectionName(t){var r=this.schema&&this.schema.modelFor(N(t)),n=this.db[this.schema.toInternalCollectionName(t)];return r||n}_validateTraits(t,r,n){t.forEach(i=>{if(!r.isTrait(i))throw new Error("'".concat(i,"' trait is not registered in '").concat(n,"' factory"))})}_mergeExtensions(t,r,n){var i=r.map(s=>t[s].extension);return i.push(n||{}),i.reduce((s,a)=>Pl(s,a),{})}_mapAssociationsFromAttributes(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r||{}).filter(i=>ob(r[i])).forEach(i=>{var s=this.schema.modelClassFor(t),a=s.associationFor(i);O(a&&a instanceof Dn,"You're using the `association` factory helper on the '".concat(i,"' attribute of your ").concat(t," factory, but that attribute is not a `belongsTo` association."));var o=a&&a instanceof Dn&&a.modelName===t;O(!o,"You're using the association() helper on your ".concat(t," factory for ").concat(i,", which is a belongsTo self-referential relationship. You can't do this as it will lead to infinite recursion. You can move the helper inside of a trait and use it selectively."));var l=a&&a.opts&&a.opts.polymorphic;O(!l,"You're using the association() helper on your ".concat(t," factory for ").concat(i,", which is a polymorphic relationship. This is not currently supported."));var u=r[i],f="".concat(N(i),"Id");n[i]||(r[f]=this.create(a.modelName,...u.traitsAndOverrides).id),delete r[i]})}}var bd=qe.extend({serializeIds:"always",normalizeIds:!0,keyForModel(e){return it(e)},keyForAttribute(e){return e=qe.prototype.keyForAttribute.apply(this,arguments),it(e)},keyForRelationship(e){return this._container.inflector.pluralize(it(e))},keyForEmbeddedRelationship(e){return it(e)},keyForRelationshipIds(e){return"".concat(it(this._container.inflector.singularize(e)),"_ids")},keyForForeignKey(e){return"".concat(it(e),"_id")},keyForPolymorphicForeignKeyId(e){return"".concat(it(e),"_id")},keyForPolymorphicForeignKeyType(e){return"".concat(it(e),"_type")},normalize(e){var t=Object.keys(e)[0],r=e[t],n=N(t),i=this.schema.modelClassFor(n),{belongsToAssociations:s,hasManyAssociations:a}=i,o=Object.keys(s),l=Object.keys(a);this.primaryKey!=="id"&&(r.id=r[this.primaryKey],delete r[this.primaryKey]);var u={data:{type:this._container.inflector.pluralize(t),attributes:{}}};r.id&&(u.data.id=r.id);var f={};return Object.keys(r).forEach(c=>{if(c!=="id")if(this.normalizeIds)if(o.includes(c)){var d=s[c],g=d.modelName;f[D(c)]={data:{type:g,id:r[c]}}}else if(l.includes(c)){var m=a[c],y=m.modelName,_=r[c].map(p=>({type:y,id:p}));f[D(c)]={data:_}}else u.data.attributes[D(c)]=r[c];else u.data.attributes[D(c)]=r[c]}),Object.keys(f).length&&(u.data.relationships=f),u},getCoalescedIds(e){return e.queryParams&&e.queryParams.ids}});bd.extend({serializeIds:"always",keyForModel(e){return N(e)},keyForAttribute(e){return e=bd.prototype.keyForAttribute.apply(this,arguments),N(e)},keyForRelationship(e){return N(this._container.inflector.pluralize(e))},keyForEmbeddedRelationship(e){return N(e)},keyForRelationshipIds(e){return N(this._container.inflector.pluralize(e))},keyForForeignKey(e){return N(this._container.inflector.singularize(e))},getCoalescedIds(e){return e.queryParams&&e.queryParams.ids}});$b({models:{vans:ze},seeds(e){e.create("van",{id:"1",name:"Modest Explorer",price:60,description:"The Modest Explorer is a van designed to get you out of the house and into nature. This beauty is equipped with solar panels, a composting toilet, a water tank and kitchenette. The idea is that you can pack up your home and escape for a weekend or even longer!",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/modest-explorer.png",type:"simple"}),e.create("van",{id:"2",name:"Beach Bum",price:80,description:"Beach Bum is a van inspired by surfers and travelers. It was created to be a portable home away from home, but with some cool features in it you won't find in an ordinary camper.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/beach-bum.png",type:"rugged"}),e.create("van",{id:"3",name:"Reliable Red",price:100,description:"Reliable Red is a van that was made for travelling. The inside is comfortable and cozy, with plenty of space to stretch out in. There's a small kitchen, so you can cook if you need to. You'll feel like home as soon as you step out of it.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/reliable-red.png",type:"luxury"}),e.create("van",{id:"4",name:"Dreamfinder",price:65,description:"Dreamfinder is the perfect van to travel in and experience. With a ceiling height of 2.1m, you can stand up in this van and there is great head room. The floor is a beautiful glass-reinforced plastic (GRP) which is easy to clean and very hard wearing. A large rear window and large side windows make it really light inside and keep it well ventilated.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/dreamfinder.png",type:"simple"}),e.create("van",{id:"5",name:"The Cruiser",price:120,description:"The Cruiser is a van for those who love to travel in comfort and luxury. With its many windows, spacious interior and ample storage space, the Cruiser offers a beautiful view wherever you go.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/the-cruiser.png",type:"luxury"}),e.create("van",{id:"6",name:"Green Wonder",price:70,description:"With this van, you can take your travel life to the next level. The Green Wonder is a sustainable vehicle that's perfect for people who are looking for a stylish, eco-friendly mode of transport that can go anywhere.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/green-wonder.png",type:"rugged"})},routes(){this.namespace="api",this.logging=!1,this.get("/vans",(e,t)=>e.vans.all()),this.get("/vans/:id",(e,t)=>{const r=t.params.id;return e.vans.find(r)})}});function Pb(){return E.jsx("div",{className:" h-screen",children:E.jsxs(t0,{children:[E.jsxs("header",{className:"bg-main-background flex justify-between p-5 items-center h-[15%]",children:[E.jsx(zn,{to:"/VanLife/",className:" font-extrabold text-[2rem]",children:"#VANLIFE"}),E.jsxs("nav",{className:"flex gap-5 text-gray-text font-semibold",children:[E.jsx(zn,{to:"/VanLife/about",children:"About"}),E.jsx(zn,{to:"/VanLife/vans",children:"Vans"})]})]}),E.jsxs(G1,{children:[E.jsx(Tn,{path:"/VanLife/",element:E.jsx(s0,{})}),E.jsx(Tn,{path:"/VanLife/about",element:E.jsx(a0,{})}),E.jsx(Tn,{path:"VanLife/vans",element:E.jsx(l0,{})}),E.jsx(Tn,{path:"VanLife/vanDetails/:id",element:E.jsx(y0,{})})]})]})})}_o.createRoot(document.getElementById("root")).render(E.jsx(Ne.StrictMode,{children:E.jsx(Pb,{})})); +`).concat(s.stack||s)})}}return this._toMirageResponse(n)}handleWithMiddleware(t,r){var n=this,[i,...s]=r;return i(this.schema,t,function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t;return n.handleWithMiddleware(a,s)})}_toMirageResponse(t){var r;return new Promise((n,i)=>{Promise.resolve(t).then(s=>{if(s instanceof Le)r=t;else{var a=this._getCodeForResponse(s);r=new Le(a,{},s)}n(r)}).catch(i)})}_getCodeForResponse(t){var r;return this.customizedCode?r=this.customizedCode:(r=_b[this.verb],r===204&&t!==void 0&&t!==""&&(r=200)),r}serialize(t,r){return t.data=this.serializerOrRegistry.serialize(t.data,r),t}}function Cm(e,t){class r extends this{constructor(){for(var i=arguments.length,s=new Array(i),a=0;a{this.attrs[s]=n[s]!==void 0?n[s]:null}),Object.keys(n).forEach(s=>{var a=n[s];this._validateAttr(s,a),this._setupAttr(s,a),this._setupRelationship(s,a)}),this}save(){var t=this._schema.toInternalCollectionName(this.modelName);return this.isNew()?(this.attrs=this._schema.db[t].insert(this.attrs),this._definePlainAttribute("id")):(this._schema.isSaving[this.toString()]=!0,this._schema.db[t].update(this.attrs.id,this.attrs)),this._saveAssociations(),this._schema.isSaving[this.toString()]=!1,this}update(t,r){var n;return t==null?this:(typeof t=="object"?n=t:(n={})[t]=r,Object.keys(n).forEach(function(i){!this.associationKeys.has(i)&&!this.associationIdKeys.has(i)&&this._definePlainAttribute(i),this[i]=n[i]},this),this.save(),this)}destroy(){if(this.isSaved()){this._disassociateFromDependents();var t=this._schema.toInternalCollectionName(this.modelName);this._schema.db[t].remove(this.attrs.id)}}isNew(){var t=!1,r=this.attrs.id!==void 0&&this.attrs.id!==null;if(r){var n=this._schema.toInternalCollectionName(this.modelName),i=this._schema.db[n].find(this.attrs.id);i&&(t=!0)}return!t}isSaved(){return!this.isNew()}reload(){if(this.id){var t=this._schema.toInternalCollectionName(this.modelName),r=this._schema.db[t].find(this.id);Object.keys(r).filter(function(n){return n!=="id"}).forEach(function(n){this.attrs[n]=r[n]},this)}return this._tempAssociations={},this}toJSON(){return ub({},this.attrs)}get associations(){return this._schema.associationsFor(this.modelName)}associationFor(t){return this.associations[t]}inverseFor(t){return this._explicitInverseFor(t)||this._implicitInverseFor(t)}_explicitInverseFor(t){this._checkForMultipleExplicitInverses(t);var r=this._schema.associationsFor(this.modelName),n=t.opts.inverse,i=n?r[n]:null,s=i&&i.isPolymorphic,a=i&&i.modelName===t.ownerModelName,o=i&&i.opts.inverse;return o&&i.opts.inverse!==t.name&&O(!1,"You specified an inverse of ".concat(n," for ").concat(t.name,", but it does not match ").concat(i.modelName," ").concat(i.name,"'s inverse")),s||a?i:null}_checkForMultipleExplicitInverses(t){var r=this._schema.associationsFor(this.modelName),n=Object.keys(r).filter(i=>{var s=r[i],a=t.ownerModelName===s.modelName,o=t.name===s.opts.inverse;return a&&o});O(n.length<=1,"The ".concat(this.modelName," model has defined multiple explicit inverse associations for the ").concat(t.ownerModelName,".").concat(t.name," association."))}_implicitInverseFor(t){var r=this._schema.associationsFor(this.modelName),n=t.ownerModelName;return ao(r).filter(i=>i.modelName===n).reduce((i,s)=>{var a=s.opts.inverse,o=a===void 0,l=a===t.name,u=o||l;return u&&(O(!i,"The ".concat(this.modelName," model has multiple possible inverse associations for the ").concat(t.ownerModelName,".").concat(t.name," association.")),i=s),i},null)}hasInverseFor(t){return!!this.inverseFor(t)}alreadyAssociatedWith(t,r){var n=this[r.name];if(n&&t)return n instanceof ze?n.isSaved()&&t.isSaved()?n.toString()===t.toString():n===t:n.includes(t)}associate(t,r){if(!this.alreadyAssociatedWith(t,r)){var{name:n}=r;r instanceof An?this[n].includes(t)||this[n].add(t):this[n]=t}}disassociate(t,r){var n=r.getForeignKey();if(r instanceof An){var i;if(r.isPolymorphic){var s=this[n].find(a=>{var{type:o,id:l}=a;return o===t.modelName&&l===t.id});i=s&&this[n].indexOf(s)}else i=this[n].map(a=>a.toString()).indexOf(t.id.toString());i>-1&&this.attrs[n].splice(i,1)}else this.attrs[n]=null}get isSaving(){return this._schema.isSaving[this.toString()]}_setupAttr(t,r){var n=this.associationKeys.has(t)||this.associationIdKeys.has(t);n||(this.attrs[t]=r,this._definePlainAttribute(t))}_definePlainAttribute(t){var r=Object.getOwnPropertyDescriptor(this,t);r&&r.get||(Object.prototype.hasOwnProperty.call(this.attrs,t)||(this.attrs[t]=null),Object.defineProperty(this,t,{get(){return this.attrs[t]},set(n){this.attrs[t]=n}}))}_setupRelationship(t,r){var n=this.associationIdKeys.has(t)||this.fks.includes(t),i=this.associationKeys.has(t);n&&(r!=null&&this._validateForeignKeyExistsInDatabase(t,r),this.attrs[t]=r),i&&(this[t]=r)}_validateAttr(t,r){if(this.associationKeys.has(t)){var n=this.associationFor(t),i=r===null;if(n instanceof An){var s=r instanceof Ce||r instanceof ce,a=Array.isArray(r)&&r.every(d=>d instanceof ze);O(s||a||i,"You're trying to create a ".concat(this.modelName,' model and you passed in "').concat(r,'" under the ').concat(t," key, but that key is a HasMany relationship. You must pass in a Collection, PolymorphicCollection, array of Models, or null."))}else n instanceof Dn&&O(r instanceof ze||i,"You're trying to create a ".concat(this.modelName,' model and you passed in "').concat(r,'" under the ').concat(t," key, but that key is a BelongsTo relationship. You must pass in a Model or null."))}if(this.associationIdKeys.has(t)&&t.endsWith("Ids")){var o=Array.isArray(r),l=r===null;O(o||l,"You're trying to create a ".concat(this.modelName,' model and you passed in "').concat(r,'" under the ').concat(t," key, but that key is a foreign key for a HasMany relationship. You must pass in an array of ids or null."))}{var u=r instanceof ze||r instanceof Ce||r instanceof ce,f=Array.isArray(r)&&r.length&&r.every(d=>d instanceof ze);if(u||f){var c=r;O(this.associationKeys.has(t),"You're trying to create a ".concat(this.modelName," model and you passed in a ").concat(c.toString()," under the ").concat(t," key, but you haven't defined that key as an association on your model."))}}}_validateForeignKeyExistsInDatabase(t,r){if(Array.isArray(r)){var n=this.hasManyAssociationFks[t],i;n.isPolymorphic?(i=r.map(u=>{var{type:f,id:c}=u;return this._schema.db[this._schema.toInternalCollectionName(f)].find(c)}),i=ya(i)):i=this._schema.db[this._schema.toInternalCollectionName(n.modelName)].find(r);var s=n.isPolymorphic?r.map(u=>"".concat(u.type,":").concat(u.id)).join(","):r;O(i.length===r.length,"You're instantiating a ".concat(this.modelName," that has a ").concat(t," of ").concat(s,", but some of those records don't exist in the database."))}else{var a=this.belongsToAssociationFks[t],o;a.isPolymorphic?o=this._schema.db[this._schema.toInternalCollectionName(r.type)].find(r.id):o=this._schema.db[this._schema.toInternalCollectionName(a.modelName)].find(r);var l=a.isPolymorphic?"".concat(r.type,":").concat(r.id):r;O(o,"You're instantiating a ".concat(this.modelName," that has a ").concat(t," of ").concat(l,", but that record doesn't exist in the database."))}}_saveAssociations(){this._saveBelongsToAssociations(),this._saveHasManyAssociations()}_saveBelongsToAssociations(){ao(this.belongsToAssociations).forEach(t=>{this._disassociateFromOldInverses(t),this._saveNewAssociates(t),this._associateWithNewInverses(t)})}_saveHasManyAssociations(){ao(this.hasManyAssociations).forEach(t=>{this._disassociateFromOldInverses(t),this._saveNewAssociates(t),this._associateWithNewInverses(t)})}_disassociateFromOldInverses(t){t instanceof An?this._disassociateFromHasManyInverses(t):t instanceof Dn&&this._disassociateFromBelongsToInverse(t)}_disassociateFromHasManyInverses(t){var r=t.getForeignKey(),n=this._tempAssociations&&this._tempAssociations[t.name],i=this.attrs[r];if(n&&i){var s;t.isPolymorphic?s=i.map(a=>{var{type:o,id:l}=a;return this._schema[this._schema.toCollectionName(o)].find(l)}):s=this._schema[this._schema.toCollectionName(t.modelName)].find(i||[]).models,s.filter(a=>!a.isSaving&&!n.includes(a)&&a.hasInverseFor(t)).forEach(a=>{var o=a.inverseFor(t);a.disassociate(this,o),a.save()})}}_disassociateFromBelongsToInverse(t){var r=t.getForeignKey(),n=this._tempAssociations&&this._tempAssociations[t.name],i=this.attrs[r];if(n!==void 0&&i){var s;if(t.isPolymorphic?s=this._schema[this._schema.toCollectionName(i.type)].find(i.id):s=this._schema[this._schema.toCollectionName(t.modelName)].find(i),s.hasInverseFor(t)){var a=s.inverseFor(t);s.disassociate(this,a),s._updateInDb(s.attrs)}}}_disassociateFromDependents(){this._schema.dependentAssociationsFor(this.modelName).forEach(t=>{t.disassociateAllDependentsFromTarget(this)})}_saveNewAssociates(t){var r=t.getForeignKey(),n=this._tempAssociations&&this._tempAssociations[t.name];if(n!==void 0){if(this.__isSavingNewChildren=!0,delete this._tempAssociations[t.name],n instanceof Ce)n.models.filter(s=>!s.isSaving).forEach(s=>{s.save()}),this._updateInDb({[r]:n.models.map(s=>s.id)});else if(n instanceof ce)n.models.filter(s=>!s.isSaving).forEach(s=>{s.save()}),this._updateInDb({[r]:n.models.map(s=>({type:s.modelName,id:s.id}))});else if(n===null)this._updateInDb({[r]:null});else if(this.equals(n))this._updateInDb({[r]:this.id});else if(!n.isSaving){n.save(),this._syncTempAssociations(n);var i;t.isPolymorphic?i={id:n.id,type:n.modelName}:i=n.id,this._updateInDb({[r]:i})}this.__isSavingNewChildren=!1}}_associateWithNewInverses(t){if(!this.__isSavingNewChildren){var r=this[t.name];r instanceof ze?this._associateModelWithInverse(r,t):(r instanceof Ce||r instanceof ce)&&r.models.forEach(n=>{this._associateModelWithInverse(n,t)}),delete this._tempAssociations[t.name]}}_associateModelWithInverse(t,r){if(t.hasInverseFor(r)){var n=t.inverseFor(r),i=n.getForeignKey(),s=this.id;if(n instanceof Dn){var a;n.isPolymorphic?a={type:this.modelName,id:s}:a=s,this._schema.db[this._schema.toInternalCollectionName(t.modelName)].update(t.id,{[i]:a})}else{var o=this._schema.db[this._schema.toInternalCollectionName(t.modelName)],l=o.find(t.id)[n.getForeignKey()]||[],u=Object.assign([],l),f,c;n.isPolymorphic?(f={type:this.modelName,id:s},c=u.some(d=>d.type==this.modelName&&d.id==s)):(f=s,c=u.includes(s)),c||u.push(f),o.update(t.id,{[i]:u})}}}_updateInDb(t){this.attrs=this._schema.db[this._schema.toInternalCollectionName(this.modelName)].update(this.attrs.id,t)}_syncTempAssociations(t){Object.keys(this._tempAssociations).forEach(r=>{this._tempAssociations[r]&&this._tempAssociations[r].toString()===t.toString()&&(this._tempAssociations[r]=t)})}toString(){var t=this.id?"(".concat(this.id,")"):"";return"model:".concat(this.modelName).concat(t)}equals(t){return this.toString()===t.toString()}}ze.extend=Cm;ze.findBelongsToAssociation=function(e){return this.prototype.belongsToAssociations[e]};class qe{constructor(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.registry=t,this.type=r,this.request=n,this.attrs=this.attrs||void 0,this.include=this.include||[],this.root=this.root||void 0,this.embed=this.embed||void 0,this._embedFn=xf(this.embed)?this.embed:()=>!!this.embed,this.serializeIds=this.serializeIds||void 0,this.primaryKey=this.primaryKey||void 0}serialize(t){return this.primaryResource=t,this.buildPayload(t)}normalize(t){return t}buildPayload(t,r,n,i){if(!t&&Cl(r))return i;if(t){var[s,a]=this.getHashForPrimaryResource(t),o=this.isCollection(t)?t.models:[t];return this.buildPayload(void 0,a,o,s)}else{var l=r.shift(),[u,f]=this.getHashForIncludedResource(l),c=f.filter(m=>!n.map(y=>y.toString()).includes(m.toString())).concat(r),d=(this.isCollection(l)?l.models:[l]).concat(n),g=this.mergePayloads(i,u);return this.buildPayload(void 0,c,d,g)}}getHashForPrimaryResource(t){var[r,n]=this.getHashForResource(t),i;if(this.root){O(!(t instanceof ce),"The base Serializer class cannot serialize a top-level PolymorphicCollection when root is true, since PolymorphicCollections have no type.");var s=this.serializerFor(t.modelName),a=s.keyForResource(t);i={[a]:r}}else i=r;return[i,n]}getHashForIncludedResource(t){var r,n;if(t instanceof ce)r={},n=t.models;else{var i=this.serializerFor(t.modelName),[s,a]=i.getHashForResource(t),o=i.keyForRelationship(t.modelName);r=Array.isArray(s)?{[o]:s}:{[o]:[s]},n=a}return[r,n]}getHashForResource(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=this,a;i&&t.modelName&&(s=this.serializerFor(t.modelName)),this.isModel(t)?a=s._hashForModel(t,r,n):a=t.models.map(l=>{var u=s;return u||(u=this.serializerFor(l.modelName)),u._hashForModel(l,r,n)});var o=um(ya(Uv(s.getKeysForIncluded().map(l=>this.isCollection(t)?t.models.map(u=>u[l]):t[l]))),l=>l.toString());return[a,o]}mergePayloads(t,r){var n,[i]=Object.keys(r);return t[i]?(n=t,n[i]=t[i].concat(r[i])):n=Object.assign(t,r),n}keyForResource(t){var{modelName:r}=t;return this.isModel(t)?this.keyForModel(r):this.keyForCollection(r)}keyForModel(t){return N(t)}keyForCollection(t){return this._container.inflector.pluralize(this.keyForModel(t))}_hashForModel(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this._attrsForModel(t);if(r&&t.fks.forEach(a=>{delete i[a]}),this.embed){var s=Object.assign({},n);s[t.modelName]=s[t.modelName]||{},s[t.modelName][t.id]=!0,this.getKeysForEmbedded().forEach(a=>{var o=t[a];if(o&&!bv(s,"".concat(o.modelName,".").concat(o.id))){var[l]=this.getHashForResource(o,!0,s,!0),u=this.keyForEmbeddedRelationship(a);if(i[u]=l,this.isModel(o)){var f="".concat(N(a),"Id");delete i[f]}}})}return this._maybeAddAssociationIds(t,i)}_attrsForModel(t){var r={};return this.attrs?r=this.attrs.reduce((n,i)=>(n[i]=t[i],n),{}):r=Object.assign(r,t.attrs),t.fks.forEach(n=>delete r[n]),this._formatAttributeKeys(r)}_maybeAddAssociationIds(t,r){var n=Object.assign({},r);return this.serializeIds==="always"?[...t.associationKeys].filter(i=>!this._embedFn(i)).forEach(i=>{var s=t[i],a=t.associationFor(i);if(this.isCollection(s)){var o=this.keyForRelationshipIds(i);n[o]=t["".concat(this._container.inflector.singularize(i),"Ids")]}else if(this.isModel(s)&&a.isPolymorphic){var l=this.keyForPolymorphicForeignKeyType(i),u=this.keyForPolymorphicForeignKeyId(i);n[l]=t["".concat(i,"Id")].type,n[u]=t["".concat(i,"Id")].id}else if(s){var f=this.keyForForeignKey(i);n[f]=t["".concat(i,"Id")]}}):this.serializeIds==="included"&&this.getKeysForIncluded().forEach(i=>{var s=t[i],a=t.associationFor(i);if(this.isCollection(s)){var o=this.keyForRelationshipIds(i);n[o]=t["".concat(this._container.inflector.singularize(i),"Ids")]}else if(this.isModel(s)&&a.isPolymorphic){var l=this.keyForPolymorphicForeignKeyType(i),u=this.keyForPolymorphicForeignKeyId(i);n[l]=t["".concat(i,"Id")].type,n[u]=t["".concat(i,"Id")].id}else if(this.isModel(s)){var f=this.keyForForeignKey(i);n[f]=t["".concat(i,"Id")]}}),n}keyForAttribute(t){return t==="id"?this.keyForId():t}keyForRelationship(t){return N(this._container.inflector.pluralize(t))}keyForEmbeddedRelationship(t){return N(t)}keyForRelationshipIds(t){return"".concat(this._container.inflector.singularize(N(t)),"Ids")}keyForForeignKey(t){return"".concat(N(t),"Id")}keyForPolymorphicForeignKeyId(t){return"".concat(N(t),"Id")}keyForPolymorphicForeignKeyType(t){return"".concat(N(t),"Type")}isModel(t){return t instanceof ze}isCollection(t){return t instanceof Ce||t instanceof ce}isModelOrCollection(t){return this.isModel(t)||this.isCollection(t)}serializerFor(t){return this.registry.serializerFor(t)}getAssociationKeys(){return xf(this.include)?this.include(this.request,this.primaryResource):this.include}getKeysForEmbedded(){return this.getAssociationKeys().filter(t=>this._embedFn(t))}getKeysForIncluded(){return this.getAssociationKeys().filter(t=>!this._embedFn(t))}get schema(){return this.registry.schema}keyForId(){return this.primaryKey}valueForId(t){return t}_formatAttributeKeys(t){var r={};for(var n in t){var i=t[n];n==="id"&&(i=this.valueForId(i));var s=this.keyForAttribute(n);r[s]=i}return r}getCoalescedIds(){}}qe.prototype.include=[];qe.prototype.root=!0;qe.prototype.embed=!1;qe.prototype.primaryKey="id";qe.prototype.serializeIds="included";qe.extend=Cm;class Pm extends qe{constructor(){super(...arguments),this.alwaysIncludeLinkageData=this.alwaysIncludeLinkageData||void 0}keyForModel(t){return D(t)}keyForCollection(t){return D(t)}keyForAttribute(t){return D(t)}keyForRelationship(t){return D(t)}links(){}getHashForPrimaryResource(t){this._createRequestedIncludesGraph(t);var r=this.getHashForResource(t),n={data:r},i=this.getAddToIncludesForResource(t);return[n,i]}getHashForIncludedResource(t){var r=this.serializerFor(t.modelName),n=r.getHashForResource(t),i={included:this.isModel(t)?[n]:n},s=[];return this.hasQueryParamIncludes()||(s=this.getAddToIncludesForResource(t)),[i,s]}getHashForResource(t){var r;return this.isModel(t)?r=this.getResourceObjectForModel(t):r=t.models.map(n=>this.getResourceObjectForModel(n)),r}getAddToIncludesForResource(t){var r;if(this.hasQueryParamIncludes())r=this.getQueryParamIncludes();else{var n=this.serializerFor(t.modelName);r=n.getKeysForIncluded()}return this.getAddToIncludesForResourceAndPaths(t,r)}getAddToIncludesForResourceAndPaths(t,r){var n=[];return r.forEach(i=>{var s=i.split("."),a=this.getIncludesForResourceAndPath(t,...s);n.push(a)}),um(ya(Uv(n)),i=>i.toString())}getIncludesForResourceAndPath(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{var f=u[s];this.isModel(f)?o.push(f):this.isCollection(f)&&(o=o.concat(f.models))});return a=a.concat(o),n.length&&o.forEach(u=>{a=a.concat(this.getIncludesForResourceAndPath(u,...n))}),a}getResourceObjectForModel(t){var r=this._attrsForModel(t,!0);delete r.id;var n={type:this.typeKeyForModel(t),id:t.id,attributes:r};return this._maybeAddRelationshipsToResourceObjectForModel(n,t)}_maybeAddRelationshipsToResourceObjectForModel(t,r){var n={};return r.associationKeys.forEach(i=>{var s=r[i],a=this.keyForRelationship(i),o={};if(this.hasLinksForRelationship(r,i)){var l=this.serializerFor(r.modelName),u=l.links(r);o.links=u[i]}if(this.alwaysIncludeLinkageData||this.shouldIncludeLinkageData(i,r)||this._relationshipIsIncludedForModel(i,r)){var f=null;this.isModel(s)?f={type:this.typeKeyForModel(s),id:s.id}:this.isCollection(s)&&(f=s.models.map(c=>({type:this.typeKeyForModel(c),id:c.id}))),o.data=f}Cl(o)||(n[a]=o)}),Cl(n)||(t.relationships=n),t}hasLinksForRelationship(t,r){var n=this.serializerFor(t.modelName),i=n.links&&n.links(t);return i&&i[r]!=null}_relationshipIsIncludedForModel(t,r){if(this.hasQueryParamIncludes()){var n=this.request._includesGraph,i=this._graphKeyForModel(r),s;return n.data[i]?s=n.data[i]:n.included[this._container.inflector.pluralize(r.modelName)]&&(s=n.included[this._container.inflector.pluralize(r.modelName)][i]),s&&s.relationships&&Object.prototype.hasOwnProperty.call(s.relationships,D(t))}else{var a=this.getKeysForIncluded();return a.includes(t)}}_createRequestedIncludesGraph(t){var r={data:{}};if(this.isModel(t)){var n=this._graphKeyForModel(t);r.data[n]={},this._addPrimaryModelToRequestedIncludesGraph(r,t)}else this.isCollection(t)&&t.models.forEach(i=>{var s=this._graphKeyForModel(i);r.data[s]={},this._addPrimaryModelToRequestedIncludesGraph(r,i)});this.request._includesGraph=r}_addPrimaryModelToRequestedIncludesGraph(t,r){if(this.hasQueryParamIncludes()){var n=this._graphKeyForModel(r);this.getQueryParamIncludes().filter(i=>!!i.trim()).forEach(i=>{t.data[n].relationships=t.data[n].relationships||{};var s=i.split(".").map(D),a=s[0],o=a,l=N(a),u=r.associationKeys.has(l);O(u,'You tried to include "'.concat(a,'" with ').concat(r,' but no association named "').concat(l,'" is defined on the model.'));var f=r[l],c;this.isModel(f)?c=this._graphKeyForModel(f):this.isCollection(f)?c=f.models.map(this._graphKeyForModel):c=null,t.data[n].relationships[o]=c,f&&this._addResourceToRequestedIncludesGraph(t,f,s.slice(1))})}}_addResourceToRequestedIncludesGraph(t,r,n){t.included=t.included||{};var i=this.isCollection(r)?r.models:[r];i.forEach(s=>{var a=this._container.inflector.pluralize(s.modelName);t.included[a]=t.included[a]||{},this._addModelToRequestedIncludesGraph(t,s,n)})}_addModelToRequestedIncludesGraph(t,r,n){var i=this._container.inflector.pluralize(r.modelName),s=this._graphKeyForModel(r);t.included[i][s]=t.included[i][s]||{},n.length&&this._addResourceRelationshipsToRequestedIncludesGraph(t,i,s,r,n)}_addResourceRelationshipsToRequestedIncludesGraph(t,r,n,i,s){t.included[r][n].relationships=t.included[r][n].relationships||{};var a=s[0],o=i[N(a)],l;this.isModel(o)?l=this._graphKeyForModel(o):this.isCollection(o)&&(l=o.models.map(this._graphKeyForModel)),t.included[r][n].relationships[a]=l,o&&this._addResourceToRequestedIncludesGraph(t,o,s.slice(1))}_graphKeyForModel(t){return"".concat(t.modelName,":").concat(t.id)}getQueryParamIncludes(){var t=bv(this,"request.queryParams.include");return t&&!Array.isArray(t)&&(t=t.split(",")),t}hasQueryParamIncludes(){return!!this.getQueryParamIncludes()}typeKeyForModel(t){return D(this._container.inflector.pluralize(t.modelName))}getCoalescedIds(t){var r=t.queryParams&&t.queryParams["filter[id]"];return typeof r=="string"?r.split(","):r}shouldIncludeLinkageData(t,r){return!1}}Pm.prototype.alwaysIncludeLinkageData=!1;class Tm{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.schema=t,this._serializerMap=r}normalize(t,r){return this.serializerFor(r).normalize(t)}serialize(t,r){if(this.request=r,this._isModelOrCollection(t)){var n=this.serializerFor(t.modelName);return n.serialize(t,r)}else return Array.isArray(t)&&t.some(this._isCollection)?t.reduce((i,s)=>{var a=this.serializerFor(s.modelName);return a.embed?i[this._container.inflector.pluralize(s.modelName)]=a.serialize(s,r):i=Object.assign(i,a.serialize(s,r)),i},{}):t}serializerFor(t){var{explicit:r=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t&&this._serializerMap&&this._serializerMap[N(t)];return r?O(!!n,"You passed in ".concat(t," as an explicit serializer type but that serializer doesn't exist.")):(n=n||this._serializerMap.application||qe,O(!n||n.prototype.embed||n.prototype.root||new n instanceof Pm,"You cannot have a serializer that sideloads (embed: false) and disables the root (root: false).")),new n(this,t,this.request)}_isModel(t){return t instanceof ze}_isCollection(t){return t instanceof Ce||t instanceof ce}_isModelOrCollection(t){return this._isModel(t)||this._isCollection(t)}registerSerializers(t){var r=this._serializerMap||{};this._serializerMap=Object.assign(r,t)}getCoalescedIds(t,r){return this.serializerFor(r).getCoalescedIds(t)}}var mo={},go={},yo={};class Am{constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};O(t,"A schema requires a db"),this.db=t,this._registry={},this._dependentAssociations={polymorphic:[]},this.registerModels(r),this.isSaving={}}registerModels(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bF(t,(r,n)=>{this.registerModel(n,t[n])})}registerModel(t,r){var n=N(t),i=D(n);r=r.extend(),this._registry[n]=this._registry[n]||{class:null,foreignKeys:[]},this._registry[n].class=r,r.prototype._schema=this,r.prototype.modelName=i,r.prototype.hasManyAssociations={},r.prototype.hasManyAssociationFks={},r.prototype.belongsToAssociations={},r.prototype.belongsToAssociationFks={},r.prototype.associationKeys=new Set,r.prototype.associationIdKeys=new Set,r.prototype.dependentAssociations=[];var s={};for(var a in r.prototype)if(r.prototype[a]instanceof _i){var o=r.prototype[a];o.name=a,o.modelName=o.modelName||this.toModelName(a),o.ownerModelName=i,o.setSchema(this);var[l,u]=o.getForeignKeyArray();s[l]=s[l]||[],O(!s[l].includes(u),"Your '".concat(t,"' model definition has multiple possible inverse relationships of type '").concat(l,"'. Please use explicit inverses.")),s[l].push(u),this._addForeignKeyToRegistry(l,u),o.addMethodsToModelClass(r,a)}var f=this.toCollectionName(i);return this.db[f]||this.db.createCollection(f),this[f]={camelizedModelName:n,new:c=>this.new(n,c),create:c=>this.create(n,c),all:c=>this.all(n,c),find:c=>this.find(n,c),findBy:c=>this.findBy(n,c),findOrCreateBy:c=>this.findOrCreateBy(n,c),where:c=>this.where(n,c),none:c=>this.none(n,c),first:c=>this.first(n,c)},this}modelFor(t){return this._registry[t]}new(t,r){return this._instantiateModel(D(t),r)}create(t,r){return this.new(t,r).save()}all(t){var r=this.collectionForType(t);return this._hydrate(r,D(t))}none(t){return this._hydrate([],D(t))}find(t,r){var n=this.collectionForType(t),i=n.find(r);return Array.isArray(r)&&O(i.length===r.length,"Couldn't find all ".concat(this._container.inflector.pluralize(t)," with ids: (").concat(r.join(","),") (found ").concat(i.length," results, but was looking for ").concat(r.length,")")),this._hydrate(i,D(t))}findBy(t,r){var n=this.collectionForType(t),i=n.findBy(r);return this._hydrate(i,D(t))}findOrCreateBy(t,r){var n=this.collectionForType(t),i=n.findBy(r),s;return i?s=this._hydrate(i,D(t)):s=this.create(t,r),s}where(t,r){var n=this.collectionForType(t),i=n.where(r);return this._hydrate(i,D(t))}first(t){var r=this.collectionForType(t),n=r[0];return this._hydrate(n,D(t))}modelClassFor(t){var r=this._registry[N(t)];return O(r,"Model not registered: ".concat(t)),r.class.prototype}addDependentAssociation(t,r){t.isPolymorphic?this._dependentAssociations.polymorphic.push(t):(this._dependentAssociations[r]=this._dependentAssociations[r]||[],this._dependentAssociations[r].push(t))}dependentAssociationsFor(t){var r=this._dependentAssociations[t]||[],n=this._dependentAssociations.polymorphic||[];return r.concat(n)}associationsFor(t){var r=this.modelClassFor(t);return Object.assign({},r.belongsToAssociations,r.hasManyAssociations)}hasModelForModelName(t){return this.modelFor(N(t))}collectionForType(t){var r=this.toCollectionName(t);return O(this.db[r],"You're trying to find model(s) of type ".concat(t," but this collection doesn't exist in the database.")),this.db[r]}toCollectionName(t){if(typeof mo[t]!="string"){var r=D(t),n=N(this._container.inflector.pluralize(r));mo[t]=n}return mo[t]}toInternalCollectionName(t){if(typeof go[t]!="string"){var r="_".concat(this.toCollectionName(t));go[t]=r}return go[t]}toModelName(t){if(typeof yo[t]!="string"){var r=D(t),n=this._container.inflector.singularize(r);yo[t]=n}return yo[t]}_addForeignKeyToRegistry(t,r){this._registry[t]=this._registry[t]||{class:null,foreignKeys:[]};var n=this._registry[t].foreignKeys;n.includes(r)||n.push(r)}_instantiateModel(t,r){var n=this._modelFor(t),i=this._foreignKeysFor(t);return new n(this,t,r,i)}_modelFor(t){return this._registry[N(t)].class}_foreignKeysFor(t){return this._registry[N(t)].foreignKeys}_hydrate(t,r){if(Array.isArray(t)){var n=t.map(function(i){return this._instantiateModel(r,i)},this);return new Ce(r,n)}else return t?this._instantiateModel(r,t):null}}var xb={Db:xm,Association:_i,RouteHandler:$m,BaseRouteHandler:Ea,Serializer:qe,SerializerRegistry:Tm,Schema:Am},Eb={singularize:qv,pluralize:Kv};class Rm{constructor(){this.inflector=Eb}register(t,r){this[t]=r}create(t){var r=xb[t];r.prototype._container=this;for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s/.+\.hot-update.json$/.test(e.url)],Ol={coalesce:!1,timing:void 0};function Cb(e){if(!e||typeof e!="object")return!1;for(var t=Object.keys(Ol),r=Object.keys(e),n=0;n-1)return!0}return!1}function Pb(e){var[t]=e.splice(-1);Cb(t)?t=Pl({},Ol,t):(e.push(t),t=Ol);for(var r=2-e.length;r-- >0;)e.push(void 0);return e.push(t),e}class Tb{constructor(){Ct(this,"urlPrefix",void 0),Ct(this,"namespace",void 0),Ct(this,"timing",void 0),Ct(this,"passthroughChecks",void 0),Ct(this,"pretender",void 0),Ct(this,"mirageServer",void 0),Ct(this,"trackRequests",void 0)}create(t,r){var n=this;this.mirageServer=t,this.pretender=this._create(t,r),t.pretender=this.pretender,this.passthroughChecks=this.passthroughChecks||[],this.config(r),[["get"],["post"],["put"],["delete","del"],["patch"],["head"],["options"]].forEach(i=>{var[s,a]=i;this[s]=function(o){for(var l,u=arguments.length,f=new Array(u>1?u-1:0),c=1;cn.timing;return(l=n.pretender)===null||l===void 0?void 0:l[s](_,y,p)},t[s]=this[s],a&&(this[a]=this[s],t[a]=this[s])})}config(t){var r,n,i=typeof t.useDefaultPassthroughs<"u"?t.useDefaultPassthroughs:!0;i&&this._configureDefaultPassthroughs();var s=t.trackRequests!==void 0&&t.trackRequests!==this.trackRequests;O(!s,"You cannot modify Pretender's request tracking once the server is created"),this.timing=(r=(n=t.timing)!==null&&n!==void 0?n:this.timing)!==null&&r!==void 0?r:400,this.urlPrefix=this.urlPrefix||t.urlPrefix||"",this.namespace=this.namespace||t.namespace||""}_configureDefaultPassthroughs(){$b.forEach(t=>{this.passthrough(t)})}_create(t,r){if(typeof window<"u")return this.trackRequests=r.trackRequests||!1,new xa(function(){this.passthroughRequest=function(i,s,a){t.shouldLog()&&console.log("Mirage: Passthrough request for ".concat(i.toUpperCase()," ").concat(a.url))},this.handledRequest=function(i,s,a){if(t.shouldLog()){console.groupCollapsed("Mirage: [".concat(a.status,"] ").concat(i.toUpperCase()," ").concat(a.url));var{requestBody:o,responseText:l}=a,u,f;try{u=JSON.parse(o)}catch{u=o}try{f=JSON.parse(l)}catch{f=l}console.groupCollapsed("Response"),console.log(f),console.groupEnd(),console.groupCollapsed("Request (data)"),console.log(u),console.groupEnd(),console.groupCollapsed("Request (raw)"),console.log(a),console.groupEnd(),console.groupEnd()}};var n=this.checkPassthrough;this.checkPassthrough=function(i){var s=t.passthroughChecks.some(o=>o(i));if(s){var a=i.url.includes("?")?i.url.substr(0,i.url.indexOf("?")):i.url;this[i.method.toLowerCase()](a,this.passthrough)}return n.apply(this,arguments)},this.unhandledRequest=function(i,s){s=decodeURI(s);var a="";this.namespace===""?a="There is no existing namespace defined. Please define one":a="The existing namespace is ".concat(this.namespace),O("Your app tried to ".concat(i," '").concat(s,"', but there was no route defined to handle this request. Define a route for this endpoint in your routes() config. Did you forget to define a namespace? ").concat(a))}},{trackRequests:this.trackRequests})}passthrough(){for(var t=arguments.length,r=new Array(t),n=0;n1&&Array.isArray(s)&&(i=r.pop()),r.forEach(a=>{typeof a=="function"?this.passthroughChecks.push(a):i.forEach(o=>{var l=this._getFullPath(a);this.pretender[o](l,this.pretender.passthrough)})})}}_getFullPath(t){t=t[0]==="/"?t.slice(1):t;var r="",n=this.urlPrefix?this.urlPrefix.trim():"",i="";if(this.urlPrefix&&this.namespace&&(this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]==="/"&&(i=this.namespace.substring(0,this.namespace.length-1).substring(1)),this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i=this.namespace.substring(1)),this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]==="/"&&(i=this.namespace.substring(0,this.namespace.length-1)),this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i=this.namespace)),this.namespace&&!this.urlPrefix){if(this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]==="/"&&(i=this.namespace.substring(0,this.namespace.length-1)),this.namespace[0]==="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i=this.namespace),this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]==="/"){var s=this.namespace.substring(0,this.namespace.length-1);i="/".concat(s)}this.namespace[0]!=="/"&&this.namespace[this.namespace.length-1]!=="/"&&(i="/".concat(this.namespace))}return this.namespace||(i=""),/^https?:\/\//.test(t)?r+=t:(n.length&&(r+=n[n.length-1]==="/"?n:"".concat(n,"/")),r+=i,r[r.length-1]!=="/"&&(r+="/"),r+=t,/^https?:\/\//.test(r)||(r="/".concat(r),r=r.replace(/\/+/g,"/"))),r}start(){}shutdown(){this.pretender.shutdown()}}var wo={},Ab={singularize:qv,pluralize:Kv};function Rb(e){var t=new Ob(e);return t}class Ob{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._container=new Rm,this.config(t),this.db=this.db||void 0,this.schema=this.schema||void 0,this.middleware=[]}get namespace(){return this.interceptor.namespace}set namespace(t){this.interceptor.namespace=t}get urlPrefix(){return this.interceptor.urlPrefix}set urlPrefix(t){this.interceptor.urlPrefix=t}get timing(){return this.interceptor.timing}set timing(t){this.interceptor.timing=t}get passthroughChecks(){return this.interceptor.passthroughChecks}set passthroughChecks(t){this.interceptor.passthroughChecks=t}config(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interceptor||(t.interceptor=new Tb),this.interceptor?this.interceptor.config(t):(this.interceptor=t.interceptor,this.interceptor.create(this,t));var r=t.environment&&this.environment&&this.environment!==t.environment;O(!r,"You cannot modify Mirage's environment once the server is created"),this.environment=t.environment||this.environment||"development",t.routes&&(O(!t.baseConfig,"The routes option is an alias for the baseConfig option. You can't pass both options into your server definition."),t.baseConfig=t.routes),t.seeds&&(O(!t.scenarios,"The seeds option is an alias for the scenarios.default option. You can't pass both options into your server definition."),t.scenarios={default:t.seeds}),this._config=t,this.inflector=t.inflector||Ab,this._container.register("inflector",this.inflector),this.logging=t.logging!==void 0?this.logging:void 0,this.testConfig=this.testConfig||void 0,this.trackRequests=t.trackRequests,this.db?this.db.registerIdentityManagers(t.identityManagers):this.db=this._container.create("Db",void 0,t.identityManagers),this.schema?(this.schema.registerModels(t.models),this.serializerOrRegistry.registerSerializers(t.serializers||{})):(this.schema=this._container.create("Schema",this.db,t.models),this.serializerOrRegistry=this._container.create("SerializerRegistry",this.schema,t.serializers));var n=this._hasModulesOfType(t,"factories"),i=t.scenarios&&Object.prototype.hasOwnProperty.call(t.scenarios,"default");t.baseConfig&&this.loadConfig(t.baseConfig),this.isTest()&&(this.loadConfig(t.testConfig),typeof window<"u"&&(window.server=this)),this.isTest()&&n?this.loadFactories(t.factories):!this.isTest()&&i?(this.loadFactories(t.factories),t.scenarios.default(this)):this.loadFixtures()}start(){var t=this;return lb(function*(){var r,n;yield(r=(n=t.interceptor).start)===null||r===void 0?void 0:r.call(n)})()}isTest(){return this.environment==="test"}shouldLog(){return typeof this.logging<"u"?this.logging:!this.isTest()}loadConfig(t){t==null||t.call(this),this.timing=this.isTest()?0:this.timing||0}passthrough(){for(var t,r,n=arguments.length,i=new Array(n),s=0;s!t[o]);if(a.length)throw new Error("Fixtures not found: ".concat(a.join(", ")));t=aI(t,...s)}this.db.loadData(t)}loadFactories(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=this._factoryMap||{};this._factoryMap=Pl(r,t),Object.keys(t).forEach(n=>{var i=this.schema.toCollectionName(n);this.db.createCollection(i)})}factoryFor(t){var r=N(t);if(this._factoryMap&&this._factoryMap[r])return this._factoryMap[r]}build(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;im&&typeof m=="string"),a=oo(n,m=>ml(m)),o=N(t);this.factorySequences=this.factorySequences||{},this.factorySequences[o]=this.factorySequences[o]+1||0;var l=this.factoryFor(t);if(l){l=l.extend({});var u=l.attrs||{};this._validateTraits(s,l,t);var f=this._mergeExtensions(u,s,a);this._mapAssociationsFromAttributes(t,u,a),this._mapAssociationsFromAttributes(t,f);var c=l.extend(f),d=new c,g=this.factorySequences[o];return d.build(g)}else return a}buildList(t,r){O(yd(r),"second argument has to be an integer, you passed: ".concat(typeof r));for(var n=[],i=arguments.length,s=new Array(i>2?i-2:0),a=2;a1?r-1:0),i=1;im&&typeof m=="string"),a=oo(n,m=>ml(m)),o=oo(n,m=>m&&Array.isArray(m)),l=this.build(t,...s,a),u;if(this.schema&&this.schema[this.schema.toCollectionName(t)]){var f=this.schema[this.schema.toCollectionName(t)];u=f.create(l)}else{var c,d;o?c=o:(d=this.schema?this.schema.toInternalCollectionName(t):"_".concat(this.inflector.pluralize(t)),c=this.db[d]),O(c,"You called server.create('".concat(t,"') but no model or factory was found.")),u=c.insert(l)}var g=this.factoryFor(t);return g&&g.extractAfterCreateCallbacks({traits:s}).forEach(m=>{m(u,this)}),u}createList(t,r){O(this._modelOrFactoryExistsForType(t),"You called server.createList('".concat(t,"') but no model or factory was found. Make sure you're passing in the singularized version of the model or factory name.")),O(yd(r),"second argument has to be an integer, you passed: ".concat(typeof r));for(var n=[],i=this.schema?this.schema.toInternalCollectionName(t):"_".concat(this.inflector.pluralize(t)),s=this.db[i],a=arguments.length,o=new Array(a>2?a-2:0),l=2;l1&&arguments[1]!==void 0?arguments[1]:{};if(t=this.inflector.pluralize(t),i=i||"/".concat(t),r=r||[],n=n||[],r.length>0&&n.length>0)throw"cannot use both :only and :except options";var s={index:{methods:["get"],path:"".concat(i)},show:{methods:["get"],path:"".concat(i,"/:id")},create:{methods:["post"],path:"".concat(i)},update:{methods:["put","patch"],path:"".concat(i,"/:id")},delete:{methods:["del"],path:"".concat(i,"/:id")}},a=Object.keys(s),o=r.length>0&&r||n.length>0&&a.filter(l=>n.indexOf(l)===-1)||a;o.forEach(l=>{var u=s[l];u.methods.forEach(f=>i===t?this[f](u.path):this[f](u.path,t))})}_serialize(t){return typeof t=="string"||t instanceof Blob||t instanceof ArrayBuffer||t instanceof FormData||t instanceof ReadableStream||t instanceof URLSearchParams||t&&typeof t=="object"&&"isView"in t&&t.isView()?t:JSON.stringify(t)}registerRouteHandler(t,r,n,i,s){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:this.middleware,o=this._container.create("RouteHandler",{schema:this.schema,verb:t,rawHandler:n,customizedCode:i,options:s,path:r,serializerOrRegistry:this.serializerOrRegistry,middleware:a});return l=>o.handle(l).then(u=>{var[f,c,d]=u;return[f,c,this._serialize(d)]})}_hasModulesOfType(t,r){var n=t[r];return n?Object.keys(n).length>0:!1}_typeIsPluralForModel(t){if(typeof wo[t]!="boolean"){var r=this._modelOrFactoryExistsForTypeOrCollectionName(t),n=t===this.inflector.pluralize(t),i=this.inflector.singularize(t)===this.inflector.pluralize(t),s=n&&!i&&r;wo[t]=s}return wo[t]}_modelOrFactoryExistsForType(t){var r=this.schema&&this.schema.modelFor(N(t)),n=this.db[this.schema.toInternalCollectionName(t)];return(r||n)&&!this._typeIsPluralForModel(t)}_modelOrFactoryExistsForTypeOrCollectionName(t){var r=this.schema&&this.schema.modelFor(N(t)),n=this.db[this.schema.toInternalCollectionName(t)];return r||n}_validateTraits(t,r,n){t.forEach(i=>{if(!r.isTrait(i))throw new Error("'".concat(i,"' trait is not registered in '").concat(n,"' factory"))})}_mergeExtensions(t,r,n){var i=r.map(s=>t[s].extension);return i.push(n||{}),i.reduce((s,a)=>Pl(s,a),{})}_mapAssociationsFromAttributes(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r||{}).filter(i=>db(r[i])).forEach(i=>{var s=this.schema.modelClassFor(t),a=s.associationFor(i);O(a&&a instanceof Dn,"You're using the `association` factory helper on the '".concat(i,"' attribute of your ").concat(t," factory, but that attribute is not a `belongsTo` association."));var o=a&&a instanceof Dn&&a.modelName===t;O(!o,"You're using the association() helper on your ".concat(t," factory for ").concat(i,", which is a belongsTo self-referential relationship. You can't do this as it will lead to infinite recursion. You can move the helper inside of a trait and use it selectively."));var l=a&&a.opts&&a.opts.polymorphic;O(!l,"You're using the association() helper on your ".concat(t," factory for ").concat(i,", which is a polymorphic relationship. This is not currently supported."));var u=r[i],f="".concat(N(i),"Id");n[i]||(r[f]=this.create(a.modelName,...u.traitsAndOverrides).id),delete r[i]})}}var bd=qe.extend({serializeIds:"always",normalizeIds:!0,keyForModel(e){return it(e)},keyForAttribute(e){return e=qe.prototype.keyForAttribute.apply(this,arguments),it(e)},keyForRelationship(e){return this._container.inflector.pluralize(it(e))},keyForEmbeddedRelationship(e){return it(e)},keyForRelationshipIds(e){return"".concat(it(this._container.inflector.singularize(e)),"_ids")},keyForForeignKey(e){return"".concat(it(e),"_id")},keyForPolymorphicForeignKeyId(e){return"".concat(it(e),"_id")},keyForPolymorphicForeignKeyType(e){return"".concat(it(e),"_type")},normalize(e){var t=Object.keys(e)[0],r=e[t],n=N(t),i=this.schema.modelClassFor(n),{belongsToAssociations:s,hasManyAssociations:a}=i,o=Object.keys(s),l=Object.keys(a);this.primaryKey!=="id"&&(r.id=r[this.primaryKey],delete r[this.primaryKey]);var u={data:{type:this._container.inflector.pluralize(t),attributes:{}}};r.id&&(u.data.id=r.id);var f={};return Object.keys(r).forEach(c=>{if(c!=="id")if(this.normalizeIds)if(o.includes(c)){var d=s[c],g=d.modelName;f[D(c)]={data:{type:g,id:r[c]}}}else if(l.includes(c)){var m=a[c],y=m.modelName,_=r[c].map(p=>({type:y,id:p}));f[D(c)]={data:_}}else u.data.attributes[D(c)]=r[c];else u.data.attributes[D(c)]=r[c]}),Object.keys(f).length&&(u.data.relationships=f),u},getCoalescedIds(e){return e.queryParams&&e.queryParams.ids}});bd.extend({serializeIds:"always",keyForModel(e){return N(e)},keyForAttribute(e){return e=bd.prototype.keyForAttribute.apply(this,arguments),N(e)},keyForRelationship(e){return N(this._container.inflector.pluralize(e))},keyForEmbeddedRelationship(e){return N(e)},keyForRelationshipIds(e){return N(this._container.inflector.pluralize(e))},keyForForeignKey(e){return N(this._container.inflector.singularize(e))},getCoalescedIds(e){return e.queryParams&&e.queryParams.ids}});Rb({models:{vans:ze},seeds(e){e.create("van",{id:"1",name:"Modest Explorer",price:60,description:"The Modest Explorer is a van designed to get you out of the house and into nature. This beauty is equipped with solar panels, a composting toilet, a water tank and kitchenette. The idea is that you can pack up your home and escape for a weekend or even longer!",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/modest-explorer.png",type:"simple"}),e.create("van",{id:"2",name:"Beach Bum",price:80,description:"Beach Bum is a van inspired by surfers and travelers. It was created to be a portable home away from home, but with some cool features in it you won't find in an ordinary camper.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/beach-bum.png",type:"rugged"}),e.create("van",{id:"3",name:"Reliable Red",price:100,description:"Reliable Red is a van that was made for travelling. The inside is comfortable and cozy, with plenty of space to stretch out in. There's a small kitchen, so you can cook if you need to. You'll feel like home as soon as you step out of it.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/reliable-red.png",type:"luxury"}),e.create("van",{id:"4",name:"Dreamfinder",price:65,description:"Dreamfinder is the perfect van to travel in and experience. With a ceiling height of 2.1m, you can stand up in this van and there is great head room. The floor is a beautiful glass-reinforced plastic (GRP) which is easy to clean and very hard wearing. A large rear window and large side windows make it really light inside and keep it well ventilated.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/dreamfinder.png",type:"simple"}),e.create("van",{id:"5",name:"The Cruiser",price:120,description:"The Cruiser is a van for those who love to travel in comfort and luxury. With its many windows, spacious interior and ample storage space, the Cruiser offers a beautiful view wherever you go.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/the-cruiser.png",type:"luxury"}),e.create("van",{id:"6",name:"Green Wonder",price:70,description:"With this van, you can take your travel life to the next level. The Green Wonder is a sustainable vehicle that's perfect for people who are looking for a stylish, eco-friendly mode of transport that can go anywhere.",imageUrl:"https://assets.scrimba.com/advanced-react/react-router/green-wonder.png",type:"rugged"})},routes(){this.namespace="api",this.logging=!1,this.get("/vans",(e,t)=>e.vans.all()),this.get("/vans/:id",(e,t)=>{const r=t.params.id;return e.vans.find(r)})}});function Nb(){return x.jsx("div",{className:"",children:x.jsx(i0,{children:x.jsx(X1,{children:x.jsxs(Pr,{element:x.jsx(E0,{}),children:[x.jsx(Pr,{path:"/VanLife/",element:x.jsx(l0,{})}),x.jsx(Pr,{path:"/VanLife/about",element:x.jsx(u0,{})}),x.jsx(Pr,{path:"VanLife/vans",element:x.jsx(f0,{})}),x.jsx(Pr,{path:"VanLife/vanDetails/:id",element:x.jsx(S0,{})})]})})})})}_o.createRoot(document.getElementById("root")).render(x.jsx(Ne.StrictMode,{children:x.jsx(Nb,{})})); diff --git a/index.html b/index.html index 8129b21..3b1254a 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - +