vendor: 4,305 bytes, lines 1-9
1var tO=Object.defineProperty;var V0=e=>{throw TypeError(e)};var nO=(e,t,n)=>t in e?tO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zr=(e,t,n)=>nO(e,typeof t!="symbol"?t+"":t,n),pp=(e,t,n)=>t.has(e)||V0("Cannot "+n);var j=(e,t,n)=>(pp(e,t,"read from private field"),n?n.call(e):t.get(e)),he=(e,t,n)=>t.has(e)?V0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),te=(e,t,n,r)=>(pp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ce=(e,t,n)=>(pp(e,t,"access private method"),n);var Su=(e,t,n,r)=>({set _(s){te(e,t,s,n)},get _(){return j(e,t,r)}});function rO(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hk={exports:{}},tf={},qk={exports:{}},Se={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var tu=Symbol.for("react.element"),sO=Symbol.for("react.portal"),iO=Symbol.for("react.fragment"),oO=Symbol.for("react.strict_mode"),aO=Symbol.for("react.profiler"),lO=Symbol.for("react.provider"),cO=Symbol.for("react.context"),uO=Symbol.for("react.forward_ref"),dO=Symbol.for("react.suspense"),hO=Symbol.for("react.memo"),fO=Symbol.for("react.lazy"),U0=Symbol.iterator;function pO(e){return e===null||typeof e!="object"?null:(e=U0&&e[U0]||e["@@iterator"],typeof e=="function"?e:null)}var Kk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gk=Object.assign,Yk={};function sl(e,t,n){this.props=e,this.context=t,this.refs=Yk,this.updater=n||Kk}sl.prototype.isReactComponent={};sl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};sl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Xk(){}Xk.prototype=sl.prototype;function uv(e,t,n){this.props=e,this.context=t,this.refs=Yk,this.updater=n||Kk}var dv=uv.prototype=new Xk;dv.constructor=uv;Gk(dv,sl.prototype);dv.isPureReactComponent=!0;var B0=Array.isArray,Jk=Object.prototype.hasOwnProperty,hv={current:null},Qk={key:!0,ref:!0,__self:!0,__source:!0};function Zk(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Jk.call(t,r)&&!Qk.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:tu,type:e,key:i,ref:o,props:s,_owner:hv.current}}function mO(e,t){return{$$typeof:tu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function fv(e){return typeof e=="object"&&e!==null&&e.$$typeof===tu}function gO(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var z0=/\/+/g;function mp(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gO(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function pd(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case tu:case sO:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+mp(o,0):r,B0(s)?(n="",e!=null&&(n=e.replace(z0,"$&/")+"/"),pd(s,t,n,"",function(u){return u})):s!=null&&(fv(s)&&(s=mO(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(z0,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",B0(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+mp(i,a);o+=pd(i,t,n,l,s)}else if(l=pO(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+mp(i,a++),o+=pd(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ku(e,t,n){if(e==null)return e;var r=[],s=0;return pd(e,r,"","",function(i){return t.call(n,i,s++)}),r}function yO(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var tn={current:null},md={transition:null},vO={ReactCurrentDispatcher:tn,ReactCurrentBatchConfig:md,ReactCurrentOwner:hv};function e_(){throw Error("act(...) is not supported in production builds of React.")}Se.Children={map:ku,forEach:function(e,t,n){ku(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ku(e,function(){t++}),t},toArray:function(e){return ku(e,function(t){return t})||[]},only:function(e){if(!fv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Component=sl;Se.Fragment=iO;Se.Profiler=aO;Se.PureComponent=uv;Se.StrictMode=oO;Se.Suspense=dO;Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vO;Se.act=e_;Se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Gk({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=hv.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Jk.call(t,l)&&!Qk.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:tu,type:e.type,key:s,ref:i,props:r,_owner:o}};Se.createContext=function(e){return e={$$typeof:cO,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:lO,_context:e},e.Consumer=e};Se.createElement=Zk;Se.createFactory=function(e){var t=Zk.bind(null,e);return t.type=e,t};Se.createRef=function(){return{current:null}};Se.forwardRef=function(e){return{$$typeof:uO,render:e}};Se.isValidElement=fv;Se.lazy=function(e){return{$$typeof:fO,_payload:{_status:-1,_result:e},_init:yO}};Se.memo=function(e,t){return{$$typeof:hO,type:e,compare:t===void 0?null:t}};Se.startTransition=function(e){var t=md.transition;md.transition={};try{e()}finally{md.transition=t}};Se.unstable_act=e_;Se.useCallback=function(e,t){return tn.current.useCallback(e,t)};Se.useContext=function(e){return tn.current.useContext(e)};Se.useDebugValue=function(){};Se.useDeferredValue=function(e){return tn.current.useDeferredValue(e)};Se.useEffect=function(e,t){return tn.current.useEffect(e,t)};Se.useId=function(){return tn.current.useId()};Se.useImperativeHandle=function(e,t,n){return tn.current.useImperativeHandle(e,t,n)};Se.useInsertionEffect=function(e,t){return tn.current.useInsertionEffect(e,t)};Se.useLayoutEffect=function(e,t){return tn.current.useLayoutEffect(e,t)};Se.useMemo=function(e,t){return tn.current.useMemo(e,t)};Se.useReducer=function(e,t,n){return tn.current.useReducer(e,t,n)};Se.useRef=function(e){return tn.current.useRef(e)};Se.useState=function(e){return tn.current.useState(e)};Se.useSyncExternalStore=function(e,t,n){return tn.current.useSyncExternalStore(e,t,n)};Se.useTransition=function(){return tn.current.useTransition()};Se.version="18.3.1";qk.exports=Se;var m=qk.exports;const O=jo(m),pv=rO({__proto__:null,default:O},[m]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var xO=m,wO=Symbol.for("react.element"),bO=Symbol.for("react.fragment"),SO=Object.prototype.hasOwnProperty,kO=xO.__SECRET_INT
vendor: 11,458 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_O={key:!0,ref:!0,__self:!0,__source:!0};function t_(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)SO.call(t,r)&&!_O.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:wO,type:e,key:i,ref:o,props:s,_owner:kO.current}}tf.Fragment=bO;tf.jsx=t_;tf.jsxs=t_;Hk.exports=tf;var c=Hk.exports,n_={exports:{}},Cn={},r_={exports:{}},s_={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(P,L){var W=P.length;P.push(L);e:for(;0<W;){var ce=W-1>>>1,oe=P[ce];if(0<s(oe,L))P[ce]=L,P[W]=oe,W=ce;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var L=P[0],W=P.pop();if(W!==L){P[0]=W;e:for(var ce=0,oe=P.length,me=oe>>>1;ce<me;){var pe=2*(ce+1)-1,Ve=P[pe],Je=pe+1,G=P[Je];if(0>s(Ve,W))Je<oe&&0>s(G,Ve)?(P[ce]=G,P[Je]=W,ce=Je):(P[ce]=Ve,P[pe]=W,ce=pe);else if(Je<oe&&0>s(G,W))P[ce]=G,P[Je]=W,ce=Je;else break e}}return L}function s(P,L){var W=P.sortIndex-L.sortIndex;return W!==0?W:P.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,h=null,f=3,p=!1,y=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(P){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=P)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function S(P){if(g=!1,w(P),!y)if(n(l)!==null)y=!0,V(k);else{var L=n(u);L!==null&&ne(S,L.startTime-P)}}function k(P,L){y=!1,g&&(g=!1,x(C),C=-1),p=!0;var W=f;try{for(w(L),h=n(l);h!==null&&(!(h.expirationTime>L)||P&&!$());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,f=h.priorityLevel;var oe=ce(h.expirationTime<=L);L=e.unstable_now(),typeof oe=="function"?h.callback=oe:h===n(l)&&r(l),w(L)}else r(l);h=n(l)}if(h!==null)var me=!0;else{var pe=n(u);pe!==null&&ne(S,pe.startTime-L),me=!1}return me}finally{h=null,f=W,p=!1}}var _=!1,E=null,C=-1,N=5,R=-1;function $(){return!(e.unstable_now()-R<N)}function D(){if(E!==null){var P=e.unstable_now();R=P;var L=!0;try{L=E(!0,P)}finally{L?U():(_=!1,E=null)}}else _=!1}var U;if(typeof v=="function")U=function(){v(D)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,J=F.port2;F.port1.onmessage=D,U=function(){J.postMessage(null)}}else U=function(){b(D,0)};function V(P){E=P,_||(_=!0,U())}function ne(P,L){C=b(function(){P(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){y||p||(y=!0,V(k))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var W=f;f=L;try{return P()}finally{f=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,L){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var W=f;f=P;try{return L()}finally{f=W}},e.unstable_scheduleCallback=function(P,L,W){var ce=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ce+W:ce):W=ce,P){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=W+oe,P={id:d++,callback:L,priorityLevel:P,startTime:W,expirationTime:oe,sortIndex:-1},W>ce?(P.sortIndex=W,t(u,P),n(l)===null&&P===n(u)&&(g?(x(C),C=-1):g=!0,ne(S,W-ce))):(P.sortIndex=oe,t(l,P),y||p||(y=!0,V(k))),P},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(P){var L=f;return function(){var W=f;f=L;try{return P.apply(this,arguments)}finally{f=W}}}})(s_);r_.exports=s_;var EO=r_.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var TO=m,En=EO;function B(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i_=new Set,fc={};function Ro(e,t){Va(e,t),Va(e+"Capture",t)}function Va(e,t){for(fc[e]=t,e=0;e<t.length;e++)i_.add(t[e])}var fs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Im=Object.prototype.hasOwnProperty,CO=/^[: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]*$/,W0={},H0={};function jO(e){return Im.call(H0,e)?!0:Im.call(W0,e)?!1:CO.test(e)?H0[e]=!0:(W0[e]=!0,!1)}function RO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function NO(e,t,n,r){if(t===null||typeof t>"u"||RO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function nn(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Vt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vt[e]=new nn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vt[t]=new nn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vt[e]=new nn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vt[e]=new nn(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){Vt[e]=new nn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vt[e]=new nn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vt[e]=new nn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vt[e]=new nn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vt[e]=new nn(e,5,!1,e.toLowerCase(),null,!1,!1)});var mv=/[\-:]([a-z])/g;function gv(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(mv,gv);Vt[t]=new nn(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(mv,gv);Vt[t]=new nn(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(mv,gv);Vt[t]=new nn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vt[e]=new nn(e,1,!1,e.toLowerCase(),null,!1,!1)});Vt.xlinkHref=new nn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vt[e]=new nn(e,1,!1,e.toLowerCase(),null,!0,!0)});function yv(e,t,n,r){var s=Vt.hasOwnProperty(t)?Vt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(NO(t,n,s,r)&&(n=null),r||s===null?jO(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ws=TO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_u=Symbol.for("react.element"),ea=Symbol.for("react.portal"),ta=Symbol.for("react.fragment"),vv=Symbol.for("react.strict_mode"),Dm=Symbol.for("react.profiler"),o_=Symbol.for("react.provider"),a_=Symbol.for("react.context"),xv=Symbol.for("react.forward_ref"),Lm=Symbol.for("react.suspense"),Mm=Symbol.for("react.suspense_list"),wv=Symbol.for("react.memo"),Ds=Symbol.for("react.lazy"),l_=Symbol.for("react.offscreen"),q0=Symbol.iterator;function yl(e){return e===null||typeof e!="object"?null:(e=q0&&e[q0]||e["@@iterator"],typeof e=="function"?e:null)}var st=Object.assign,gp;function Dl(e){if(gp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);gp=t&&t[1]||""}return` 34`+gp+e}var yp=!1;function vp(e,t){if(!e||yp)return"";yp=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 4,297 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{yp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Dl(e):""}function AO(e){switch(e.tag){case 5:return Dl(e.type);case 16:return Dl("Lazy");case 13:return Dl("Suspense");case 19:return Dl("SuspenseList");case 0:case 2:case 15:return e=vp(e.type,!1),e;case 11:return e=vp(e.type.render,!1),e;case 1:return e=vp(e.type,!0),e;default:return""}}function Fm(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 ta:return"Fragment";case ea:return"Portal";case Dm:return"Profiler";case vv:return"StrictMode";case Lm:return"Suspense";case Mm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case a_:return(e.displayName||"Context")+".Consumer";case o_:return(e._context.displayName||"Context")+".Provider";case xv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wv:return t=e.displayName||null,t!==null?t:Fm(e.type)||"Memo";case Ds:t=e._payload,e=e._init;try{return Fm(e(t))}catch{}}return null}function PO(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 Fm(t);case 8:return t===vv?"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 fi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function c_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function OO(e){var t=c_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Eu(e){e._valueTracker||(e._valueTracker=OO(e))}function u_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=c_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hd(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 $m(e,t){var n=t.checked;return st({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function K0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function d_(e,t){t=t.checked,t!=null&&yv(e,"checked",t,!1)}function Vm(e,t){d_(e,t);var n=fi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Um(e,t.type,n):t.hasOwnProperty("defaultValue")&&Um(e,t.type,fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}
vendor: 4,180 bytes, line 37
37function G0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Um(e,t,n){(t!=="number"||Hd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ll=Array.isArray;function ga(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fi(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Bm(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return st({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Y0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));if(Ll(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fi(n)}}function h_(e,t){var n=fi(t.value),r=fi(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function X0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function f_(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zm(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?f_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tu,p_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tu=Tu||document.createElement("div"),Tu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function pc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gl={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},IO=["Webkit","ms","Moz","O"];Object.keys(Gl).forEach(function(e){IO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gl[t]=Gl[e]})});function m_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gl.hasOwnProperty(e)&&Gl[e]?(""+t).trim():t+"px"}function g_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=m_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var DO=st({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 Wm(e,t){if(t){if(DO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function Hm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
37ing";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 qm=null;function bv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Km=null,ya=null,va=null;function J0(e){if(e=su(e)){if(typeof Km!="function")throw Error(B(280));var t=e.stateNode;t&&(t=af(t),Km(e.stateNode,e.type,t))}}function y_(e){ya?va?va.push(e):va=[e]:ya=e}function v_(){if(ya){var e=ya,t=va;if(va=ya=null,J0(e),t)for(e=0;e<t.length;e++)J0(t[e])}}function x_(e,t){return e(t)}function w_(){}var xp=!1;function b_(e,t,n){if(xp)return e(t,n);xp=!0;try{return x_(e,t,n)}finally{xp=!1,(ya!==null||va!==null)&&(w_(),v_())}}function mc(e,t){var n=e.stateNode;if(n===null)return null;var r=af(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(B(231,t,typeof n));return n}var Gm=!1;if(fs)try{var vl={};Object.defineProperty(vl,"passive",{get:function(){Gm=!0}}),window.addEventListener("test",vl,vl),window.removeEventListener("test",vl,vl)}catch{Gm=!1}function LO(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Yl=!1,qd=null,Kd=!1,Ym=null,MO={onError:function(e){Yl=!0,qd=e}};
vendor: 4,563 bytes, line 37
37function FO(e,t,n,r,s,i,o,a,l){Yl=!1,qd=null,LO.apply(MO,arguments)}function $O(e,t,n,r,s,i,o,a,l){if(FO.apply(this,arguments),Yl){if(Yl){var u=qd;Yl=!1,qd=null}else throw Error(B(198));Kd||(Kd=!0,Ym=u)}}function No(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function S_(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Q0(e){if(No(e)!==e)throw Error(B(188))}function VO(e){var t=e.alternate;if(!t){if(t=No(e),t===null)throw Error(B(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Q0(s),e;if(i===r)return Q0(s),t;i=i.sibling}throw Error(B(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function k_(e){return e=VO(e),e!==null?__(e):null}function __(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=__(e);if(t!==null)return t;e=e.sibling}return null}var E_=En.unstable_scheduleCallback,Z0=En.unstable_cancelCallback,UO=En.unstable_shouldYield,BO=En.unstable_requestPaint,ut=En.unstable_now,zO=En.unstable_getCurrentPriorityLevel,Sv=En.unstable_ImmediatePriority,T_=En.unstable_UserBlockingPriority,Gd=En.unstable_NormalPriority,WO=En.unstable_LowPriority,C_=En.unstable_IdlePriority,nf=null,Ur=null;function HO(e){if(Ur&&typeof Ur.onCommitFiberRoot=="function")try{Ur.onCommitFiberRoot(nf,e,void 0,(e.current.flags&128)===128)}catch{}}var mr=Math.clz32?Math.clz32:GO,qO=Math.log,KO=Math.LN2;function GO(e){return e>>>=0,e===0?32:31-(qO(e)/KO|0)|0}var Cu=64,ju=4194304;function Ml(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 Yd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Ml(a):(i&=o,i!==0&&(r=Ml(i)))}else o=n&~s,o!==0?r=Ml(o):i!==0&&(r=Ml(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-mr(t),s=1<<n,r|=e[n],t&=~s;return r}function YO(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function XO(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-mr(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=YO(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Xm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function j_(){var e=Cu;return Cu<<=1,!(Cu&4194240)&&(Cu=64),e}function wp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mr(t),e[t]=n}function JO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-mr(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function kv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Fe=0;function R_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var N_,_v,A_,P_,O_,Jm=!1,Ru=[],ti=null,ni=null,ri=null,gc=new Map,yc=new Map,Fs=[],QO="mou
37sedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ew(e,t){switch(e){case"focusin":case"focusout":ti=null;break;case"dragenter":case"dragleave":ni=null;break;case"mouseover":case"mouseout":ri=null;break;case"pointerover":case"pointerout":gc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yc.delete(t.pointerId)}}function xl(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=su(t),t!==null&&_v(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function ZO(e,t,n,r,s){switch(t){case"focusin":return ti=xl(ti,e,t,n,r,s),!0;case"dragenter":return ni=xl(ni,e,t,n,r,s),!0;case"mouseover":return ri=xl(ri,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return gc.set(i,xl(gc.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,yc.set(i,xl(yc.get(i)||null,e,t,n,r,s)),!0}return!1}function I_(e){var t=Wi(e.target);if(t!==null){var n=No(t);if(n!==null){if(t=n.tag,t===13){if(t=S_(n),t!==null){e.blockedOn=t,O_(e.priority,function(){A_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qm=r,n.target.dispatchEvent(r),qm=null}else return t=su(n),t!==null&&_v(t),e.blockedOn=n,!1;t.shift()}return!0}function tw(e,t,n){gd(e)&&n.delete(t)}function e2(){Jm=!1,ti!==null&&gd(ti)&&(ti=null),ni!==null&&gd(ni)&&(ni=null),ri!==null&&gd(ri)&&(ri=null),gc.forEach(tw),yc.forEach(tw)}function wl(e,t){e.blockedOn===t&&(e.blockedOn=null,Jm||(Jm=!0,En.unstable_scheduleCallback(En.unstable_NormalPriority,e2)))}function vc(e){function t(s){return wl(s,e)}if(0<Ru.length){wl(Ru[0],e);for(var n=1;n<Ru.length;n++){var r=Ru[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ti!==null&&wl(ti,e),ni!==null&&wl(ni,e),ri!==null&&wl(ri,e),gc.forEach(t),yc.forEach(t),n=0;n<Fs.length;n++)r=Fs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Fs.length&&(n=Fs[0],n.blockedOn===null);)I_(n),n.blockedOn===null&&Fs.shift()}var xa=ws.ReactCurrentBatchConfig,Xd=!0;function t2(e,t,n,r){var s=Fe,i=xa.transition;xa.transition=null;try{Fe=1,Ev(e,t,n,r)}finally{Fe=s,xa.transition=i}}function n2(e,t,n,r){var s=Fe,i=xa.transition;xa.transition=null;try{Fe=4,Ev(e,t,n,r)}finally{Fe=s,xa.transition=i}}function Ev(e,t,n,r){if(Xd){var s=Qm(e,t,n,r);if(s===null)Np(e,t,r,Jd,n),ew(e,r);else if(ZO(s,e,t,n,r))r.stopPropagation();else if(ew(e,r),t&4&&-1<QO.indexOf(e)){for(;s!==null;){var i=su(s);if(i!==null&&N_(i),i=Qm(e,t,n,r),i===null&&Np(e,t,r,Jd,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Np(e,t,r,null,n)}}var Jd=null;function Qm(e,t,n,r){if(Jd=null,e=bv(r),e=Wi(e),e!==null)if(t=No(e),t===null)e=null;else if(n=t.tag,n===13){if(e=S_(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Jd=e,null}function D_(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zO()){case Sv:return 1;case T_:return 4;case Gd:case WO:return 16;case C_:return 536870912;default:return 16}default:return 16}}var Xs=null,Tv=null,yd=null;function L_(){if(yd)return yd;var e,t=Tv,n=t.length,r,s="value"in Xs?Xs.value:Xs.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return yd=s.slice(e,1<r?1-r:void 0)}function vd(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nu(){return!0}function nw(){return!1}function jn(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Nu:nw,this.isPropagationStopped=nw,this}return st(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Nu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Nu)},persist:function(){},isPersistent:Nu}),t}var il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cv=jn(il),ru=st({},il,{view:0,detail:0}),r2=jn(ru),bp,Sp,bl,rf=st({},ru,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bl&&(bl&&e.type==="mousemove"?(bp=e.screenX-bl.screenX,Sp=e.screenY-bl.screenY):Sp=bp=0,bl=e),bp)},movementY:function(e){return"movementY"in e?e.movementY:Sp}}),rw=jn(rf),s2=st({},rf,{dataTransfer:0}),i2=jn(s2),o2=st({},ru,{relatedTarget:0}),kp=jn(o2),a2=st({},il,{animationName:0,elapsedTime:0,pseudoElement:0}),l2=jn(a2),c2=st({},il,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),u2=jn(c2),d2=st({},il,{data:0}),sw=jn(d2),h2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},p2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function m2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=p2[e])?!!t[e]:!1}function jv(){return m2}var g2=st({},ru,{key:function(e){if(e.key){var t=h2[e.key]||e.key;if(t!=="Unidentified")return t}
vendor: 6,028 bytes, line 37
37return e.type==="keypress"?(e=vd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jv,charCode:function(e){return e.type==="keypress"?vd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),y2=jn(g2),v2=st({},rf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),iw=jn(v2),x2=st({},ru,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jv}),w2=jn(x2),b2=st({},il,{propertyName:0,elapsedTime:0,pseudoElement:0}),S2=jn(b2),k2=st({},rf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_2=jn(k2),E2=[9,13,27,32],Rv=fs&&"CompositionEvent"in window,Xl=null;fs&&"documentMode"in document&&(Xl=document.documentMode);var T2=fs&&"TextEvent"in window&&!Xl,M_=fs&&(!Rv||Xl&&8<Xl&&11>=Xl),ow=" ",aw=!1;function F_(e,t){switch(e){case"keyup":return E2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function C2(e,t){switch(e){case"compositionend":return $_(t);case"keypress":return t.which!==32?null:(aw=!0,ow);case"textInput":return e=t.data,e===ow&&aw?null:e;default:return null}}function j2(e,t){if(na)return e==="compositionend"||!Rv&&F_(e,t)?(e=L_(),yd=Tv=Xs=null,na=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return M_&&t.locale!=="ko"?null:t.data;default:return null}}var R2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!R2[e.type]:t==="textarea"}function V_(e,t,n,r){y_(r),t=Qd(t,"onChange"),0<t.length&&(n=new Cv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jl=null,xc=null;function N2(e){J_(e,0)}function sf(e){var t=ia(e);if(u_(t))return e}function A2(e,t){if(e==="change")return t}var U_=!1;if(fs){var _p;if(fs){var Ep="oninput"in document;if(!Ep){var cw=document.createElement("div");cw.setAttribute("oninput","return;"),Ep=typeof cw.oninput=="function"}_p=Ep}else _p=!1;U_=_p&&(!document.documentMode||9<document.documentMode)}function uw(){Jl&&(Jl.detachEvent("onpropertychange",B_),xc=Jl=null)}function B_(e){if(e.propertyName==="value"&&sf(xc)){var t=[];V_(t,xc,e,bv(e)),b_(N2,t)}}function P2(e,t,n){e==="focusin"?(uw(),Jl=t,xc=n,Jl.attachEvent("onpropertychange",B_)):e==="focusout"&&uw()}function O2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sf(xc)}function I2(e,t){if(e==="click")return sf(t)}function D2(e,t){if(e==="input"||e==="change")return sf(t)}function L2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vr=typeof Object.is=="function"?Object.is:L2;function wc(e,t){if(vr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Im.call(t,s)||!vr(e[s],t[s]))return!1}return!0}function dw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hw(e,t){var n=dw(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dw(n)}}function z_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function W_(){for(var e=window,t=Hd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hd(e.document)}return t}function Nv(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 M2(e){var t=W_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&z_(n.ownerDocument.documentElement,n)){if(r!==null&&Nv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=hw(n,i);var o=hw(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var F2=fs&&"documentMode"in document&&11>=document.documentMode,ra=null,Zm=null,Ql=null,eg=!1;function fw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;eg||ra==null||ra!==Hd(r)||(r=ra,"selectionStart"in r&&Nv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 3,045 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Ql&&wc(Ql,r)||(Ql=r,r=Qd(Zm,"onSelect"),0<r.length&&(t=new Cv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ra)))}function Au(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sa={animationend:Au("Animation","AnimationEnd"),animationiteration:Au("Animation","AnimationIteration"),animationstart:Au("Animation","AnimationStart"),transitionend:Au("Transition","TransitionEnd")},Tp={},H_={};fs&&(H_=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function of(e){if(Tp[e])return Tp[e];if(!sa[e])return e;var t=sa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in H_)return Tp[e]=t[n];return e}var q_=of("animationend"),K_=of("animationiteration"),G_=of("animationstart"),Y_=of("transitionend"),X_=new Map,pw="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ki(e,t){X_.set(e,t),Ro(t,[e])}for(var Cp=0;Cp<pw.length;Cp++){var jp=pw[Cp],$2=jp.toLowerCase(),V2=jp[0].toUpperCase()+jp.slice(1);ki($2,"on"+V2)}ki(q_,"onAnimationEnd");ki(K_,"onAnimationIteration");ki(G_,"onAnimationStart");ki("dblclick","onDoubleClick");ki("focusin","onFocus");ki("focusout","onBlur");ki(Y_,"onTransitionEnd");Va("onMouseEnter",["mouseout","mouseover"]);Va("onMouseLeave",["mouseout","mouseover"]);Va("onPointerEnter",["pointerout","pointerover"]);Va("onPointerLeave",["pointerout","pointerover"]);Ro("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ro("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ro("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ro("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ro("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ro("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),U2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fl));
vendor: 3,983 bytes, line 37
37function mw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,$O(r,t,void 0,e),e.currentTarget=null}function J_(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;mw(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;mw(s,a,u),i=l}}}if(Kd)throw e=Ym,Kd=!1,Ym=null,e}function Ge(e,t){var n=t[ig];n===void 0&&(n=t[ig]=new Set);var r=e+"__bubble";n.has(r)||(Q_(t,e,2,!1),n.add(r))}function Rp(e,t,n){var r=0;t&&(r|=4),Q_(n,e,r,t)}var Pu="_reactListening"+Math.random().toString(36).slice(2);function bc(e){if(!e[Pu]){e[Pu]=!0,i_.forEach(function(n){n!=="selectionchange"&&(U2.has(n)||Rp(n,!1,e),Rp(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pu]||(t[Pu]=!0,Rp("selectionchange",!1,t))}}function Q_(e,t,n,r){switch(D_(t)){case 1:var s=t2;break;case 4:s=n2;break;default:s=Ev}n=s.bind(null,t,n,e),s=void 0,!Gm||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Np(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Wi(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}b_(function(){var u=i,d=bv(n),h=[];e:{var f=X_.get(e);if(f!==void 0){var p=Cv,y=e;switch(e){case"keypress":if(vd(n)===0)break e;case"keydown":case"keyup":p=y2;break;case"focusin":y="focus",p=kp;break;case"focusout":y="blur",p=kp;break;case"beforeblur":case"afterblur":p=kp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=rw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=i2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=w2;break;case q_:case K_:case G_:p=l2;break;case Y_:p=S2;break;case"scroll":p=r2;break;case"wheel":p=_2;break;case"copy":case"cut":case"paste":p=u2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=iw}var g=(t&4)!==0,b=!g&&e==="scroll",x=g?f!==null?f+"Capture":null:f;g=[];for(var v=u,w;v!==null;){w=v;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,x!==null&&(S=mc(v,x),S!=null&&g.push(Sc(v,S,w)))),b)break;v=v.return}0<g.length&&(f=new p(f,y,null,n,d),h.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==qm&&(y=n.relatedTarget||n.fromElement)&&(Wi(y)||y[ps]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?Wi(y):null,y!==null&&(b=No(y),y!==b||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(g=rw,S="onMouseLeave",x="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=iw,S="onPointerLeave",x="onPointerEnter",v="pointer"),b=p==null?f:ia(p),w=y==null?f:ia(y),f=new g(S,v+"leave",p,n,d),f.target=b,f.relatedTarget=w,S=null,Wi(d)===u&&(g=new g(x,v+"enter",y,n,d),g.target=w,g.relatedTarget=b,S=g),b=S,p&&y)t:{for(g=p,x=y,v=0,w=g;w;w=Io(w))v++;for(w=0,S=x;S;S=Io(S))w++;for(;0<v-w;)g=Io(g),v--;for(;0<w-v;)x=Io(x),w--;for(;v--;){if(g===x||x!==null&&g===x.alternate)break t;g=Io(g),x=Io(x)}g=null}else g=null;p!==null&&gw(h,f,p,g,!1),y!==null&&b!==null&&gw(h,b,y,g,!0)}}
vendor: 7,582 bytes, lines 37-38
37e:{if(f=u?ia(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var k=A2;else if(lw(f))if(U_)k=D2;else{k=O2;var _=P2}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=I2);if(k&&(k=k(e,u))){V_(h,k,n,d);break e}_&&_(e,f,u),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&Um(f,"number",f.value)}switch(_=u?ia(u):window,e){case"focusin":(lw(_)||_.contentEditable==="true")&&(ra=_,Zm=u,Ql=null);break;case"focusout":Ql=Zm=ra=null;break;case"mousedown":eg=!0;break;case"contextmenu":case"mouseup":case"dragend":eg=!1,fw(h,n,d);break;case"selectionchange":if(F2)break;case"keydown":case"keyup":fw(h,n,d)}var E;if(Rv)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else na?F_(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(M_&&n.locale!=="ko"&&(na||C!=="onCompositionStart"?C==="onCompositionEnd"&&na&&(E=L_()):(Xs=d,Tv="value"in Xs?Xs.value:Xs.textContent,na=!0)),_=Qd(u,C),0<_.length&&(C=new sw(C,e,null,n,d),h.push({event:C,listeners:_}),E?C.data=E:(E=$_(n),E!==null&&(C.data=E)))),(E=T2?C2(e,n):j2(e,n))&&(u=Qd(u,"onBeforeInput"),0<u.length&&(d=new sw("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=E))}J_(h,t)})}function Sc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qd(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=mc(e,n),i!=null&&r.unshift(Sc(e,i,s)),i=mc(e,t),i!=null&&r.push(Sc(e,i,s))),e=e.return}return r}function Io(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gw(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=mc(n,i),l!=null&&o.unshift(Sc(n,l,a))):s||(l=mc(n,i),l!=null&&o.push(Sc(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var B2=/\r\n?/g,z2=/\u0000|\uFFFD/g;function yw(e){return(typeof e=="string"?e:""+e).replace(B2,` 38`).replace(z2,"")}function Ou(e,t,n){if(t=yw(t),yw(e)!==t&&n)throw Error(B(425))}function Zd(){}var tg=null,ng=null;function rg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var sg=typeof setTimeout=="function"?setTimeout:void 0,W2=typeof clearTimeout=="function"?clearTimeout:void 0,vw=typeof Promise=="function"?Promise:void 0,H2=typeof queueMicrotask=="function"?queueMicrotask:typeof vw<"u"?function(e){return vw.resolve(null).then(e).catch(q2)}:sg;function q2(e){setTimeout(function(){throw e})}function Ap(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),vc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);vc(t)}function si(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ol=Math.random().toString(36).slice(2),Fr="__reactFiber$"+ol,kc="__reactProps$"+ol,ps="__reactContainer$"+ol,ig="__reactEvents$"+ol,K2="__reactListeners$"+ol,G2="__reactHandles$"+ol;function Wi(e){var t=e[Fr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ps]||n[Fr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xw(e);e!==null;){if(n=e[Fr])return n;e=xw(e)}return t}e=n,n=e.parentNode}return null}function su(e){return e=e[Fr]||e[ps],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ia(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function af(e){return e[kc]||null}var og=[],oa=-1;function _i(e){return{current:e}}function Xe(e){0>oa||(e.current=og[oa],og[oa]=null,oa--)}function qe(e,t){oa++,og[oa]=e.current,e.current=t}var pi={},qt=_i(pi),fn=_i(!1),po=pi;function Ua(e,t){var n=e.type.contextTypes;if(!n)return pi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function pn(e){return e=e.childContextTypes,e!=null}function eh(){Xe(fn),Xe(qt)}function ww(e,t,n){if(qt.current!==pi)throw Error(B(168));qe(qt,t),qe(fn,n)}function Z_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(B(108,PO(e)||"Unknown",s));return st({},n,r)}function th(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pi,po=qt.current,qe(qt,e),qe(fn,fn.current),!0}function bw(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=Z_(e,t,po),r.__reactInternalMemoizedMergedChildContext=e,Xe(fn),Xe(qt),qe(qt,e)):Xe(fn),qe(fn,n)}var as=null,lf=!1,Pp=!1;function eE(e){as===null?as=[e]:as.push(e)}function Y2(e){lf=!0,eE(e)}function Ei(){if(!Pp&&as!==null){Pp=!0;var e=0,t=Fe;try{var n=as;for(Fe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}as=null,lf=!1}catch(s){throw as!==null&&(as=as.slice(e+1)),E_(Sv,Ei),s}finally{Fe=t,Pp=!1}}return null}var aa=[],la=0,nh=null,rh=0,Ln=[],Mn=0,mo=null,us=1,ds="";function Mi(e,t){aa[la++]=rh,aa[la++]=nh,nh=e,rh=t}function tE(e,t,n){Ln[Mn++]=us,Ln[Mn++]=ds,Ln[Mn++]=mo,mo=e;var r=us;e=ds;var s=32-mr(r)-1;r&=~(1<<s),n+=1;var i=32-mr(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,us=1<<32-mr(t)+s|n<<s|r,ds=i+e}else us=1<<i|n<<s|r,ds=e}function Av(e){e.return!==null&&(Mi(e,1),tE(e,1,0))}function Pv(e){for(;e===nh;)nh=aa[--la],aa[la]=null,rh=aa[--la],aa[la]=null;for(;e===mo;)mo=Ln[--Mn],Ln[Mn]=null,ds=Ln[--Mn],Ln[Mn]=null,us=Ln[--Mn],Ln[Mn]=null}var kn=null,Sn=null,Ze=!1,ur=null;function nE(e,t){var n=Fn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Sw(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,kn=e,Sn=si(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,kn=e,Sn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=mo!==null?{id:us,overflow:ds}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Fn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,kn=e,Sn=null,!0):!1;default:return!1}}function ag(e){return(e.mode&1)!==0&&(e.flags&128)===0}function lg(e){if(Ze){var t=Sn;if(t){var n=t;if(!Sw(e,t)){if(ag(e))throw Error(B(418));t=si(n.nextSibling);var r=kn;t&&Sw(e,t)?nE(r,n):(e.flags=e.flags&-4097|2,Ze=!1,kn=e)}}else{if(ag(e))throw Error(B(418));e.flags=e.flags&-4097|2,Ze=!1,kn=e}}}function kw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;kn=e}function Iu(e){if(e!==kn)return!1;if(!Ze)return kw(e),Ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!rg(e.type,e.memoizedProps)),t&&(t=Sn)){if(ag(e))throw rE(),Error(B(418));for(;t;)nE(e,t),t=si(t.nextSibling)}if(kw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317)
vendor: 9,932 bytes, line 38
38);e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Sn=si(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Sn=null}}else Sn=kn?si(e.stateNode.nextSibling):null;return!0}function rE(){for(var e=Sn;e;)e=si(e.nextSibling)}function Ba(){Sn=kn=null,Ze=!1}function Ov(e){ur===null?ur=[e]:ur.push(e)}var X2=ws.ReactCurrentBatchConfig;function Sl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(B(309));var r=n.stateNode}if(!r)throw Error(B(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,e))}return e}function Du(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _w(e){var t=e._init;return t(e._payload)}function sE(e){function t(x,v){if(e){var w=x.deletions;w===null?(x.deletions=[v],x.flags|=16):w.push(v)}}function n(x,v){if(!e)return null;for(;v!==null;)t(x,v),v=v.sibling;return null}function r(x,v){for(x=new Map;v!==null;)v.key!==null?x.set(v.key,v):x.set(v.index,v),v=v.sibling;return x}function s(x,v){return x=li(x,v),x.index=0,x.sibling=null,x}function i(x,v,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<v?(x.flags|=2,v):w):(x.flags|=2,v)):(x.flags|=1048576,v)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function a(x,v,w,S){return v===null||v.tag!==6?(v=$p(w,x.mode,S),v.return=x,v):(v=s(v,w),v.return=x,v)}function l(x,v,w,S){var k=w.type;return k===ta?d(x,v,w.props.children,S,w.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ds&&_w(k)===v.type)?(S=s(v,w.props),S.ref=Sl(x,v,w),S.return=x,S):(S=Ed(w.type,w.key,w.props,null,x.mode,S),S.ref=Sl(x,v,w),S.return=x,S)}function u(x,v,w,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=Vp(w,x.mode,S),v.return=x,v):(v=s(v,w.children||[]),v.return=x,v)}function d(x,v,w,S,k){return v===null||v.tag!==7?(v=co(w,x.mode,S,k),v.return=x,v):(v=s(v,w),v.return=x,v)}function h(x,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=$p(""+v,x.mode,w),v.return=x,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case _u:return w=Ed(v.type,v.key,v.props,null,x.mode,w),w.ref=Sl(x,null,v),w.return=x,w;case ea:return v=Vp(v,x.mode,w),v.return=x,v;case Ds:var S=v._init;return h(x,S(v._payload),w)}if(Ll(v)||yl(v))return v=co(v,x.mode,w,null),v.return=x,v;Du(x,v)}return null}function f(x,v,w,S){var k=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:a(x,v,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _u:return w.key===k?l(x,v,w,S):null;case ea:return w.key===k?u(x,v,w,S):null;case Ds:return k=w._init,f(x,v,k(w._payload),S)}if(Ll(w)||yl(w))return k!==null?null:d(x,v,w,S,null);Du(x,w)}return null}function p(x,v,w,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(w)||null,a(v,x,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case _u:return x=x.get(S.key===null?w:S.key)||null,l(v,x,S,k);case ea:return x=x.get(S.key===null?w:S.key)||null,u(v,x,S,k);case Ds:var _=S._init;return p(x,v,w,_(S._payload),k)}if(Ll(S)||yl(S))return x=x.get(w)||null,d(v,x,S,k,null);Du(v,S)}return null}function y(x,v,w,S){for(var k=null,_=null,E=v,C=v=0,N=null;E!==null&&C<w.length;C++){E.index>C?(N=E,E=null):N=E.sibling;var R=f(x,E,w[C],S);if(R===null){E===null&&(E=N);break}e&&E&&R.alternate===null&&t(x,E),v=i(R,v,C),_===null?k=R:_.sibling=R,_=R,E=N}if(C===w.length)return n(x,E),Ze&&Mi(x,C),k;if(E===null){for(;C<w.length;C++)E=h(x,w[C],S),E!==null&&(v=i(E,v,C),_===null?k=E:_.sibling=E,_=E);return Ze&&Mi(x,C),k}for(E=r(x,E);C<w.length;C++)N=p(E,x,C,w[C],S),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?C:N.key),v=i(N,v,C),_===null?k=N:_.sibling=N,_=N);return e&&E.forEach(function($){return t(x,$)}),Ze&&Mi(x,C),k}function g(x,v,w,S){var k=yl(w);if(typeof k!="function")throw Error(B(150));if(w=k.call(w),w==null)throw Error(B(151));for(var _=k=null,E=v,C=v=0,N=null,R=w.next();E!==null&&!R.done;C++,R=w.next()){E.index>C?(N=E,E=null):N=E.sibling;var $=f(x,E,R.value,S);if($===null){E===null&&(E=N);break}e&&E&&$.alternate===null&&t(x,E),v=i($,v,C),_===null?k=$:_.sibling=$,_=$,E=N}if(R.done)return n(x,E),Ze&&Mi(x,C),k;if(E===null){for(;!R.done;C++,R=w.next())R=h(x,R.value,S),R!==null&&(v=i(R,v,C),_===null?k=R:_.sibling=R,_=R);return Ze&&Mi(x,C),k}for(E=r(x,E);!R.done;C++,R=w.next())R=p(E,x,C,R.value,S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?C:R.key),v=i(R,v,C),_===null?k=R:_.sibling=R,_=R);return e&&E.forEach(function(D){return t(x,D)}),Ze&&Mi(x,C),k}function b(x,v,w,S){if(typeof w=="object"&&w!==null&&w.type===ta&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case _u:e:{for(var k=w.key,_=v;_!==null;){if(_.key===k){if(k=w.type,k===ta){if(_.tag===7){n(x,_.sibling),v=s(_,w.props.children),v.return=x,x=v;break e}}else if(_.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ds&&_w(k)===_.type){n(x,_.sibling),v=s(_,w.props),v.ref=Sl(x,_,w),v.return=x,x=v;break e}n(x,_);break}else t(x,_);_=_.sibling}w.type===ta?(v=co(w.props.children,x.mode,S,w.key),v.return=x,x=v):(S=Ed(w.type,w.key,w.props,null,x.mode,S),S.ref=Sl(x,v,w),S.return=x,x=S)}return o(x);case ea:e:{for(_=w.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(x,v.sibling),v=s(v,w.children||[]),v.return=x,x=v;break e}else{n(x,v);break}else t(x,v);v=v.sibling}v=Vp(w,x.mode,S),v.return=x,x=v}return o(x);case Ds:return _=w._init,b(x,v,_(w._payload),S)}if(Ll(w))return y(x,v,w,S);if(yl(w))return g(x,v,w,S);Du(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(x,v.sibling),v=s(v,w),v.return=x,x=v):(n(x,v),v=$p(w,x.mode,S),v.return=x,x=v),o(x)):n(x,v)}return b}var za=sE(!0),iE=sE(!1),sh=_i(null),ih=null,ca=null,Iv=null;function Dv(){Iv=ca=ih=null}function Lv(e){var t=sh.current;Xe(sh),e._currentValue=t}function cg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function wa(e,t){ih=e,Iv=ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(hn=!0),e.firstContext=null)}function Bn(e){var t=e._currentValue;if(Iv!==e)if(e={context:e,memoizedValue:t,next:null},ca===null){if(ih===null)throw Error(B(308));ca=e,ih.dependencies={lanes:0,firstContext:e}}else ca=ca.next=e;return t}var Hi=null;function Mv(e){Hi===null?Hi=[e]:Hi.push(e)}function oE(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Mv(t)):(n.next=s.next,s.next=n),t.interleaved=n,ms(e,r)}function ms(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ls=!1;function Fv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aE(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 hs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ii(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Re&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,ms(e,n)}return s=r.interleaved,s===null?(t.next=t,Mv(r)):(t.next=s.next,s.next=t),r.interleaved=t,ms(e,n)}function xd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kv(e,n)}}function Ew(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function oh(e,t,n,r){var s=e.updateQueue;Ls=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,d=u=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,g=a;switch(f=t,p=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){h=y.call(p,h,f);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,f=typeof y=="function"?y.call(p,h,f):y,f==null)break e;h=st({},h,f);break e;case 2:Ls=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=h):d=d.next=p,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=h),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);yo|=o,e.lanes=o,e.memoizedState=h}}
vendor: 1,783 bytes, line 38
38function Tw(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(B(191,s));s.call(r)}}}var iu={},Br=_i(iu),_c=_i(iu),Ec=_i(iu);function qi(e){if(e===iu)throw Error(B(174));return e}function $v(e,t){switch(qe(Ec,t),qe(_c,e),qe(Br,iu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zm(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zm(t,e)}Xe(Br),qe(Br,t)}function Wa(){Xe(Br),Xe(_c),Xe(Ec)}function lE(e){qi(Ec.current);var t=qi(Br.current),n=zm(t,e.type);t!==n&&(qe(_c,e),qe(Br,n))}function Vv(e){_c.current===e&&(Xe(Br),Xe(_c))}var nt=_i(0);function ah(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Op=[];function Uv(){for(var e=0;e<Op.length;e++)Op[e]._workInProgressVersionPrimary=null;Op.length=0}var wd=ws.ReactCurrentDispatcher,Ip=ws.ReactCurrentBatchConfig,go=0,rt=null,_t=null,Rt=null,lh=!1,Zl=!1,Tc=0,J2=0;function Ut(){throw Error(B(321))}function Bv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function zv(e,t,n,r,s,i){if(go=i,rt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,wd.current=e===null||e.memoizedState===null?tI:nI,e=n(r,s),Zl){i=0;do{if(Zl=!1,Tc=0,25<=i)throw Error(B(301));i+=1,Rt=_t=null,t.updateQueue=null,wd.current=rI,e=n(r,s)}while(Zl)}
vendor: 6,481 bytes, line 38
38if(wd.current=ch,t=_t!==null&&_t.next!==null,go=0,Rt=_t=rt=null,lh=!1,t)throw Error(B(300));return e}function Wv(){var e=Tc!==0;return Tc=0,e}function Nr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?rt.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function zn(){if(_t===null){var e=rt.alternate;e=e!==null?e.memoizedState:null}else e=_t.next;var t=Rt===null?rt.memoizedState:Rt.next;if(t!==null)Rt=t,_t=e;else{if(e===null)throw Error(B(310));_t=e,e={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},Rt===null?rt.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function Cc(e,t){return typeof t=="function"?t(e):t}function Dp(e){var t=zn(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=_t,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var d=u.lane;if((go&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,o=r):l=l.next=h,rt.lanes|=d,yo|=d}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,vr(r,t.memoizedState)||(hn=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,rt.lanes|=i,yo|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Lp(e){var t=zn(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);vr(i,t.memoizedState)||(hn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function cE(){}function uE(e,t){var n=rt,r=zn(),s=t(),i=!vr(r.memoizedState,s);if(i&&(r.memoizedState=s,hn=!0),r=r.queue,Hv(fE.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Rt!==null&&Rt.memoizedState.tag&1){if(n.flags|=2048,jc(9,hE.bind(null,n,r,s,t),void 0,null),Nt===null)throw Error(B(349));go&30||dE(n,t,s)}return s}function dE(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=rt.updateQueue,t===null?(t={lastEffect:null,stores:null},rt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hE(e,t,n,r){t.value=n,t.getSnapshot=r,pE(t)&&mE(e)}function fE(e,t,n){return n(function(){pE(t)&&mE(e)})}function pE(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function mE(e){var t=ms(e,1);t!==null&&gr(t,e,1,-1)}function Cw(e){var t=Nr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cc,lastRenderedState:e},t.queue=e,e=e.dispatch=eI.bind(null,rt,e),[t.memoizedState,e]}function jc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=rt.updateQueue,t===null?(t={lastEffect:null,stores:null},rt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function gE(){return zn().memoizedState}function bd(e,t,n,r){var s=Nr();rt.flags|=e,s.memoizedState=jc(1|t,n,void 0,r===void 0?null:r)}function cf(e,t,n,r){var s=zn();r=r===void 0?null:r;var i=void 0;if(_t!==null){var o=_t.memoizedState;if(i=o.destroy,r!==null&&Bv(r,o.deps)){s.memoizedState=jc(t,n,i,r);return}}rt.flags|=e,s.memoizedState=jc(1|t,n,i,r)}function jw(e,t){return bd(8390656,8,e,t)}function Hv(e,t){return cf(2048,8,e,t)}function yE(e,t){return cf(4,2,e,t)}function vE(e,t){return cf(4,4,e,t)}function xE(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wE(e,t,n){return n=n!=null?n.concat([e]):null,cf(4,4,xE.bind(null,t,e),n)}function qv(){}function bE(e,t){var n=zn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bv(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function SE(e,t){var n=zn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bv(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function kE(e,t,n){return go&21?(vr(n,t)||(n=j_(),rt.lanes|=n,yo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=n)}function Q2(e,t){var n=Fe;Fe=n!==0&&4>n?n:4,e(!0);var r=Ip.transition;Ip.transition={};try{e(!1),t()}finally{Fe=n,Ip.transition=r}}function _E(){return zn().memoizedState}function Z2(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},EE(e))TE(t,n);else if(n=oE(e,t,n,r),n!==null){var s=en();gr(n,e,r,s),CE(n,t,r)}}function eI(e,t,n){var r=ai(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(EE(e))TE(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,vr(a,o)){var l=t.interleaved;l===null?(s.next=s,Mv(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=oE(e,t,s,r),n!==null&&(s=en(),gr(n,e,r,s),CE(n,t,r))}}function EE(e){var t=e.alternate;return e===rt||t!==null&&t===rt}function TE(e,t){Zl=lh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function CE(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kv(e,n)}}var ch={readContext:Bn,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useInsertionEffect:Ut,useLayoutEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useMutableSource:Ut,useSyncExternalStore:Ut,useId:Ut,unstable_isNewReconciler:!1},tI={readContext:Bn,useCallback:function(e,t){return Nr().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:jw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,bd(4194308,4,xE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bd(4194308,4,e,t)},useInsertionEffect:function(e,t){return bd(4,2,e,t)},useMemo:function(e,t){var n=Nr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Z2.bind(null,rt,e),[r.memoizedState,e]}
vendor: 5,199 bytes, lines 38-40
38,useRef:function(e){var t=Nr();return e={current:e},t.memoizedState=e},useState:Cw,useDebugValue:qv,useDeferredValue:function(e){return Nr().memoizedState=e},useTransition:function(){var e=Cw(!1),t=e[0];return e=Q2.bind(null,e[1]),Nr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=rt,s=Nr();if(Ze){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),Nt===null)throw Error(B(349));go&30||dE(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,jw(fE.bind(null,r,i,e),[e]),r.flags|=2048,jc(9,hE.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Nr(),t=Nt.identifierPrefix;if(Ze){var n=ds,r=us;n=(r&~(1<<32-mr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Tc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=J2++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},nI={readContext:Bn,useCallback:bE,useContext:Bn,useEffect:Hv,useImperativeHandle:wE,useInsertionEffect:yE,useLayoutEffect:vE,useMemo:SE,useReducer:Dp,useRef:gE,useState:function(){return Dp(Cc)},useDebugValue:qv,useDeferredValue:function(e){var t=zn();return kE(t,_t.memoizedState,e)},useTransition:function(){var e=Dp(Cc)[0],t=zn().memoizedState;return[e,t]},useMutableSource:cE,useSyncExternalStore:uE,useId:_E,unstable_isNewReconciler:!1},rI={readContext:Bn,useCallback:bE,useContext:Bn,useEffect:Hv,useImperativeHandle:wE,useInsertionEffect:yE,useLayoutEffect:vE,useMemo:SE,useReducer:Lp,useRef:gE,useState:function(){return Lp(Cc)},useDebugValue:qv,useDeferredValue:function(e){var t=zn();return _t===null?t.memoizedState=e:kE(t,_t.memoizedState,e)},useTransition:function(){var e=Lp(Cc)[0],t=zn().memoizedState;return[e,t]},useMutableSource:cE,useSyncExternalStore:uE,useId:_E,unstable_isNewReconciler:!1};function ir(e,t){if(e&&e.defaultProps){t=st({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ug(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:st({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uf={isMounted:function(e){return(e=e._reactInternals)?No(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=en(),s=ai(e),i=hs(r,s);i.payload=t,n!=null&&(i.callback=n),t=ii(e,i,s),t!==null&&(gr(t,e,s,r),xd(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=en(),s=ai(e),i=hs(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ii(e,i,s),t!==null&&(gr(t,e,s,r),xd(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=en(),r=ai(e),s=hs(n,r);s.tag=2,t!=null&&(s.callback=t),t=ii(e,s,r),t!==null&&(gr(t,e,r,n),xd(t,e,r))}};function Rw(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!wc(n,r)||!wc(s,i):!0}function jE(e,t,n){var r=!1,s=pi,i=t.contextType;return typeof i=="object"&&i!==null?i=Bn(i):(s=pn(t)?po:qt.current,r=t.contextTypes,i=(r=r!=null)?Ua(e,s):pi),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Nw(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&uf.enqueueReplaceState(t,t.state,null)}function dg(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Fv(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Bn(i):(i=pn(t)?po:qt.current,s.context=Ua(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ug(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&uf.enqueueReplaceState(s,s.state,null),oh(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ha(e,t){try{var n="",r=t;do n+=AO(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Mp(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var sI=typeof WeakMap=="function"?WeakMap:Map;function RE(e,t,n){n=hs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){dh||(dh=!0,Sg=r),hg(e,t)},n}function NE(e,t,n){n=hs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){hg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){hg(e,t),typeof r!="function"&&(oi===null?oi=new Set([this]):oi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}
vendor: 10,591 bytes, line 40
40function Aw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new sI;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=vI.bind(null,e,t,n),t.then(e,e))}function Pw(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 Ow(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=hs(-1,1),t.tag=2,ii(n,t,1))),n.lanes|=1),e)}var iI=ws.ReactCurrentOwner,hn=!1;function Xt(e,t,n,r){t.child=e===null?iE(t,null,n,r):za(t,e.child,n,r)}function Iw(e,t,n,r,s){n=n.render;var i=t.ref;return wa(t,s),r=zv(e,t,n,r,i,s),n=Wv(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gs(e,t,s)):(Ze&&n&&Av(t),t.flags|=1,Xt(e,t,r,s),t.child)}function Dw(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!ex(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,AE(e,t,i,r,s)):(e=Ed(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:wc,n(o,r)&&e.ref===t.ref)return gs(e,t,s)}return t.flags|=1,e=li(i,r),e.ref=t.ref,e.return=t,t.child=e}function AE(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(wc(i,r)&&e.ref===t.ref)if(hn=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(hn=!0);else return t.lanes=e.lanes,gs(e,t,s)}return fg(e,t,n,r,s)}function PE(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(da,vn),vn|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qe(da,vn),vn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,qe(da,vn),vn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,qe(da,vn),vn|=r;return Xt(e,t,s,n),t.child}function OE(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function fg(e,t,n,r,s){var i=pn(n)?po:qt.current;return i=Ua(t,i),wa(t,s),n=zv(e,t,n,r,i,s),r=Wv(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gs(e,t,s)):(Ze&&r&&Av(t),t.flags|=1,Xt(e,t,n,s),t.child)}function Lw(e,t,n,r,s){if(pn(n)){var i=!0;th(t)}else i=!1;if(wa(t,s),t.stateNode===null)Sd(e,t),jE(t,n,r),dg(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Bn(u):(u=pn(n)?po:qt.current,u=Ua(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Nw(t,o,r,u),Ls=!1;var f=t.memoizedState;o.state=f,oh(t,r,o,s),l=t.memoizedState,a!==r||f!==l||fn.current||Ls?(typeof d=="function"&&(ug(t,n,d,r),l=t.memoizedState),(a=Ls||Rw(t,n,a,r,f,l,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,aE(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ir(t.type,a),o.props=u,h=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Bn(l):(l=pn(n)?po:qt.current,l=Ua(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||f!==l)&&Nw(t,o,r,l),Ls=!1,f=t.memoizedState,o.state=f,oh(t,r,o,s);var y=t.memoizedState;a!==h||f!==y||fn.current||Ls?(typeof p=="function"&&(ug(t,n,p,r),y=t.memoizedState),(u=Ls||Rw(t,n,u,r,f,y,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return pg(e,t,n,r,i,s)}function pg(e,t,n,r,s,i){OE(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&bw(t,n,!1),gs(e,t,i);r=t.stateNode,iI.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=za(t,e.child,null,i),t.child=za(t,null,a,i)):Xt(e,t,a,i),t.memoizedState=r.state,s&&bw(t,n,!0),t.child}function IE(e){var t=e.stateNode;t.pendingContext?ww(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ww(e,t.context,!1),$v(e,t.containerInfo)}function Mw(e,t,n,r,s){return Ba(),Ov(s),t.flags|=256,Xt(e,t,n,r),t.child}var mg={dehydrated:null,treeContext:null,retryLane:0};function gg(e){return{baseLanes:e,cachePool:null,transitions:null}}function DE(e,t,n){var r=t.pendingProps,s=nt.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),qe(nt,s&1),e===null)return lg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ff(o,r,0,null),e=co(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=gg(n),t.memoizedState=mg,e):Kv(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return oI(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=li(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=li(a,i):(i=co(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?gg(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=mg,r}return i=e.child,e=i.sibling,r=li(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Kv(e,t){return t=ff({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lu(e,t,n,r){return r!==null&&Ov(r),za(t,e.child,null,n),e=Kv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oI(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Mp(Error(B(422))),Lu(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=ff({mode:"visible",children:r.children},s,0,null),i=co(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&za(t,e.child,null,o),t.child.memoizedState=gg(o),t.memoizedState=mg,i);if(!(t.mode&1))return Lu(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(B(419)),r=Mp(i,r,void 0),Lu(e,t,o,r)}if(a=(o&e.childLanes)!==0,hn||a){if(r=Nt,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,ms(e,s),gr(r,e,s,-1))}return Zv(),r=Mp(Error(B(421))),Lu(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=xI.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Sn=si(s.nextSibling),kn=t,Ze=!0,ur=null,e!==null&&(Ln[Mn++]=us,Ln[Mn++]=ds,Ln[Mn++]=mo,us=e.id,ds=e.overflow,mo=t),t=Kv(t,r.children),t.flags|=4096,t)}function Fw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cg(e.return,t,n)}function Fp(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function LE(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Xt(e,t,r.children,n),r=nt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fw(e,n,t);else if(e.tag===19)Fw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(qe(nt,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&ah(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Fp(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ah(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Fp(t,!0,n,null,i);break;case"together":Fp(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Sd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}
vendor: 4,565 bytes, line 40
40function aI(e,t,n){switch(t.tag){case 3:IE(t),Ba();break;case 5:lE(t);break;case 1:pn(t.type)&&th(t);break;case 4:$v(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;qe(sh,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(qe(nt,nt.current&1),t.flags|=128,null):n&t.child.childLanes?DE(e,t,n):(qe(nt,nt.current&1),e=gs(e,t,n),e!==null?e.sibling:null);qe(nt,nt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return LE(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),qe(nt,nt.current),r)break;return null;case 22:case 23:return t.lanes=0,PE(e,t,n)}return gs(e,t,n)}var ME,yg,FE,$E;ME=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yg=function(){};FE=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,qi(Br.current);var i=null;switch(n){case"input":s=$m(e,s),r=$m(e,r),i=[];break;case"select":s=st({},s,{value:void 0}),r=st({},r,{value:void 0}),i=[];break;case"textarea":s=Bm(e,s),r=Bm(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zd)}Wm(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(fc.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(fc.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ge("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};$E=function(e,t,n,r){n!==r&&(t.flags|=4)};function kl(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function lI(e,t,n){var r=t.pendingProps;switch(Pv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(t),null;case 1:return pn(t.type)&&eh(),Bt(t),null;case 3:return r=t.stateNode,Wa(),Xe(fn),Xe(qt),Uv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Iu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ur!==null&&(Eg(ur),ur=null))),yg(e,t),Bt(t),null;case 5:Vv(t);var s=qi(Ec.current);if(n=t.type,e!==null&&t.stateNode!=null)FE(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return Bt(t),null}if(e=qi(Br.current),Iu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Fr]=t,r[kc]=i,e=(t.mode&1)!==0,n){case"dialog":Ge("cancel",r),Ge("close",r);break;case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(s=0;s<Fl.length;s++)Ge(Fl[s],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"details":Ge("toggle",r);break;case"input":K0(r,i),Ge("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ge("invalid",r);break;case"textarea":Y0(r,i),Ge("invalid",r)}Wm(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 28,963 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Ou(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Ou(r.textContent,a,e),s=["children",""+a]):fc.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ge("scroll",r)}switch(n){case"input":Eu(r),G0(r,i,!0);break;case"textarea":Eu(r),X0(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Zd)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=f_(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Fr]=t,e[kc]=r,ME(e,t,!1,!1),t.stateNode=e;e:{switch(o=Hm(n,r),n){case"dialog":Ge("cancel",e),Ge("close",e),s=r;break;case"iframe":case"object":case"embed":Ge("load",e),s=r;break;case"video":case"audio":for(s=0;s<Fl.length;s++)Ge(Fl[s],e);s=r;break;case"source":Ge("error",e),s=r;break;case"img":case"image":case"link":Ge("error",e),Ge("load",e),s=r;break;case"details":Ge("toggle",e),s=r;break;case"input":K0(e,r),s=$m(e,r),Ge("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=st({},r,{value:void 0}),Ge("invalid",e);break;case"textarea":Y0(e,r),s=Bm(e,r),Ge("invalid",e);break;default:s=r}Wm(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?g_(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&p_(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&pc(e,l):typeof l=="number"&&pc(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(fc.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ge("scroll",e):l!=null&&yv(e,i,l,o))}switch(n){case"input":Eu(e),G0(e,r,!1);break;case"textarea":Eu(e),X0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fi(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ga(e,!!r.multiple,i,!1):r.defaultValue!=null&&ga(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Zd)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Bt(t),null;case 6:if(e&&t.stateNode!=null)$E(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=qi(Ec.current),qi(Br.current),Iu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Fr]=t,(i=r.nodeValue!==n)&&(e=kn,e!==null))switch(e.tag){case 3:Ou(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ou(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Fr]=t,t.stateNode=r}return Bt(t),null;case 13:if(Xe(nt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ze&&Sn!==null&&t.mode&1&&!(t.flags&128))rE(),Ba(),t.flags|=98560,i=!1;else if(i=Iu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(B(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(B(317));i[Fr]=t}else Ba(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bt(t),i=!1}else ur!==null&&(Eg(ur),ur=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||nt.current&1?Tt===0&&(Tt=3):Zv())),t.updateQueue!==null&&(t.flags|=4),Bt(t),null);case 4:return Wa(),yg(e,t),e===null&&bc(t.stateNode.containerInfo),Bt(t),null;case 10:return Lv(t.type._context),Bt(t),null;case 17:return pn(t.type)&&eh(),Bt(t),null;case 19:if(Xe(nt),i=t.memoizedState,i===null)return Bt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)kl(i,!1);else{if(Tt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ah(e),o!==null){for(t.flags|=128,kl(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return qe(nt,nt.current&1|2),t.child}e=e.sibling}i.tail!==null&&ut()>qa&&(t.flags|=128,r=!0,kl(i,!1),t.lanes=4194304)}else{if(!r)if(e=ah(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ze)return Bt(t),null}else 2*ut()-i.renderingStartTime>qa&&n!==1073741824&&(t.flags|=128,r=!0,kl(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ut(),t.sibling=null,n=nt.current,qe(nt,r?n&1|2:n&1),t):(Bt(t),null);case 22:case 23:return Qv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?vn&1073741824&&(Bt(t),t.subtreeFlags&6&&(t.flags|=8192)):Bt(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function cI(e,t){switch(Pv(t),t.tag){case 1:return pn(t.type)&&eh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wa(),Xe(fn),Xe(qt),Uv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Vv(t),null;case 13:if(Xe(nt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));Ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xe(nt),null;case 4:return Wa(),null;case 10:return Lv(t.type._context),null;case 22:case 23:return Qv(),null;case 24:return null;default:return null}}var Mu=!1,Ht=!1,uI=typeof WeakSet=="function"?WeakSet:Set,ee=null;function ua(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){lt(e,t,r)}else n.current=null}function vg(e,t,n){try{n()}catch(r){lt(e,t,r)}}var $w=!1;function dI(e,t){if(tg=Xd,e=W_(),Nv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(a=o+s),h!==i||r!==0&&h.nodeType!==3||(l=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===s&&(a=o),f===i&&++d===r&&(l=o),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ng={focusedElem:e,selectionRange:n},Xd=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,b=y.memoizedState,x=t.stateNode,v=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:ir(t.type,g),b);x.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(S){lt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return y=$w,$w=!1,y}function ec(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&vg(t,n,i)}s=s.next}while(s!==r)}}function df(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function VE(e){var t=e.alternate;t!==null&&(e.alternate=null,VE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fr],delete t[kc],delete t[ig],delete t[K2],delete t[G2])),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 UE(e){return e.tag===5||e.tag===3||e.tag===4}function Vw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||UE(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 wg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zd));else if(r!==4&&(e=e.child,e!==null))for(wg(e,t,n),e=e.sibling;e!==null;)wg(e,t,n),e=e.sibling}function bg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bg(e,t,n),e=e.sibling;e!==null;)bg(e,t,n),e=e.sibling}var Dt=null,cr=!1;function Ts(e,t,n){for(n=n.child;n!==null;)BE(e,t,n),n=n.sibling}function BE(e,t,n){if(Ur&&typeof Ur.onCommitFiberUnmount=="function")try{Ur.onCommitFiberUnmount(nf,n)}catch{}switch(n.tag){case 5:Ht||ua(n,t);case 6:var r=Dt,s=cr;Dt=null,Ts(e,t,n),Dt=r,cr=s,Dt!==null&&(cr?(e=Dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Dt.removeChild(n.stateNode));break;case 18:Dt!==null&&(cr?(e=Dt,n=n.stateNode,e.nodeType===8?Ap(e.parentNode,n):e.nodeType===1&&Ap(e,n),vc(e)):Ap(Dt,n.stateNode));break;case 4:r=Dt,s=cr,Dt=n.stateNode.containerInfo,cr=!0,Ts(e,t,n),Dt=r,cr=s;break;case 0:case 11:case 14:case 15:if(!Ht&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&vg(n,t,o),s=s.next}while(s!==r)}Ts(e,t,n);break;case 1:if(!Ht&&(ua(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){lt(n,t,a)}Ts(e,t,n);break;case 21:Ts(e,t,n);break;case 22:n.mode&1?(Ht=(r=Ht)||n.memoizedState!==null,Ts(e,t,n),Ht=r):Ts(e,t,n);break;default:Ts(e,t,n)}}function Uw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new uI),t.forEach(function(r){var s=wI.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Qn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Dt=a.stateNode,cr=!1;break e;case 3:Dt=a.stateNode.containerInfo,cr=!0;break e;case 4:Dt=a.stateNode.containerInfo,cr=!0;break e}a=a.return}if(Dt===null)throw Error(B(160));BE(i,o,s),Dt=null,cr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){lt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zE(t,e),t=t.sibling}function zE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qn(t,e),jr(e),r&4){try{ec(3,e,e.return),df(3,e)}catch(g){lt(e,e.return,g)}try{ec(5,e,e.return)}catch(g){lt(e,e.return,g)}}break;case 1:Qn(t,e),jr(e),r&512&&n!==null&&ua(n,n.return);break;case 5:if(Qn(t,e),jr(e),r&512&&n!==null&&ua(n,n.return),e.flags&32){var s=e.stateNode;try{pc(s,"")}catch(g){lt(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&d_(s,i),Hm(a,o);var u=Hm(a,i);for(o=0;o<l.length;o+=2){var d=l[o],h=l[o+1];d==="style"?g_(s,h):d==="dangerouslySetInnerHTML"?p_(s,h):d==="children"?pc(s,h):yv(s,d,h,u)}switch(a){case"input":Vm(s,i);break;case"textarea":h_(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?ga(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?ga(s,!!i.multiple,i.defaultValue,!0):ga(s,!!i.multiple,i.multiple?[]:"",!1))}s[kc]=i}catch(g){lt(e,e.return,g)}}break;case 6:if(Qn(t,e),jr(e),r&4){if(e.stateNode===null)throw Error(B(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){lt(e,e.return,g)}}break;case 3:if(Qn(t,e),jr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vc(t.containerInfo)}catch(g){lt(e,e.return,g)}break;case 4:Qn(t,e),jr(e);break;case 13:Qn(t,e),jr(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Xv=ut())),r&4&&Uw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ht=(u=Ht)||d,Qn(t,e),Ht=u):Qn(t,e),jr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ee=e,d=e.child;d!==null;){for(h=ee=d;ee!==null;){switch(f=ee,p=f.child,f.tag){case 0:case 11:case 14:case 15:ec(4,f,f.return);break;case 1:ua(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){lt(r,n,g)}}break;case 5:ua(f,f.return);break;case 22:if(f.memoizedState!==null){zw(h);continue}}p!==null?(p.return=f,ee=p):zw(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=m_("display",o))}catch(g){lt(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){lt(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Qn(t,e),jr(e),r&4&&Uw(e);break;case 21:break;default:Qn(t,e),jr(e)}}function jr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(UE(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(pc(s,""),r.flags&=-33);var i=Vw(e);bg(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Vw(e);wg(e,a,o);break;default:throw Error(B(161))}}catch(l){lt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hI(e,t,n){ee=e,WE(e)}function WE(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var s=ee,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Mu;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ht;a=Mu;var u=Ht;if(Mu=o,(Ht=l)&&!u)for(ee=s;ee!==null;)o=ee,l=o.child,o.tag===22&&o.memoizedState!==null?Ww(s):l!==null?(l.return=o,ee=l):Ww(s);for(;i!==null;)ee=i,WE(i),i=i.sibling;ee=s,Mu=a,Ht=u}Bw(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,ee=i):Bw(e)}}function Bw(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ht||df(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ht)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ir(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Tw(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Tw(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&vc(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}Ht||t.flags&512&&xg(t)}catch(f){lt(t,t.return,f)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function zw(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function Ww(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{df(4,t)}catch(l){lt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){lt(t,s,l)}}var i=t.return;try{xg(t)}catch(l){lt(t,i,l)}break;case 5:var o=t.return;try{xg(t)}catch(l){lt(t,o,l)}}}catch(l){lt(t,t.return,l)}if(t===e){ee=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ee=a;break}ee=t.return}}var fI=Math.ceil,uh=ws.ReactCurrentDispatcher,Gv=ws.ReactCurrentOwner,Vn=ws.ReactCurrentBatchConfig,Re=0,Nt=null,xt=null,$t=0,vn=0,da=_i(0),Tt=0,Rc=null,yo=0,hf=0,Yv=0,tc=null,dn=null,Xv=0,qa=1/0,ss=null,dh=!1,Sg=null,oi=null,Fu=!1,Js=null,hh=0,nc=0,kg=null,kd=-1,_d=0;function en(){return Re&6?ut():kd!==-1?kd:kd=ut()}function ai(e){return e.mode&1?Re&2&&$t!==0?$t&-$t:X2.transition!==null?(_d===0&&(_d=j_()),_d):(e=Fe,e!==0||(e=window.event,e=e===void 0?16:D_(e.type)),e):1}function gr(e,t,n,r){if(50<nc)throw nc=0,kg=null,Error(B(185));nu(e,n,r),(!(Re&2)||e!==Nt)&&(e===Nt&&(!(Re&2)&&(hf|=n),Tt===4&&$s(e,$t)),mn(e,r),n===1&&Re===0&&!(t.mode&1)&&(qa=ut()+500,lf&&Ei()))}function mn(e,t){var n=e.callbackNode;XO(e,t);var r=Yd(e,e===Nt?$t:0);if(r===0)n!==null&&Z0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Z0(n),t===1)e.tag===0?Y2(Hw.bind(null,e)):eE(Hw.bind(null,e)),H2(function(){!(Re&6)&&Ei()}),n=null;else{switch(R_(r)){case 1:n=Sv;break;case 4:n=T_;break;case 16:n=Gd;break;case 536870912:n=C_;break;default:n=Gd}n=QE(n,HE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function HE(e,t){if(kd=-1,_d=0,Re&6)throw Error(B(327));var n=e.callbackNode;if(ba()&&e.callbackNode!==n)return null;var r=Yd(e,e===Nt?$t:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=fh(e,r);else{t=r;var s=Re;Re|=2;var i=KE();(Nt!==e||$t!==t)&&(ss=null,qa=ut()+500,lo(e,t));do try{gI();break}catch(a){qE(e,a)}while(!0);Dv(),uh.current=i,Re=s,xt!==null?t=0:(Nt=null,$t=0,t=Tt)}if(t!==0){if(t===2&&(s=Xm(e),s!==0&&(r=s,t=_g(e,s))),t===1)throw n=Rc,lo(e,0),$s(e,r),mn(e,ut()),n;if(t===6)$s(e,r);else{if(s=e.current.alternate,!(r&30)&&!pI(s)&&(t=fh(e,r),t===2&&(i=Xm(e),i!==0&&(r=i,t=_g(e,i))),t===1))throw n=Rc,lo(e,0),$s(e,r),mn(e,ut()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:Fi(e,dn,ss);break;case 3:if($s(e,r),(r&130023424)===r&&(t=Xv+500-ut(),10<t)){if(Yd(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){en(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=sg(Fi.bind(null,e,dn,ss),t);break}Fi(e,dn,ss);break;case 4:if($s(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-mr(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fI(r/1960))-r,10<r){e.timeoutHandle=sg(Fi.bind(null,e,dn,ss),r);break}Fi(e,dn,ss);break;case 5:Fi(e,dn,ss);break;default:throw Error(B(329))}}}return mn(e,ut()),e.callbackNode===n?HE.bind(null,e):null}function _g(e,t){var n=tc;return e.current.memoizedState.isDehydrated&&(lo(e,t).flags|=256),e=fh(e,t),e!==2&&(t=dn,dn=n,t!==null&&Eg(t)),e}function Eg(e){dn===null?dn=e:dn.push.apply(dn,e)}function pI(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!vr(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $s(e,t){for(t&=~Yv,t&=~hf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mr(t),r=1<<n;e[n]=-1,t&=~r}}function Hw(e){if(Re&6)throw Error(B(327));ba();var t=Yd(e,0);if(!(t&1))return mn(e,ut()),null;var n=fh(e,t);if(e.tag!==0&&n===2){var r=Xm(e);r!==0&&(t=r,n=_g(e,r))}if(n===1)throw n=Rc,lo(e,0),$s(e,t),mn(e,ut()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fi(e,dn,ss),mn(e,ut()),null}function Jv(e,t){var n=Re;Re|=1;try{return e(t)}finally{Re=n,Re===0&&(qa=ut()+500,lf&&Ei())}}function vo(e){Js!==null&&Js.tag===0&&!(Re&6)&&ba();var t=Re;Re|=1;var n=Vn.transition,r=Fe;try{if(Vn.transition=null,Fe=1,e)return e()}finally{Fe=r,Vn.transition=n,Re=t,!(Re&6)&&Ei()}}function Qv(){vn=da.current,Xe(da)}function lo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,W2(n)),xt!==null)for(n=xt.return;n!==null;){var r=n;switch(Pv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&eh();break;case 3:Wa(),Xe(fn),Xe(qt),Uv();break;case 5:Vv(r);break;case 4:Wa();break;case 13:Xe(nt);break;case 19:Xe(nt);break;case 10:Lv(r.type._context);break;case 22:case 23:Qv()}n=n.return}if(Nt=e,xt=e=li(e.current,null),$t=vn=t,Tt=0,Rc=null,Yv=hf=yo=0,dn=tc=null,Hi!==null){for(t=0;t<Hi.length;t++)if(n=Hi[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Hi=null}return e}function qE(e,t){do{var n=xt;try{if(Dv(),wd.current=ch,lh){for(var r=rt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}lh=!1}if(go=0,Rt=_t=rt=null,Zl=!1,Tc=0,Gv.current=null,n===null||n.return===null){Tt=1,Rc=t,xt=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=$t,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Pw(o);if(p!==null){p.flags&=-257,Ow(p,o,a,i,t),p.mode&1&&Aw(i,u,t),t=p,l=u;var y=t.updateQueue;if(y===null){var g=new Set;g.add(l),t.updateQueue=g}else y.add(l);break e}else{if(!(t&1)){Aw(i,u,t),Zv();break e}l=Error(B(426))}}else if(Ze&&a.mode&1){var b=Pw(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Ow(b,o,a,i,t),Ov(Ha(l,a));break e}}i=l=Ha(l,a),Tt!==4&&(Tt=2),tc===null?tc=[i]:tc.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=RE(i,l,t);Ew(i,x);break e;case 1:a=l;var v=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(oi===null||!oi.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=NE(i,a,t);Ew(i,S);break e}}i=i.return}while(i!==null)}YE(n)}catch(k){t=k,xt===n&&n!==null&&(xt=n=n.return);continue}break}while(!0)}function KE(){var e=uh.current;return uh.current=ch,e===null?ch:e}function Zv(){(Tt===0||Tt===3||Tt===2)&&(Tt=4),Nt===null||!(yo&268435455)&&!(hf&268435455)||$s(Nt,$t)}function fh(e,t){var n=Re;Re|=2;var r=KE();(Nt!==e||$t!==t)&&(ss=null,lo(e,t));do try{mI();break}catch(s){qE(e,s)}while(!0);if(Dv(),Re=n,uh.current=r,xt!==null)throw Error(B(261));return Nt=null,$t=0,Tt}function mI(){for(;xt!==null;)GE(xt)}function gI(){for(;xt!==null&&!UO();)GE(xt)}function GE(e){var t=JE(e.alternate,e,vn);e.memoizedProps=e.pendingProps,t===null?YE(e):xt=t,Gv.current=null}function YE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=cI(n,t),n!==null){n.flags&=32767,xt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Tt=6,xt=null;return}}else if(n=lI(n,t,vn),n!==null){xt=n;return}if(t=t.sibling,t!==null){xt=t;return}xt=t=e}while(t!==null);Tt===0&&(Tt=5)}function Fi(e,t,n){var r=Fe,s=Vn.transition;try{Vn.transition=null,Fe=1,yI(e,t,n,r)}finally{Vn.transition=s,Fe=r}return null}function yI(e,t,n,r){do ba();while(Js!==null);if(Re&6)throw Error(B(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(B(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(JO(e,i),e===Nt&&(xt=Nt=null,$t=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fu||(Fu=!0,QE(Gd,function(){return ba(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Vn.transition,Vn.transition=null;var o=Fe;Fe=1;var a=Re;Re|=4,Gv.current=null,dI(e,n),zE(n,e),M2(ng),Xd=!!tg,ng=tg=null,e.current=n,hI(n),BO(),Re=a,Fe=o,Vn.transition=i}else e.current=n;if(Fu&&(Fu=!1,Js=e,hh=s),i=e.pendingLanes,i===0&&(oi=null),HO(n.stateNode),mn(e,ut()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(dh)throw dh=!1,e=Sg,Sg=null,e;return hh&1&&e.tag!==0&&ba(),i=e.pendingLanes,i&1?e===kg?nc++:(nc=0,kg=e):nc=0,Ei(),null}function ba(){if(Js!==null){var e=R_(hh),t=Vn.transition,n=Fe;try{if(Vn.transition=null,Fe=16>e?16:e,Js===null)var r=!1;else{if(e=Js,Js=null,hh=0,Re&6)throw Error(B(331));var s=Re;for(Re|=4,ee=e.current;ee!==null;){var i=ee,o=i.child;if(ee.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(ee=u;ee!==null;){var d=ee;switch(d.tag){case 0:case 11:case 15:ec(8,d,i)}var h=d.child;if(h!==null)h.return=d,ee=h;else for(;ee!==null;){d=ee;var f=d.sibling,p=d.return;if(VE(d),d===u){ee=null;break}if(f!==null){f.return=p,ee=f;break}ee=p}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}ee=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,ee=o;else e:for(;ee!==null;){if(i=ee,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ec(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,ee=x;break e}ee=i.return}}var v=e.current;for(ee=v;ee!==null;){o=ee;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,ee=w;else e:for(o=v;ee!==null;){if(a=ee,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:df(9,a)}}catch(k){lt(a,a.return,k)}if(a===o){ee=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,ee=S;break e}ee=a.return}}if(Re=s,Ei(),Ur&&typeof Ur.onPostCommitFiberRoot=="function")try{Ur.onPostCommitFiberRoot(nf,e)}catch{}r=!0}return r}finally{Fe=n,Vn.transition=t}}return!1}function qw(e,t,n){t=Ha(n,t),t=RE(e,t,1),e=ii(e,t,1),t=en(),e!==null&&(nu(e,1,t),mn(e,t))}function lt(e,t,n){if(e.tag===3)qw(e,e,n);else for(;t!==null;){if(t.tag===3){qw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(oi===null||!oi.has(r))){e=Ha(n,e),e=NE(t,e,1),t=ii(t,e,1),e=en(),t!==null&&(nu(t,1,e),mn(t,e));break}}t=t.return}}function vI(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=en(),e.pingedLanes|=e.suspendedLanes&n,Nt===e&&($t&n)===n&&(Tt===4||Tt===3&&($t&130023424)===$t&&500>ut()-Xv?lo(e,0):Yv|=n),mn(e,t)}function XE(e,t){t===0&&(e.mode&1?(t=ju,ju<<=1,!(ju&130023424)&&(ju=4194304)):t=1);var n=en();e=ms(e,t),e!==null&&(nu(e,t,n),mn(e,n))}function xI(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),XE(e,n)}function wI(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(B(314))}r!==null&&r.delete(t),XE(e,n)}var JE;JE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fn.current)hn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return hn=!1,aI(e,t,n);hn=!!(e.flags&131072)}else hn=!1,Ze&&t.flags&1048576&&tE(t,rh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Sd(e,t),e=t.pendingProps;var s=Ua(t,qt.current);wa(t,n),s=zv(null,t,r,e,s,n);var i=Wv();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pn(r)?(i=!0,th(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Fv(t),s.updater=uf,t.stateNode=s,s._reactInternals=t,dg(t,r,e,n),t=pg(null,t,r,!0,i,n)):(t.tag=0,Ze&&i&&Av(t),Xt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Sd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=SI(r),e=ir(r,e),s){case 0:t=fg(null,t,r,e,n);break e;case 1:t=Lw(null,t,r,e,n);break e;case 11:t=Iw(null,t,r,e,n);break e;case 14:t=Dw(null,t,r,ir(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ir(r,s),fg(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ir(r,s),Lw(e,t,r,s,n);case 3:e:{if(IE(t),e===null)throw Error(B(387));
vendor: 4,729 bytes, line 40
40r=t.pendingProps,i=t.memoizedState,s=i.element,aE(e,t),oh(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ha(Error(B(423)),t),t=Mw(e,t,r,n,s);break e}else if(r!==s){s=Ha(Error(B(424)),t),t=Mw(e,t,r,n,s);break e}else for(Sn=si(t.stateNode.containerInfo.firstChild),kn=t,Ze=!0,ur=null,n=iE(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ba(),r===s){t=gs(e,t,n);break e}Xt(e,t,r,n)}t=t.child}return t;case 5:return lE(t),e===null&&lg(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,rg(r,s)?o=null:i!==null&&rg(r,i)&&(t.flags|=32),OE(e,t),Xt(e,t,o,n),t.child;case 6:return e===null&&lg(t),null;case 13:return DE(e,t,n);case 4:return $v(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=za(t,null,r,n):Xt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ir(r,s),Iw(e,t,r,s,n);case 7:return Xt(e,t,t.pendingProps,n),t.child;case 8:return Xt(e,t,t.pendingProps.children,n),t.child;case 12:return Xt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,qe(sh,r._currentValue),r._currentValue=o,i!==null)if(vr(i.value,o)){if(i.children===s.children&&!fn.current){t=gs(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=hs(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),cg(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(B(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),cg(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Xt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,wa(t,n),s=Bn(s),r=r(s),t.flags|=1,Xt(e,t,r,n),t.child;case 14:return r=t.type,s=ir(r,t.pendingProps),s=ir(r.type,s),Dw(e,t,r,s,n);case 15:return AE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ir(r,s),Sd(e,t),t.tag=1,pn(r)?(e=!0,th(t)):e=!1,wa(t,n),jE(t,r,s),dg(t,r,s,n),pg(null,t,r,!0,e,n);case 19:return LE(e,t,n);case 22:return PE(e,t,n)}throw Error(B(156,t.tag))};function QE(e,t){return E_(e,t)}function bI(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fn(e,t,n,r){return new bI(e,t,n,r)}function ex(e){return e=e.prototype,!(!e||!e.isReactComponent)}function SI(e){if(typeof e=="function")return ex(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xv)return 11;if(e===wv)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Fn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ed(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")ex(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ta:return co(n.children,s,i,t);case vv:o=8,s|=8;break;case Dm:return e=Fn(12,n,t,s|2),e.elementType=Dm,e.lanes=i,e;case Lm:return e=Fn(13,n,t,s),e.elementType=Lm,e.lanes=i,e;case Mm:return e=Fn(19,n,t,s),e.elementType=Mm,e.lanes=i,e;case l_:return ff(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o_:o=10;break e;case a_:o=9;break e;case xv:o=11;break e;case wv:o=14;break e;case Ds:o=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=Fn(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function co(e,t,n,r){return e=Fn(7,e,r,t),e.lanes=n,e}function ff(e,t,n,r){return e=Fn(22,e,r,t),e.elementType=l_,e.lanes=n,e.stateNode={isHidden:!1},e}function $p(e,t,n){return e=Fn(6,e,null,t),e.lanes=n,e}
vendor: 7,752 bytes, line 40
40function Vp(e,t,n){return t=Fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kI(e,t,n,r,s){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=wp(0),this.expirationTimes=wp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wp(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function tx(e,t,n,r,s,i,o,a,l){return e=new kI(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Fn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fv(i),e}function _I(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ea,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ZE(e){if(!e)return pi;e=e._reactInternals;e:{if(No(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if(pn(n))return Z_(e,n,t)}return t}function eT(e,t,n,r,s,i,o,a,l){return e=tx(n,r,!0,e,s,i,o,a,l),e.context=ZE(null),n=e.current,r=en(),s=ai(n),i=hs(r,s),i.callback=t??null,ii(n,i,s),e.current.lanes=s,nu(e,s,r),mn(e,r),e}function pf(e,t,n,r){var s=t.current,i=en(),o=ai(s);return n=ZE(n),t.context===null?t.context=n:t.pendingContext=n,t=hs(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ii(s,t,o),e!==null&&(gr(e,s,o,i),xd(e,s,o)),o}function ph(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Kw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function nx(e,t){Kw(e,t),(e=e.alternate)&&Kw(e,t)}function EI(){return null}var tT=typeof reportError=="function"?reportError:function(e){console.error(e)};function rx(e){this._internalRoot=e}mf.prototype.render=rx.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));pf(e,t,null,null)};mf.prototype.unmount=rx.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vo(function(){pf(null,e,null,null)}),t[ps]=null}};function mf(e){this._internalRoot=e}mf.prototype.unstable_scheduleHydration=function(e){if(e){var t=P_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fs.length&&t!==0&&t<Fs[n].priority;n++);Fs.splice(n,0,e),n===0&&I_(e)}};function sx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gw(){}function TI(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=ph(o);i.call(u)}}var o=eT(t,r,e,0,null,!1,!1,"",Gw);return e._reactRootContainer=o,e[ps]=o.current,bc(e.nodeType===8?e.parentNode:e),vo(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=ph(l);a.call(u)}}var l=tx(e,0,!1,null,null,!1,!1,"",Gw);return e._reactRootContainer=l,e[ps]=l.current,bc(e.nodeType===8?e.parentNode:e),vo(function(){pf(t,l,n,r)}),l}function yf(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=ph(o);a.call(l)}}pf(t,o,e,s)}else o=TI(n,t,e,s,r);return ph(o)}N_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ml(t.pendingLanes);n!==0&&(kv(t,n|1),mn(t,ut()),!(Re&6)&&(qa=ut()+500,Ei()))}break;case 13:vo(function(){var r=ms(e,1);if(r!==null){var s=en();gr(r,e,1,s)}}),nx(e,1)}};_v=function(e){if(e.tag===13){var t=ms(e,134217728);if(t!==null){var n=en();gr(t,e,134217728,n)}nx(e,134217728)}};A_=function(e){if(e.tag===13){var t=ai(e),n=ms(e,t);if(n!==null){var r=en();gr(n,e,t,r)}nx(e,t)}};P_=function(){return Fe};O_=function(e,t){var n=Fe;try{return Fe=e,t()}finally{Fe=n}};Km=function(e,t,n){switch(t){case"input":if(Vm(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=af(r);if(!s)throw Error(B(90));u_(r),Vm(r,s)}}}break;case"textarea":h_(e,n);break;case"select":t=n.value,t!=null&&ga(e,!!n.multiple,t,!1)}};x_=Jv;w_=vo;var CI={usingClientEntryPoint:!1,Events:[su,ia,af,y_,v_,Jv]},_l={findFiberByHostInstance:Wi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jI={bundleType:_l.bundleType,version:_l.version,rendererPackageName:_l.rendererPackageName,rendererConfig:_l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ws.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=k_(e),e===null?null:e.stateNode},findFiberByHostInstance:_l.findFiberByHostInstance||EI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{nf=$u.inject(jI),Ur=$u}catch{}}Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CI;Cn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sx(t))throw Error(B(200));return _I(e,t,null,n)};Cn.createRoot=function(e,t){if(!sx(e))throw Error(B(299));var n=!1,r="",s=tT;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=tx(e,1,!1,null,null,n,!1,r,s),e[ps]=t.current,bc(e.nodeType===8?e.parentNode:e),new rx(t)};Cn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=k_(t),e=e===null?null:e.stateNode,e};Cn.flushSync=function(e){return vo(e)};Cn.hydrate=function(e,t,n){if(!gf(t))throw Error(B(200));return yf(null,e,t,!0,n)};Cn.hydrateRoot=function(e,t,n){if(!sx(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=tT;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=eT(t,null,e,1,n??null,s,!1,i,o),e[ps]=t.current,bc(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new mf(t)};Cn.render=function(e,t,n){if(!gf(t))throw Error(B(200));return yf(null,e,t,!1,n)};Cn.unmountComponentAtNode=function(e){if(!gf(e))throw Error(B(40));return e._reactRootContainer?(vo(function(){yf(null,null,e,!1,function(){e._reactRootContainer=null,e[ps]=null})}),!0):!1};Cn.unstable_batchedUpdates=Jv;Cn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!gf(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return yf(e,t,n,!1,r)};Cn.version="18.3.1-next-f1338f8080-20240426";
40function nT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nT)}catch(e){console.error(e)}}nT(),n_.exports=Cn;var Ao=n_.exports;const rT=jo(Ao);var sT,Yw=Ao;sT=Yw.createRoot,Yw.hydrateRoot;var RI=typeof Element<"u",NI=typeof Map=="function",AI=typeof Set=="function",PI=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Td(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Td(e[r],t[r]))return!1;return!0}var i;if(NI&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Td(r.value[1],t.get(r.value[0])))return!1;return!0}if(AI&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(PI&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(RI&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!Td(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var OI=function(t,n){try{return Td(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const II=jo(OI);var DI=function(e,t,n,r,s,i,o,a){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,s,i,o,a],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},LI=DI;const Xw=jo(LI);var MI=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var o=Object.keys(t),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),u=0;u<o.length;u++){var d=o[u];if(!l(d))return!1;var h=t[d],f=n[d];if(i=r?r.call(s,h,f,d):void 0,i===!1||i===void 0&&h!==f)return!1}return!0};const FI=jo(MI);var iT=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(iT||{}),Up={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Jw=Object.values(iT),vf={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},oT=Object.entries(vf).reduce((e,[t,n])=>(e[n]=t,e),{}),pr="data-rh",Sa={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},ka=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},$I=e=>{let t=ka(e,"title");const n=ka(e,Sa.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=ka(e,Sa.DEFAULT_TITLE);return t||r||void 0},VI=e=>ka(e,Sa.ON_CHANGE_CLIENT_STATE)||(()=>{}),Bp=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),UI=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),BI=e=>console&&typeof console.warn=="function"&&console.warn(e),El=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&BI(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const o={};i.filter(l=>{let u;const d=Object.keys(l);for(let f=0;f<d.length;f+=1){const p=d[f],y=p.toLowerCase();t.indexOf(y)!==-1&&!(u==="rel"&&l[u].toLowerCase()==="canonical")&&!(y==="rel"&&l[y].toLowerCase()==="stylesheet")&&(u=y),t.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(u=p)}if(!u||!l[u])return!1;const h=l[u].toLowerCase();return r[u]||(r[u]={}),o[u]||(o[u]={}),r[u][h]?!1:(o[u][h]=!0,!0)}
40).reverse().forEach(l=>s.push(l));const a=Object.keys(o);for(let l=0;l<a.length;l+=1){const u=a[l],d={...r[u],...o[u]};r[u]=d}return s},[]).reverse()},zI=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},WI=e=>({baseTag:UI(["href"],e),bodyAttributes:Bp("bodyAttributes",e),defer:ka(e,Sa.DEFER),encode:ka(e,Sa.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Bp("htmlAttributes",e),linkTags:El("link",["rel","href"],e),metaTags:El("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:El("noscript",["innerHTML"],e),onChangeClientState:VI(e),scriptTags:El("script",["src","innerHTML"],e),styleTags:El("style",["cssText"],e),title:$I(e),titleAttributes:Bp("titleAttributes",e),prioritizeSeoTags:zI(e,Sa.PRIORITIZE_SEO_TAGS)}),aT=e=>Array.isArray(e)?e.join(""):e,HI=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},zp=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(HI(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},Qw=(e,t)=>({...e,[t]:void 0}),qI=["noscript","script","style"],Tg=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),lT=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),KI=(e,t,n,r)=>{const s=lT(n),i=aT(t);return s?`<${e} ${pr}="true" ${s}>${Tg(i,r)}</${e}>`:`<${e} ${pr}="true">${Tg(i,r)}</${e}>`},GI=(e,t,n=!0)=>t.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof i[d]>"u"?d:`${d}="${Tg(i[d],n)}"`;return u?`${u} ${h}`:h},""),a=i.innerHTML||i.cssText||"",l=qI.indexOf(e)===-1;return`${r}<${e} ${pr}="true" ${o}${l?"/>":`>${a}</${e}>`}`},""),cT=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=vf[r];return n[s||r]=e[r],n},t),YI=(e,t,n)=>{const r={key:t,[pr]:!0},s=cT(n,r);return[O.createElement("title",s,t)]},Cd=(e,t)=>t.map((n,r)=>{const s={key:r,[pr]:!0};return Object.keys(n).forEach(i=>{const a=vf[i]||i;if(a==="innerHTML"||a==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=n[i]}),O.createElement(e,s)}),Pn=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>YI(e,t.title,t.titleAttributes),toString:()=>KI(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>cT(t),toString:()=>lT(t)};default:return{toComponent:()=>Cd(e,t),toString:()=>GI(e,t,n)}}},XI=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=zp(e,Up.meta),i=zp(t,Up.link),o=zp(n,Up.script);return{priorityMethods:{toComponent:()=>[...Cd("meta",s.priority),...Cd("link",i.priority),...Cd("script",o.priority)],toString:()=>`${Pn("meta",s.priority,r)} ${Pn("link",i.priority,r)} ${Pn("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},JI=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:f}=e,p={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:p,linkTags:d,metaTags:h,scriptTags:f}=XI(e)),{priority:p,base:Pn("base",t,r),bodyAttributes:Pn("bodyAttributes",n,r),htmlAttributes:Pn("htmlAttributes",s,r),link:Pn("link",d,r),meta:Pn("meta",h,r),noscript:Pn("noscript",i,r),script:Pn("script",f,r),style:Pn("style",o,r),title:Pn("title",{title:a,titleAttributes:l},r)}},Cg=JI,Vu=[],ix=!!(typeof window<"u"&&window.document&&window.document.createElement),jg=class{constructor(e,t){Zr(this,"instances",[]);Zr(this,"canUseDOM",ix);Zr(this,"context");Zr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Vu:this.instances,add:e=>{(this.canUseDOM?Vu:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Vu:this.instances).indexOf(e);(this.canUseDOM?Vu:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Cg({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},QI=parseInt(O.version.split(".")[0],10),Rg=QI>=19,ZI={},uT=O.createContext(ZI),Qi,dT=(Qi=class extends m.Component{constructor(n){super(n);Zr(this,"helmetData");Rg?this.helmetData=null:this.helmetData=new jg(this.props.context||{},Qi.canUseDOM)}render(){return Rg?O.createElement(O.Fragment,null,this.props.children):O.createElement(uT.Provider,{value:this.helmetData.value},this.props.children)}},Zr(Qi,"canUseDOM",ix),Qi),Do=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${pr}]`),s=[].slice.call(r),i=[];let o;return t&&t.length&&t.forEach(a=>{const l=document.createElement(e);for(const u in a)if(Object.prototype.hasOwnProperty.call(a,u))if(u==="innerHTML")l.innerHTML=a.innerHTML;else if(u==="cssText"){const d=a.cssText;
40l.appendChild(document.createTextNode(d))}else{const d=u,h=typeof a[d]>"u"?"":a[d];l.setAttribute(u,h)}l.setAttribute(pr,"true"),s.some((u,d)=>(o=d,l.isEqualNode(u)))?s.splice(o,1):i.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},Ng=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(pr),s=r?r.split(","):[],i=[...s],o=Object.keys(t);for(const a of o){const l=t[a]||"";n.getAttribute(a)!==l&&n.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const u=i.indexOf(a);u!==-1&&i.splice(u,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(pr):n.getAttribute(pr)!==o.join(",")&&n.setAttribute(pr,o.join(","))},eD=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=aT(e)),Ng("title",t)},Zw=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:u,styleTags:d,title:h,titleAttributes:f}=e;Ng("body",r),Ng("html",s),eD(h,f);const p={baseTag:Do("base",n),linkTags:Do("link",i),metaTags:Do("meta",o),noscriptTags:Do("noscript",a),scriptTags:Do("script",u),styleTags:Do("style",d)},y={},g={};Object.keys(p).forEach(b=>{const{newTags:x,oldTags:v}=p[b];x.length&&(y[b]=x),v.length&&(g[b]=p[b].oldTags)}),t&&t(),l(e,y,g)},Tl=null,tD=e=>{Tl&&cancelAnimationFrame(Tl),e.defer?Tl=requestAnimationFrame(()=>{Zw(e,()=>{Tl=null})}):(Zw(e),Tl=null)},nD=tD,eb=class extends m.Component{constructor(){super(...arguments);Zr(this,"rendered",!1)}shouldComponentUpdate(t){return!FI(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=WI(t.get().map(i=>{const{context:o,...a}=i.props;return a}));dT.canUseDOM?nD(s):Cg&&(r=Cg(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},jd=[],tb=e=>{const t={};for(const n of Object.keys(e))t[oT[n]||n]=e[n];return t},Oi=e=>{const t={};for(const n of Object.keys(e)){const r=vf[n];t[r||n]=e[n]}return t},nb=(e,t)=>{if(!ix)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],o=Object.keys(t);for(const a of i)o.includes(a)||n.removeAttribute(a);for(const a of o){const l=t[a];l==null||l===!1?n.removeAttribute(a):l===!0?n.setAttribute(a,""):n.setAttribute(a,String(l))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},Wp=()=>{const e={},t={};for(const n of jd){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(e,tb(r)),s&&Object.assign(t,tb(s))}nb("html",e),nb("body",t)},rD=class extends m.Component{componentDidMount(){jd.push(this),Wp()}componentDidUpdate(){Wp()}componentWillUnmount(){const e=jd.indexOf(this);e!==-1&&jd.splice(e,1),Wp()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return O.createElement("title",Oi(t),e)}renderBase(){const{base:e}=this.props;return e?O.createElement("base",Oi(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>O.createElement("meta",{key:n,...Oi(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>O.createElement("link",{key:n,...Oi(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=Oi(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),O.createElement("script",{key:n,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...s}=t,i=Oi(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),O.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=Oi(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),O.createElement("noscript",{key:n,...i})})}render(){return O.createElement(O.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Om,sD=(Om=class extends m.Component{shouldComponentUpdate(e){return!II(Qw(this.props,"helmetData"),Qw(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
40warnOnInvalidChildren(e,t){return Xw(Jw.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Jw.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Xw(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return O.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((l,u)=>(l[oT[u]||u]=i[u],l),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:t=this.mapObjectTypeChildren(r,t,o,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof jg)){const s=r;r=new jg(s.context,!0),delete n.helmetData}return Rg?O.createElement(rD,{...n}):r?O.createElement(eb,{...n,context:r.value}):O.createElement(uT.Consumer,null,s=>O.createElement(eb,{...n,context:s}))}},Zr(Om,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Om);const iD=1,oD=1e6;let Hp=0;function aD(){return Hp=(Hp+1)%Number.MAX_SAFE_INTEGER,Hp.toString()}const qp=new Map,rb=e=>{if(qp.has(e))return;const t=setTimeout(()=>{qp.delete(e),rc({type:"REMOVE_TOAST",toastId:e})},oD);qp.set(e,t)},lD=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,iD)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?rb(n):e.toasts.forEach(r=>{rb(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Rd=[];let Nd={toasts:[]};function rc(e){Nd=lD(Nd,e),Rd.forEach(t=>{t(Nd)})}function cD({...e}){const t=aD(),n=s=>rc({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>rc({type:"DISMISS_TOAST",toastId:t});return rc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function uD(){const[e,t]=m.useState(Nd);return m.useEffect(()=>(Rd.push(t),()=>{const n=Rd.indexOf(t);n>-1&&Rd.splice(n,1)}),[e]),{...e,toast:cD,dismiss:n=>rc({type:"DISMISS_TOAST",toastId:n})}}function le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function sb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function hT(...e){return t=>{let n=!1;const r=e.map(s=>{const i=sb(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():sb(e[s],null)}}}}function be(...e){return m.useCallback(hT(...e),e)}function dD(e,t){const n=m.createContext(t),r=i=>{const{children:o,...a}=i,l=m.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function s(i){const o=m.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function br(e,t=[]){let n=[];function r(i,o){const a=m.createContext(o),l=n.length;n=[...n,o];const u=h=>{var x;const{scope:f,children:p,...y}=h,g=((x=f==null?void 0:f[e])==null?void 0:x[l])||a,b=m.useMemo(()=>y,Object.values(y));return c.jsx(g.Provider,{value:b,children:p})};u.displayName=i+"Provider";function d(h,f){var g;const p=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,y=m.useContext(p);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,hD(s,...t)]}function hD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Ka(e){const t=fD(e),n=m.forwardRef((r,s)=>{const{children:i,...o}=r,a=m.Children.toArray(i),l=a.find(mD);if(l){const u=l.props.children,d=a.map(h=>h===l?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...o,ref:s,children:m.isValidElement(u)?m.cloneElement(u,void 0,d):null})}return c.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var fT=Ka("Slot");function fD(e){const t=m.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 9,982 bytes, line 40
40if(m.isValidElement(s)){const o=yD(s),a=gD(i,s.props);return s.type!==m.Fragment&&(a.ref=r?hT(r,o):o),m.cloneElement(s,a)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pT=Symbol("radix.slottable");function pD(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=pT,t}function mD(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pT}function gD(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function yD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ox(e){const t=e+"CollectionProvider",[n,r]=br(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:b,children:x}=g,v=O.useRef(null),w=O.useRef(new Map).current;return c.jsx(s,{scope:b,itemMap:w,collectionRef:v,children:x})};o.displayName=t;const a=e+"CollectionSlot",l=Ka(a),u=O.forwardRef((g,b)=>{const{scope:x,children:v}=g,w=i(a,x),S=be(b,w.collectionRef);return c.jsx(l,{ref:S,children:v})});u.displayName=a;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=Ka(d),p=O.forwardRef((g,b)=>{const{scope:x,children:v,...w}=g,S=O.useRef(null),k=be(b,S),_=i(d,x);return O.useEffect(()=>(_.itemMap.set(S,{ref:S,...w}),()=>void _.itemMap.delete(S))),c.jsx(f,{[h]:"",ref:k,children:v})});p.displayName=d;function y(g){const b=i(e+"CollectionConsumer",g);return O.useCallback(()=>{const v=b.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((_,E)=>w.indexOf(_.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},y,r]}var vD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fe=vD.reduce((e,t)=>{const n=Ka(`Primitive.${t}`),r=m.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mT(e,t){e&&Ao.flushSync(()=>e.dispatchEvent(t))}function Et(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function xD(e,t=globalThis==null?void 0:globalThis.document){const n=Et(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var wD="DismissableLayer",Ag="dismissableLayer.update",bD="dismissableLayer.pointerDownOutside",SD="dismissableLayer.focusOutside",ib,gT=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ou=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=m.useContext(gT),[d,h]=m.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=m.useState({}),y=be(t,E=>h(E)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),v=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=x,k=_D(E=>{const C=E.target,N=[...u.branches].some(R=>R.contains(C));!S||N||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),_=ED(E=>{const C=E.target;[...u.branches].some(R=>R.contains(C))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return xD(E=>{v===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ib=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ob(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ib)}},[d,f,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ob())},[d,u]),m.useEffect(()=>{const E=()=>p({});return document.addEventListener(Ag,E),()=>document.removeEventListener(Ag,E)},[]),c.jsx(fe.div,{...l,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,_.onFocusCapture),onBlurCapture:le(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,k.onPointerDownCapture)})});ou.displayName=wD;var kD="DismissableLayerBranch",yT=m.forwardRef((e,t)=>{const n=m.useContext(gT),r=m.useRef(null),s=be(t,r);return m.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),c.jsx(fe.div,{...e,ref:s})});yT.displayName=kD;function _D(e,t=globalThis==null?void 0:globalThis.document){const n=Et(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){vT(bD,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ED(e,t=globalThis==null?void 0:globalThis.document){const n=Et(e),r=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!r.current&&vT(SD,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ob(){const e=new CustomEvent(Ag);document.dispatchEvent(e)}function vT(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?mT(s,i):s.dispatchEvent(i)}var TD=ou,CD=yT,At=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},jD="Portal",xf=m.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=m.useState(!1);At(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?rT.createPortal(c.jsx(fe.div,{...r,ref:t}),o):null});xf.displayName=jD;function RD(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var Wn=e=>{const{present:t,children:n}=e,r=ND(t),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),i=be(r.ref,AD(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:i}):null};Wn.displayName="Presence";function ND(e){const[t,n]=m.useState(),r=m.useRef(null),s=m.useRef(e),i=m.useRef("none"),o=e?"mounted":"unmounted",[a,l]=RD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Uu(r.current);i.current=a==="mounted"?u:"none"},[a]),At(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,p=Uu(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),At(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=p=>{const g=Uu(r.current).includes(p.animationName);if(p.target===t&&g&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(i.current=Uu(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Uu(e){return(e==null?void 0:e.animationName)||"none"}function AD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var PD=pv[" useInsertionEffect ".trim().toString()]||At;function xo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=OD({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s;{const d=m.useRef(e!==void 0);m.useEffect(()=>{const h=d.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=m.useCallback(d=>{var h;if(a){const f=ID(d)?d(e):d;f!==e&&((h=o.current)==null||h.call(o,f))}else i(d)},[a,e,i,o]);return[l,u]}function OD({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),i=m.useRef(t);return PD(()=>{i.current=t},[t]),m.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function ID(e){return typeof e=="function"}var xT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),DD="VisuallyHidden",wf=m.forwardRef((e,t)=>
40c.jsx(fe.span,{...e,ref:t,style:{...xT,...e.style}}));wf.displayName=DD;var LD=wf,ax="ToastProvider",[lx,MD,FD]=ox("Toast"),[wT,IG]=br("Toast",[FD]),[$D,bf]=wT(ax),bT=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=m.useState(null),[u,d]=m.useState(0),h=m.useRef(!1),f=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ax}\`. Expected non-empty \`string\`.`),c.jsx(lx.Provider,{scope:t,children:c.jsx($D,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:m.useCallback(()=>d(p=>p+1),[]),onToastRemove:m.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};bT.displayName=ax;var ST="ToastViewport",VD=["F8"],Pg="toast.viewportPause",Og="toast.viewportResume",kT=m.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=VD,label:s="Notifications ({hotkey})",...i}=e,o=bf(ST,n),a=MD(n),l=m.useRef(null),u=m.useRef(null),d=m.useRef(null),h=m.useRef(null),f=be(t,h,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;m.useEffect(()=>{const b=x=>{var w;r.length!==0&&r.every(S=>x[S]||x.code===S)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),m.useEffect(()=>{const b=l.current,x=h.current;if(y&&b&&x){const v=()=>{if(!o.isClosePausedRef.current){const _=new CustomEvent(Pg);x.dispatchEvent(_),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const _=new CustomEvent(Og);x.dispatchEvent(_),o.isClosePausedRef.current=!1}},S=_=>{!b.contains(_.relatedTarget)&&w()},k=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",v),b.addEventListener("focusout",S),b.addEventListener("pointermove",v),b.addEventListener("pointerleave",k),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",v),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",v),b.removeEventListener("pointerleave",k),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[y,o.isClosePausedRef]);const g=m.useCallback(({tabbingDirection:b})=>{const v=a().map(w=>{const S=w.ref.current,k=[S,...ZD(S)];return b==="forwards"?k:k.reverse()});return(b==="forwards"?v.reverse():v).flat()},[a]);return m.useEffect(()=>{const b=h.current;if(b){const x=v=>{var k,_,E;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const C=document.activeElement,N=v.shiftKey;if(v.target===b&&N){(k=u.current)==null||k.focus();return}const D=g({tabbingDirection:N?"backwards":"forwards"}),U=D.findIndex(F=>F===C);Kp(D.slice(U+1))?v.preventDefault():N?(_=u.current)==null||_.focus():(E=d.current)==null||E.focus()}};return b.addEventListener("keydown",x),()=>b.removeEventListener("keydown",x)}},[a,g]),c.jsxs(CD,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&c.jsx(Ig,{ref:u,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"forwards"});Kp(b)}}),c.jsx(lx.Slot,{scope:n,children:c.jsx(fe.ol,{tabIndex:-1,...i,ref:f})}),y&&c.jsx(Ig,{ref:d,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"backwards"});Kp(b)}})]})});kT.displayName=ST;var _T="ToastFocusProxy",Ig=m.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=bf(_T,n);return c.jsx(wf,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});Ig.displayName=_T;var au="Toast",UD="toast.swipeStart",BD="toast.swipeMove",zD="toast.swipeCancel",WD="toast.swipeEnd",ET=m.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=xo({prop:r,defaultProp:s??!0,onChange:i,caller:au});return c.jsx(Wn,{present:n||a,children:c.jsx(KD,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Et(e.onPause),onResume:Et(e.onResume),onSwipeStart:le(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:le(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:le(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});ET.displayName=au;var[HD,qD]=wT(au,{onClose(){}}),KD=m.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:p,...y}=e,g=bf(au,n),[b,x]=m.useState(null),v=be(t,F=>x(F)),w=m.useRef(null),S=m.useRef(null),k=s||g.duration,_=m.useRef(0),E=m.useRef(k),C=m.useRef(0),{onToastAdd:N,onToastRemove:R}=g,$=Et(()=>{var J;(b==null?void 0:b.contains(document.activeElement))&&((J=g.viewport)==null||J.focus()),o()}),D=m.useCallback(F=>{!F||F===1/0||(window.clearTimeout(C.current),_.current=new Date().getTime(),C.current=window.setTimeout($,F))},[$]);m.useEffect(()=>{const F=g.viewport;if(F){const J=()=>{D(E.current),u==null||u()},V=()=>{const ne=new Date().getTime()-_.current;E.current=E.current-ne,window.clearTimeout(C.current),l==null||l()};return F.addEventListener(Pg,V),F.addEventListener(Og,J),()=>{F.removeEventListener(Pg,V),F.removeEventListener(Og,J)}}},[g.viewport,k,l,u,D]),m.useEffect(()=>{i&&!g.isClosePausedRef.current&&D(k)},[i,k,g.isClosePausedRef,D]),m.useEffect(()=>(N(),()=>R()),[N,R]);const U=m.useMemo(()=>b?PT(b):null,[b]);return g.viewport?c.jsxs(c.Fragment,{children:[U&&c.jsx(GD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:U}),c.jsx(HD,{scope:n,onClose:$,children:Ao.createPortal(c.jsx(lx.ItemSlot,{scope:n,children:c.jsx(TD,{asChild:!0,onEscapeKeyDown:le(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||$(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(fe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:le(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:le(e.onPointerDown,F=>{F.button===0&&(w.current={x:F.clientX,y:F.clientY})}),onPointerMove:le(e.onPointerMove,F=>{if(!w.current)return;const J=F.clientX-w.current.x,V=F.clientY-w.current.y,ne=!!S.current,P=["left","right"].includes(g.swipeDirection),L=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,W=P?L(0,J):0,ce=P?0:L(0,V),oe=F.pointerType==="touch"?10:2,me={x:W,y:ce},pe={originalEvent:F,delta:me};ne?(S.current=me,Bu(BD,h,pe,{discrete:!1})):ab(me,g.swipeDirection,oe)?(S.current=me,Bu(UD,d,pe,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(J)>oe||Math.abs(V)>oe)&&(w.current=null)}),onPointerUp:le(e.onPointerUp,F=>{const J=S.current,V=F.target;if(V.hasPointerCapture(F.pointerId)&&V.releasePointerCapture(F.pointerId),S.current=null,w.current=null,J){const ne=F.currentTarget,P={originalEvent:F,delta:J};ab(J,g.swipeDirection,g.swipeThreshold)?Bu(WD,p,P,{discrete:!0}):Bu(zD,f,P,{discrete:!0}),ne.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),GD=e=>{const{__scopeToast:t,children:n,...r}=e,s=bf(au,t),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return JD(()=>o(!0)),m.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(xf,{asChild:!0,children:c.jsx(wf,{...r,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",n]})})})},YD="ToastTitle",TT=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(fe.div,{...r,ref:t})});TT.displayName=YD;var XD="ToastDescription",CT=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(fe.div,{...r,ref:t})});CT.displayName=XD;var jT="ToastAction",RT=m.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx(AT,{altText:n,asChild:!0,children:c.jsx(cx,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${jT}\`. Expected non-empty \`string\`.`),null)});RT.displayName=jT;var NT="ToastClose",cx=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=qD(NT,n);return c.jsx(AT,{asChild:!0,children:c.jsx(fe.button,{type:"button",...r,ref:t,onClick:le(e.onClick,s.onClose)})})});cx.displayName=NT;var AT=m.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return c.jsx(fe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function PT(e){const t=[];
vendor: 6,894 bytes, lines 40-110
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),QD(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...PT(r))}}),t}function Bu(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?mT(s,i):s.dispatchEvent(i)}var ab=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function JD(e=()=>{}){const t=Et(e);At(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function QD(e){return e.nodeType===e.ELEMENT_NODE}function ZD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var eL=bT,OT=kT,IT=ET,DT=TT,LT=CT,MT=RT,FT=cx;function $T(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=$T(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function VT(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=$T(e))&&(r&&(r+=" "),r+=t);return r}const lb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cb=VT,lu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return cb(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=lb(d)||lb(h);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...p}=d;return Object.entries(p).every(y=>{let[g,b]=y;return Array.isArray(b)?b.includes({...i,...a}[g]):{...i,...a}[g]===b})?[...u,h,f]:u},[]);return cb(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const tL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),UT=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var nL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const rL=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>m.createElement("svg",{ref:l,...nL,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:UT("lucide",s),...a},[...o.map(([u,d])=>m.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Ie=(e,t)=>{const n=m.forwardRef(({className:r,...s},i)=>m.createElement(rL,{ref:i,iconNode:t,className:UT(`lucide-${tL(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const Ki=Ie("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const sL=Ie("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const ub=Ie("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const BT=Ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const ux=Ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const iL=Ie("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const db=Ie("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const oL=Ie("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const aL=Ie("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const zT=Ie("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
110y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const lL=Ie("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const cL=Ie("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const uL=Ie("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const dL=Ie("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const hL=Ie("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const mh=Ie("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const fL=Ie("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const pL=Ie("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const WT=Ie("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const bs=Ie("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const mL=Ie("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const HT=Ie("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const gL=Ie("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
175074z",key:"s0h3yz"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const qT=Ie("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const yL=Ie("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const vL=Ie("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const Dg=Ie("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const xL=Ie("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const wL=Ie("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const wo=Ie("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const Sf=Ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dx="-",bL=e=>{const t=kL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(dx);return a[0]===""&&a.length!==1&&a.shift(),KT(a,t)||SL(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},KT=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?KT(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(dx);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},hb=/^\[(.+)\]$/,SL=e=>{if(hb.test(e)){const t=hb.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},kL=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return EL(Object.entries(e.classGroups),n).forEach(([i,o])=>{Lg(o,r,i,t)}),r},Lg=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:fb(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(_L(s)){Lg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Lg(o,fb(t,i),n,r)})})},fb=(e,t)=>{let n=e;
vendor: 4,203 bytes, line 215
215return t.split(dx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},_L=e=>e.isThemeGetter,EL=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,TL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},GT="!",CL=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,d=0,h;for(let b=0;b<a.length;b++){let x=a[b];if(u===0){if(x===s&&(r||a.slice(b,b+i)===t)){l.push(a.slice(d,b)),d=b+i;continue}if(x==="/"){h=b;continue}}x==="["?u++:x==="]"&&u--}const f=l.length===0?a:a.substring(d),p=f.startsWith(GT),y=p?f.substring(1):f,g=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:y,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},jL=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},RL=e=>({cache:TL(e.cacheSize),parseClassName:CL(e),...bL(e)}),NL=/\s+/,AL=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(NL);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let y=!!p,g=r(y?f.substring(0,p):f);if(!g){if(!y){a=u+(a.length>0?" "+a:a);continue}if(g=r(f),!g){a=u+(a.length>0?" "+a:a);continue}y=!1}const b=jL(d).join(":"),x=h?b+GT:b,v=x+g;if(i.includes(v))continue;i.push(v);const w=s(g,y);for(let S=0;S<w.length;++S){const k=w[S];i.push(x+k)}a=u+(a.length>0?" "+a:a)}return a};function PL(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=YT(t))&&(r&&(r+=" "),r+=n);return r}const YT=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=YT(e[r]))&&(n&&(n+=" "),n+=t);return n};function OL(e,...t){let n,r,s,i=o;function o(l){const u=t.reduce((d,h)=>h(d),e());return n=RL(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=AL(l,n);return s(l,d),d}return function(){return i(PL.apply(null,arguments))}}const Ke=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},XT=/^\[(?:([a-z-]+):)?(.+)\]$/i,IL=/^\d+\/\d+$/,DL=new Set(["px","full","screen"]),LL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ML=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$L=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,es=e=>_a(e)||DL.has(e)||IL.test(e),Cs=e=>al(e,"length",GL),_a=e=>!!e&&!Number.isNaN(Number(e)),Gp=e=>al(e,"number",_a),Cl=e=>!!e&&Number.isInteger(Number(e)),UL=e=>e.endsWith("%")&&_a(e.slice(0,-1)),xe=e=>XT.test(e),js=e=>LL.test(e),BL=new Set(["length","size","percentage"]),zL=e=>al(e,BL,JT),WL=e=>al(e,"position",JT),HL=new Set(["image","url"]),qL=e=>al(e,HL,XL),KL=e=>al(e,"",YL),jl=()=>!0,al=(e,t,n)=>{const r=XT.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},GL=e=>ML.test(e)&&!FL.test(e),JT=()=>!1,YL=e=>$L.test(e),XL=e=>VL.test(e),JL=()=>{const e=Ke("colors"),t=Ke("spacing"),n=Ke("blur"),r=Ke("brightness"),s=Ke("borderColor"),i=Ke("borderRadius"),o=Ke("borderSpacing"),a=Ke("borderWidth"),l=Ke("contrast"),u=Ke("grayscale"),d=Ke("hueRotate"),h=Ke("invert"),f=Ke("gap"),p=Ke("gradientColorStops"),y=Ke("gradientColorStopPositions"),g=Ke("inset"),b=Ke("margin"),x=Ke("opacity"),v=Ke("padding"),w=Ke("saturate"),S=Ke("scale"),k=Ke("sepia"),_=Ke("skew"),E=Ke("space"),C=Ke("translate"),N=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",xe,t],D=()=>[xe,t],U=()=>["",es,Cs],F=()=>["auto",_a,xe],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],
vendor: 10,828 bytes, line 215
215V=()=>["solid","dashed","dotted","double","none"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",xe],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ce=()=>[_a,xe];return{cacheSize:500,separator:":",theme:{colors:[jl],spacing:[es,Cs],blur:["none","",js,xe],brightness:ce(),borderColor:[e],borderRadius:["none","","full",js,xe],borderSpacing:D(),borderWidth:U(),contrast:ce(),grayscale:L(),hueRotate:ce(),invert:L(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[UL,Cs],inset:$(),margin:$(),opacity:ce(),padding:D(),saturate:ce(),scale:ce(),sepia:L(),skew:ce(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[js]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),xe]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cl,xe]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",Cl,xe]}],"grid-cols":[{"grid-cols":[jl]}],"col-start-end":[{col:["auto",{span:["full",Cl,xe]},xe]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[jl]}],"row-start-end":[{row:["auto",{span:[Cl,xe]},xe]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xe,t]}],"min-w":[{"min-w":[xe,t,"min","max","fit"]}],"max-w":[{"max-w":[xe,t,"none","full","min","max","fit","prose",{screen:[js]},js]}],h:[{h:[xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",js,Cs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gp]}],"font-family":[{font:[jl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",_a,Gp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",es,xe]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",es,Cs]}],"underline-offset":[{"underline-offset":["auto",es,xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),WL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[es,xe]}],"outline-w":[{outline:[es,Cs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[es,Cs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",js,KL]}],"shadow-color":[{shadow:[jl]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",js,xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:ce()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:ce()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Cl,xe]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","
215none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[es,Cs,Gp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},QL=OL(JL);function ue(...e){return QL(VT(e))}const ZL=eL,QT=m.forwardRef(({className:e,...t},n)=>c.jsx(OT,{ref:n,className:ue("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));QT.displayName=OT.displayName;const eM=lu("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ZT=m.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(IT,{ref:r,className:ue(eM({variant:t}),e),...n}));ZT.displayName=IT.displayName;const tM=m.forwardRef(({className:e,...t},n)=>c.jsx(MT,{ref:n,className:ue("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));tM.displayName=MT.displayName;const eC=m.forwardRef(({className:e,...t},n)=>c.jsx(FT,{ref:n,className:ue("absolute right-2 top-2 rounded-md p-1 text-foreground
215/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(Sf,{className:"h-4 w-4"})}));eC.displayName=FT.displayName;const tC=m.forwardRef(({className:e,...t},n)=>c.jsx(DT,{ref:n,className:ue("text-sm font-semibold",e),...t}));tC.displayName=DT.displayName;const nC=m.forwardRef(({className:e,...t},n)=>c.jsx(LT,{ref:n,className:ue("text-sm opacity-90",e),...t}));nC.displayName=LT.displayName;function nM(){const{toasts:e}=uD();return c.jsxs(ZL,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return c.jsxs(ZT,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(tC,{children:n}),r&&c.jsx(nC,{children:r})]}),s,c.jsx(eC,{})]},t)}),c.jsx(QT,{})]})}var pb=["light","dark"],rM="(prefers-color-scheme: dark)",sM=m.createContext(void 0),iM={setTheme:e=>{},themes:[]},oM=()=>{var e;return(e=m.useContext(sM))!=null?e:iM};m.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?pb.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,g=!1,b=!0)=>{let x=o?o[y]:y,v=g?y+"|| ''":`'${x}'`,w="";return s&&b&&!g&&pb.includes(y)&&(w+=`d.style.colorScheme = '${y}';`),n==="class"?g||x?w+=`c.add(${v})`:w+="null":x&&(w+=`d[s](n,${v})`),w},p=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${rM}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return m.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var aM=e=>{switch(e){case"success":return uM;case"info":return hM;case"warning":return dM;case"error":return fM;default:return null}},lM=Array(12).fill(0),cM=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},lM.map((n,r)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),uM=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),dM=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hM=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),fM=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),pM=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mM=()=>{let[e,t]=O.useState(document.hidden);return O.useEffect(()=>{let n=()=>{t(document.hidden)};
215return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Mg=1,gM=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Mg++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
215this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],O.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(vM(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Mg++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},cn=new gM,yM=(e,t)=>{let n=(t==null?void 0:t.id)||Mg++;return cn.addToast({title:e,...t,id:n}),n},vM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xM=yM,wM=()=>cn.toasts,bM=()=>cn.getActiveToasts(),zu=Object.assign(xM,{success:cn.success,info:cn.info,warning:cn.warning,error:cn.error,custom:cn.custom,message:cn.message,promise:cn.promise,dismiss:cn.dismiss,loading:cn.loading},{getHistory:wM,getToasts:bM});function SM(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}SM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
215left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
215:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
215--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 216`);function Wu(e){return e.label!==void 0}var kM=3,_M="32px",EM="16px",mb=4e3,TM=356,CM=14,jM=20,RM=200;function Zn(...e){return e.filter(Boolean).join(" ")}function NM(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var AM=e=>{var t,n,r,s,i,o,a,l,u,d,h;let{invert:f,toast:p,unstyled:y,interacting:g,setHeights:b,visibleToasts:x,heights:v,index:w,toasts:S,expanded:k,removeToast:_,defaultRichColors:E,closeButton:C,style:N,cancelButtonStyle:R,actionButtonStyle:$,className:D="",descriptionClassName:U="",duration:F,position:J,gap:V,loadingIcon:ne,expandByDefault:P,classNames:L,icons:W,closeButtonAriaLabel:ce="Close toast",pauseWhenPageIsHidden:oe}=e,[me,pe]=O.useState(null),[Ve,Je]=O.useState(null),[G,Ae]=O.useState(!1),[We,Ee]=O.useState(!1),[ke,Te]=O.useState(!1),[Ct,Kt]=O.useState(!1),[_r,Er]=O.useState(!1),[Yr,Oo]=O.useState(0),[Xr,T]=O.useState(0),A=O.useRef(p.duration||F||mb),M=O.useRef(null),K=O.useRef(null),q=w===0,H=w+1<=x,Z=p.type,_e=p.dismissible!==!1,Ue=p.className||"",rn=p.descriptionClassName||"",Jr=O.useMemo(()=>v.findIndex(ve=>ve.toastId===p.id)||0,[v,p.id]),Tr=O.useMemo(()=>{var ve;return(ve=p.closeButton)!=null?ve:C},[p.closeButton,C]),xu=O.useMemo(()=>p.duration||F||mb,[p.duration,F]),Ai=O.useRef(0),Cr=O.useRef(0),wu=O.useRef(0),Qr=O.useRef(null),[hp,bu]=J.split("-"),F0=O.useMemo(()=>v.reduce((ve,Be,Qe)=>Qe>=Jr?ve:ve+Be.height,0),[v,Jr]),$0=mM(),ZP=p.invert||f,fp=Z==="loading";Cr.current=O.useMemo(()=>Jr*V+F0,[Jr,F0]),O.useEffect(()=>{A.current=xu},[xu]),O.useEffect(()=>{Ae(!0)},[]),O.useEffect(()=>{let ve=K.current;if(ve){let Be=ve.getBoundingClientRect().height;return T(Be),b(Qe=>[{toastId:p.id,height:Be,position:p.position},...Qe]),()=>b(Qe=>Qe.filter(Yn=>Yn.toastId!==p.id))}},[b,p.id]),O.useLayoutEffect(()=>{if(!G)return;let ve=K.current,Be=ve.style.height;ve.style.height="auto";let Qe=ve.getBoundingClientRect().height;ve.style.height=Be,T(Qe),b(Yn=>Yn.find(Xn=>Xn.toastId===p.id)?Yn.map(Xn=>Xn.toastId===p.id?{...Xn,height:Qe}:Xn):[{toastId:p.id,height:Qe,position:p.position},...Yn])},[G,p.title,p.description,b,p.id]);let ks=O.useCallback(()=>{Ee(!0),Oo(Cr.current),b(ve=>ve.filter(Be=>Be.toastId!==p.id)),setTimeout(()=>{_(p)},RM)},[p,_,b,Cr]);O.useEffect(()=>{if(p.promise&&Z==="loading"||p.duration===1/0||p.type==="loading")return;let ve;return k||g||oe&&$0?(()=>{if(wu.current<Ai.current){let Be=new Date().getTime()-Ai.current;A.current=A.current-Be}
216wu.current=new Date().getTime()})():A.current!==1/0&&(Ai.current=new Date().getTime(),ve=setTimeout(()=>{var Be;(Be=p.onAutoClose)==null||Be.call(p,p),ks()},A.current)),()=>clearTimeout(ve)},[k,g,p,Z,oe,$0,ks]),O.useEffect(()=>{p.delete&&ks()},[ks,p.delete]);function eO(){var ve,Be,Qe;return W!=null&&W.loading?O.createElement("div",{className:Zn(L==null?void 0:L.loader,(ve=p==null?void 0:p.classNames)==null?void 0:ve.loader,"sonner-loader"),"data-visible":Z==="loading"},W.loading):ne?O.createElement("div",{className:Zn(L==null?void 0:L.loader,(Be=p==null?void 0:p.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":Z==="loading"},ne):O.createElement(cM,{className:Zn(L==null?void 0:L.loader,(Qe=p==null?void 0:p.classNames)==null?void 0:Qe.loader),visible:Z==="loading"})}return O.createElement("li",{tabIndex:0,ref:K,className:Zn(D,Ue,L==null?void 0:L.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,L==null?void 0:L.default,L==null?void 0:L[Z],(n=p==null?void 0:p.classNames)==null?void 0:n[Z]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":G,"data-promise":!!p.promise,"data-swiped":_r,"data-removed":We,"data-visible":H,"data-y-position":hp,"data-x-position":bu,"data-index":w,"data-front":q,"data-swiping":ke,"data-dismissible":_e,"data-type":Z,"data-invert":ZP,"data-swipe-out":Ct,"data-swipe-direction":Ve,"data-expanded":!!(k||P&&G),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${We?Yr:Cr.current}px`,"--initial-height":P?"auto":`${Xr}px`,...N,...p.style},onDragEnd:()=>{Te(!1),pe(null),Qr.current=null},onPointerDown:ve=>{fp||!_e||(M.current=new Date,Oo(Cr.current),ve.target.setPointerCapture(ve.pointerId),ve.target.tagName!=="BUTTON"&&(Te(!0),Qr.current={x:ve.clientX,y:ve.clientY}))},onPointerUp:()=>{var ve,Be,Qe,Yn;if(Ct||!_e)return;Qr.current=null;let Xn=Number(((ve=K.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_s=Number(((Be=K.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Pi=new Date().getTime()-((Qe=M.current)==null?void 0:Qe.getTime()),Jn=me==="x"?Xn:_s,Es=Math.abs(Jn)/Pi;if(Math.abs(Jn)>=jM||Es>.11){Oo(Cr.current),(Yn=p.onDismiss)==null||Yn.call(p,p),Je(me==="x"?Xn>0?"right":"left":_s>0?"down":"up"),ks(),Kt(!0),Er(!1);return}Te(!1),pe(null)},onPointerMove:ve=>{var Be,Qe,Yn,Xn;if(!Qr.current||!_e||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;let _s=ve.clientY-Qr.current.y,Pi=ve.clientX-Qr.current.x,Jn=(Qe=e.swipeDirections)!=null?Qe:NM(J);!me&&(Math.abs(Pi)>1||Math.abs(_s)>1)&&pe(Math.abs(Pi)>Math.abs(_s)?"x":"y");let Es={x:0,y:0};me==="y"?(Jn.includes("top")||Jn.includes("bottom"))&&(Jn.includes("top")&&_s<0||Jn.includes("bottom")&&_s>0)&&(Es.y=_s):me==="x"&&(Jn.includes("left")||Jn.includes("right"))&&(Jn.includes("left")&&Pi<0||Jn.includes("right")&&Pi>0)&&(Es.x=Pi),(Math.abs(Es.x)>0||Math.abs(Es.y)>0)&&Er(!0),(Yn=K.current)==null||Yn.style.setProperty("--swipe-amount-x",`${Es.x}px`),(Xn=K.current)==null||Xn.style.setProperty("--swipe-amount-y",`${Es.y}px`)}},Tr&&!p.jsx?O.createElement("button",{"aria-label":ce,"data-disabled":fp,"data-close-button":!0,onClick:fp||!_e?()=>{}:()=>{var ve;ks(),(ve=p.onDismiss)==null||ve.call(p,p)},className:Zn(L==null?void 0:L.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=W==null?void 0:W.close)!=null?i:pM):null,p.jsx||m.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:O.createElement(O.Fragment,null,Z||p.icon||p.promise?O.createElement("div",{"data-icon":"",className:Zn(L==null?void 0:L.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||eO():null,p.type!=="loading"?p.icon||(W==null?void 0:W[Z])||aM(Z):null):null,O.createElement("div",{"data-content":"",className:Zn(L==null?void 0:L.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},O.createElement("div",{"data-title":"",className:Zn(L==null?void 0:L.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?O.createElement("div",{"data-description":"",className:Zn(U,rn,L==null?void 0:L.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),m.isValidElement(p.cancel)?p.cancel:p.cancel&&Wu(p.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:ve=>{var Be,Qe;Wu(p.cancel)&&_e&&((Qe=(Be=p.cancel).onClick)==null||Qe.call(Be,ve),ks())},className:Zn(L==null?void 0:L.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,m.isValidElement(p.action)?p.action:p.action&&Wu(p.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:ve=>{var Be,Qe;Wu(p.action)&&((Qe=(Be=p.action).onClick)==null||Qe.call(Be,ve),!ve.defaultPrevented&&ks())},className:Zn(L==null?void 0:L.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function gb(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function PM(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?EM:_M;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var OM=m.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:p,visibleToasts:y=kM,toastOptions:g,dir:b=gb(),gap:x=CM,loadingIcon:v,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=e,[_,E]=O.useState([]),C=O.useMemo(()=>Array.from(new Set([r].concat(_.filter(oe=>oe.position).map(oe=>oe.position)))),[_,r]),[N,R]=O.useState([]),[$,D]=O.useState(!1),[U,F]=O.useState(!1),[J,V]=O.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
216k":"light"),ne=O.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=O.useRef(null),W=O.useRef(!1),ce=O.useCallback(oe=>{E(me=>{var pe;return(pe=me.find(Ve=>Ve.id===oe.id))!=null&&pe.delete||cn.dismiss(oe.id),me.filter(({id:Ve})=>Ve!==oe.id)})},[]);return O.useEffect(()=>cn.subscribe(oe=>{if(oe.dismiss){E(me=>me.map(pe=>pe.id===oe.id?{...pe,delete:!0}:pe));return}setTimeout(()=>{rT.flushSync(()=>{E(me=>{let pe=me.findIndex(Ve=>Ve.id===oe.id);return pe!==-1?[...me.slice(0,pe),{...me[pe],...oe},...me.slice(pe+1)]:[oe,...me]})})})}),[]),O.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let oe=window.matchMedia("(prefers-color-scheme: dark)");try{oe.addEventListener("change",({matches:me})=>{V(me?"dark":"light")})}catch{oe.addListener(({matches:pe})=>{try{V(pe?"dark":"light")}catch(Ve){console.error(Ve)}})}},[d]),O.useEffect(()=>{_.length<=1&&D(!1)},[_]),O.useEffect(()=>{let oe=me=>{var pe,Ve;s.every(Je=>me[Je]||me.code===Je)&&(D(!0),(pe=ne.current)==null||pe.focus()),me.code==="Escape"&&(document.activeElement===ne.current||(Ve=ne.current)!=null&&Ve.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",oe),()=>document.removeEventListener("keydown",oe)},[s]),O.useEffect(()=>{if(ne.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,W.current=!1)}},[ne.current]),O.createElement("section",{ref:t,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((oe,me)=>{var pe;let[Ve,Je]=oe.split("-");return _.length?O.createElement("ol",{key:oe,dir:b==="auto"?gb():b,tabIndex:-1,ref:ne,className:a,"data-sonner-toaster":!0,"data-theme":J,"data-y-position":Ve,"data-lifted":$&&_.length>1&&!i,"data-x-position":Je,style:{"--front-toast-height":`${((pe=N[0])==null?void 0:pe.height)||0}px`,"--width":`${TM}px`,"--gap":`${x}px`,...p,...PM(l,u)},onBlur:G=>{W.current&&!G.currentTarget.contains(G.relatedTarget)&&(W.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||W.current||(W.current=!0,L.current=G.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{U||D(!1)},onDragEnd:()=>D(!1),onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},_.filter(G=>!G.position&&me===0||G.position===oe).map((G,Ae)=>{var We,Ee;return O.createElement(AM,{key:G.id,icons:w,index:Ae,toast:G,defaultRichColors:h,duration:(We=g==null?void 0:g.duration)!=null?We:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:y,closeButton:(Ee=g==null?void 0:g.closeButton)!=null?Ee:o,interacting:U,position:oe,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:ce,toasts:_.filter(ke=>ke.position==G.position),heights:N.filter(ke=>ke.position==G.position),setHeights:R,expandByDefault:i,gap:x,loadingIcon:v,expanded:$,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const IM=({...e})=>{const{theme:t="system"}=oM();return c.jsx(OM,{theme:t,className:"toaster group",position:"top-center",duration:3e3,toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-2xl group-[.toaster]:border-2 group-[.toaster]:py-6 group-[.toaster]:px-6",title:"group-[.toast]:text-base group-[.toast]:font-semibold",description:"group-[.toast]:text-muted-foreground group-[.toast]:text-sm",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",success:"group-[.toaster]:border-green-500 group-[.toaster]:bg-green-500/10 group-[.toaster]:text-green-500",error:"group-[.toaster]:border-destructive group-[.toaster]:bg-destructive/10"}},...e})};var DM=pv[" useId ".trim().toString()]||(()=>{}),LM=0;function uo(e){const[t,n]=m.useState(DM());return At(()=>{n(r=>r??String(LM++))},[e]),t?`radix-${t}`:""}const MM=["top","right","bottom","left"],mi=Math.min,wn=Math.max,gh=Math.round,Hu=Math.floor,gi=e=>({x:e,y:e}
vendor: 11,663 bytes, line 216
216),FM={left:"right",right:"left",bottom:"top",top:"bottom"},$M={start:"end",end:"start"};function Fg(e,t,n){return wn(e,mi(t,n))}function ys(e,t){return typeof e=="function"?e(t):e}function vs(e){return e.split("-")[0]}function ll(e){return e.split("-")[1]}function hx(e){return e==="x"?"y":"x"}function fx(e){return e==="y"?"height":"width"}function yi(e){return["top","bottom"].includes(vs(e))?"y":"x"}function px(e){return hx(yi(e))}function VM(e,t,n){n===void 0&&(n=!1);const r=ll(e),s=px(e),i=fx(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=yh(o)),[o,yh(o)]}function UM(e){const t=yh(e);return[$g(e),t,$g(t)]}function $g(e){return e.replace(/start|end/g,t=>$M[t])}function BM(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function zM(e,t,n,r){const s=ll(e);let i=BM(vs(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map($g)))),i}function yh(e){return e.replace(/left|right|bottom|top/g,t=>FM[t])}function WM(e){return{top:0,right:0,bottom:0,left:0,...e}}function rC(e){return typeof e!="number"?WM(e):{top:e,right:e,bottom:e,left:e}}function vh(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function yb(e,t,n){let{reference:r,floating:s}=e;const i=yi(t),o=px(t),a=fx(o),l=vs(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(ll(t)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const HM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=yb(u,r,l),f=r,p={},y=0;for(let g=0;g<a.length;g++){const{name:b,fn:x}=a[g],{x:v,y:w,data:S,reset:k}=await x({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=v??d,h=w??h,p={...p,[b]:{...p[b],...S}},k&&y<=50&&(y++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:d,y:h}=yb(u,f,l)),g=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:p}};async function Nc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=ys(t,e),y=rC(p),b=a[f?h==="floating"?"reference":"floating":h],x=vh(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),v=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=vh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(x.top-k.top+y.top)/S.y,bottom:(k.bottom-x.bottom+y.bottom)/S.y,left:(x.left-k.left+y.left)/S.x,right:(k.right-x.right+y.right)/S.x}}const qM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=ys(e,t)||{};if(u==null)return{};const h=rC(d),f={x:n,y:r},p=px(s),y=fx(p),g=await o.getDimensions(u),b=p==="y",x=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=i.reference[y]+i.reference[p]-f[p]-i.floating[y],k=f[p]-i.reference[p],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=_?_[w]:0;(!E||!await(o.isElement==null?void 0:o.isElement(_)))&&(E=a.floating[w]||i.floating[y]);const C=S/2-k/2,N=E/2-g[y]/2-1,R=mi(h[x],N),$=mi(h[v],N),D=R,U=E-g[y]-$,F=E/2-g[y]/2+C,J=Fg(D,F,U),V=!l.arrow&&ll(s)!=null&&F!==J&&i.reference[y]/2-(F<D?R:$)-g[y]/2<0,ne=V?F<D?F-D:F-U:0;return{[p]:f[p]+ne,data:{[p]:J,centerOffset:F-J-ne,...V&&{alignmentOffset:ne}},reset:V}}}),KM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...b}=ys(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=vs(s),v=yi(a),w=vs(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=f||(w||!g?[yh(a)]:UM(a)),_=y!=="none";!f&&_&&k.push(...zM(a,g,y,S));const E=[a,...k],C=await Nc(t,b),N=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&N.push(C[x]),h){const F=VM(s,o,S);N.push(C[F[0]],C[F[1]])}if(R=[...R,{placement:s,overflows:N}],!N.every(F=>F<=0)){var $,D;const F=((($=i.flip)==null?void 0:$.index)||0)+1,J=E[F];if(J)return{data:{index:F,overflows:R},reset:{placement:J}};let V=(D=R.filter(ne=>ne.overflows[0]<=0).sort((ne,P)=>ne.overflows[1]-P.overflows[1])[0])==null?void 0:D.placement;if(!V)switch(p){case"bestFit":{var U;const ne=(U=R.filter(P=>{if(_){const L=yi(P.placement);return L===v||L==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(L=>L>0).reduce((L,W)=>L+W,0)]).sort((P,L)=>P[1]-L[1])[0])==null?void 0:U[0];ne&&(V=ne);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function vb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xb(e){return MM.some(t=>e[t]>=0)}const GM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=ys(e,t);switch(r){case"referenceHidden":{const i=await Nc(t,{...s,elementContext:"reference"}),o=vb(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:xb(o)}}}case"escaped":{const i=await Nc(t,{...s,altBoundary:!0}),o=vb(i,n.floating);return{data:{escapedOffsets:o,escaped:xb(o)}}}default:return{}}}}};async function YM(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=vs(n),a=ll(n),l=yi(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,h=ys(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof y=="number"&&(p=a==="end"?y*-1:y),l?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const XM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await YM(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},JM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x,y:v}=b;return{x,y:v}}},...l}=ys(e,t),u={x:n,y:r},d=await Nc(t,l),h=yi(vs(s)),f=hx(h);let p=u[f],y=u[h];if(i){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",v=p+d[b],w=p-d[x];p=Fg(v,p,w)}if(o){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",v=y+d[b],w=y-d[x];y=Fg(v,y,w)}const g=a.fn({...t,[f]:p,[h]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[h]:o}}}}}},QM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ys(e,t),d={x:n,y:r},h=yi(s),f=hx(h);let p=d[f],y=d[h];const g=ys(a,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=f==="y"?"height":"width",S=i.reference[f]-i.floating[w]+b.mainAxis,k=i.reference[f]+i.reference[w]-b.mainAxis;p<S?p=S:p>k&&(p=k)}if(u){var x,v;const w=f==="y"?"width":"height",S=["top","left"].includes(vs(s)),k=i.reference[h]-i.floating[w]+(S&&((x=o.offset)==null?void 0:x[h])||0)+(S?0:b.crossAxis),_=i.reference[h]+i.reference[w]+(S?0:((v=o.offset)==null?void 0:v[h])||0)-(S?b.crossAxis:0);y<k?y=k:y>_&&(y=_)}return{[f]:p,[h]:y}}}},ZM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=ys(e,t),d=await Nc(t,u),h=vs(s),f=ll(s),p=yi(s)==="y",{width:y,height:g}=i.floating;let b,x;h==="top"||h==="bottom"?(b=h,x=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(x=h,b=f==="end"?"top":"bottom");const v=g-d.top-d.bottom,w=y-d.left-d.right,S=mi(g-d[b],v),k=mi(y-d[x],w),_=!t.middlewareData.shift;let E=S,C=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=v),_&&!f){const R=wn(d.left,0),$=wn(d.right,0),D=wn(d.top,0),U=wn(d.bottom,0);p?C=y-2*(R!==0||$!==0?R+$:wn(d.left,d.right)):E=g-2*(D!==0||U!==0?D+U:wn(d.top,d.bottom))}await l({...t,availableWidth:C,availableHeight:E});const N=await o.getDimensions(a.floating);return y!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function kf(){return typeof window<"u"}function cl(e){return sC(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kr(e){var t;return(t=(sC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sC(e){return kf()?e instanceof Node||e instanceof _n(e).Node:!1}function xr(e){return kf()?e instanceof Element||e instanceof _n(e).Element:!1}function Hr(e){return kf()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function wb(e){return!kf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}function cu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function e4(e){return["table","td","th"].includes(cl(e))}function _f(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function mx(e){const t=gx(),n=xr(e)?wr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function t4(e){let t=vi(e);for(;Hr(t)&&!Ga(t);){if(mx(t))return t;if(_f(t))return null;t=vi(t)}return null}function gx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ga(e){return["html","body","#document"].includes(cl(e))}function wr(e){return _n(e).getComputedStyle(e)}function Ef(e){return xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vi(e){if(cl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wb(e)&&e.host||Kr(e);return wb(t)?t.host:t}function iC(e){const t=vi(e);return Ga(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&cu(t)?t:iC(t)}function Ac(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=iC(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=_n(s);if(i){const a=Vg(o);
vendor: 7,125 bytes, line 216
216return t.concat(o,o.visualViewport||[],cu(s)?s:[],a&&n?Ac(a):[])}return t.concat(s,Ac(s,[],n))}function Vg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oC(e){const t=wr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Hr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=gh(n)!==i||gh(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function yx(e){return xr(e)?e:e.contextElement}function Ea(e){const t=yx(e);if(!Hr(t))return gi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=oC(t);let o=(i?gh(n.width):n.width)/r,a=(i?gh(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const n4=gi(0);function aC(e){const t=_n(e);return!gx()||!t.visualViewport?n4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function r4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_n(e)?!1:t}function bo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=yx(e);let o=gi(1);t&&(r?xr(r)&&(o=Ea(r)):o=Ea(e));const a=r4(i,n,r)?aC(i):gi(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=_n(i),p=r&&xr(r)?_n(r):r;let y=f,g=Vg(y);for(;g&&r&&p!==y;){const b=Ea(g),x=g.getBoundingClientRect(),v=wr(g),w=x.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,S=x.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,h*=b.y,l+=w,u+=S,y=_n(g),g=Vg(y)}}return vh({width:d,height:h,x:l,y:u})}function s4(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Kr(r),a=t?_f(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=gi(1);const d=gi(0),h=Hr(r);if((h||!h&&!i)&&((cl(r)!=="body"||cu(o))&&(l=Ef(r)),Hr(r))){const f=bo(r);u=Ea(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function i4(e){return Array.from(e.getClientRects())}function Ug(e,t){const n=Ef(e).scrollLeft;return t?t.left+n:bo(Kr(e)).left+n}function o4(e){const t=Kr(e),n=Ef(e),r=e.ownerDocument.body,s=wn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=wn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ug(e);const a=-n.scrollTop;return wr(r).direction==="rtl"&&(o+=wn(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function a4(e,t){const n=_n(e),r=Kr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=gx();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function l4(e,t){const n=bo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Hr(e)?Ea(e):gi(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function bb(e,t,n){let r;if(t==="viewport")r=a4(e,n);else if(t==="document")r=o4(Kr(e));else if(xr(t))r=l4(t,n);else{const s=aC(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return vh(r)}function lC(e,t){const n=vi(e);return n===t||!xr(n)||Ga(n)?!1:wr(n).position==="fixed"||lC(n,t)}function c4(e,t){const n=t.get(e);if(n)return n;let r=Ac(e,[],!1).filter(a=>xr(a)&&cl(a)!=="body"),s=null;const i=wr(e).position==="fixed";let o=i?vi(e):e;for(;xr(o)&&!Ga(o);){const a=wr(o),l=mx(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||cu(o)&&!l&&lC(e,o))?r=r.filter(d=>d!==o):s=a,o=vi(o)}return t.set(e,r),r}function u4(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?_f(t)?[]:c4(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const h=bb(t,d,s);return u.top=wn(h.top,u.top),u.right=mi(h.right,u.right),u.bottom=mi(h.bottom,u.bottom),u.left=wn(h.left,u.left),u},bb(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function d4(e){const{width:t,height:n}=oC(e);return{width:t,height:n}}function h4(e,t,n){const r=Hr(t),s=Kr(t),i=n==="fixed",o=bo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=gi(0);if(r||!r&&!i)if((cl(t)!=="body"||cu(s))&&(a=Ef(t)),r){const p=bo(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else s&&(l.x=Ug(s));let u=0,d=0;if(s&&!r&&!i){const p=s.getBoundingClientRect();d=p.top+a.scrollTop,u=p.left+a.scrollLeft-Ug(s,p)}const h=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-d;return{x:h,y:f,width:o.width,height:o.height}}function Yp(e){return wr(e).position==="static"}function Sb(e,t){if(!Hr(e)||wr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Kr(e)===n&&(n=n.ownerDocument.body),n}function cC(e,t){const n=_n(e);if(_f(e))return n;if(!Hr(e)){let s=vi(e);for(;s&&!Ga(s);){if(xr(s)&&!Yp(s))return s;s=vi(s)}return n}let r=Sb(e,t);for(;r&&e4(r)&&Yp(r);)r=Sb(r,t);return r&&Ga(r)&&Yp(r)&&!mx(r)?n:r||t4(e)||n}const f4=async function(e){const t=this.getOffsetParent||cC,n=this.getDimensions,r=await n(e.floating);return{reference:h4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function p4(e){return wr(e).direction==="rtl"}const m4={convertOffsetParentRelativeRectToViewportRelativeRect:s4,getDocumentElement:Kr,getClippingRect:u4,getOffsetParent:cC,getElementRects:f4,getClientRects:i4,getDimensions:d4,getScale:Ea,isElement:xr,isRTL:p4};function g4(e,t){let n=null,r;const s=Kr(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:h,height:f}=e.getBoundingClientRect();if(a||t(),!h||!f)return;const p=Hu(d),y=Hu(s.clientWidth-(u+h)),g=Hu(s.clientHeight-(d+f)),b=Hu(u),v={rootMargin:-p+"px "+-y+"px "+-g+"px "+-b+"px",threshold:wn(0,mi(1,l))||1};let w=!0;function S(k){const _=k[0].intersectionRatio;if(_!==l){if(!w)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return o(!0),i}function y4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=yx(e),d=s||i?[...u?Ac(u):[],...Ac(t)]:[];d.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const h=u&&a?g4(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(x=>{let[v]=x;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let y,g=l?bo(e):null;l&&b();function b(){const x=bo(e);g&&(x.x!==g.x||x.y!==g.y||x.width!==g.width||x.height!==g.height)&&n(),g=x,y=requestAnimationFrame(b)}return n(),()=>{var x;d.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),h==null||h(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(y)}}const v4=XM,x4=JM,w4=KM,b4=ZM,S4=GM,kb=qM,k4=QM,_4=(e,t,n)=>{const r=new Map,s={platform:m4,...n},i={...s.platform,_c:r};return HM(e,t,{...s,platform:i})};var Ad=typeof document<"u"?m.useLayoutEffect:m.useEffect;function xh(e,t){if(e===t)return!0;
vendor: 8,372 bytes, line 216
216if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xh(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!xh(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _b(e,t){const n=uC(e);return Math.round(t*n)/n}function Xp(e){const t=m.useRef(e);return Ad(()=>{t.current=e}),t}function E4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,h]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);xh(f,r)||p(r);const[y,g]=m.useState(null),[b,x]=m.useState(null),v=m.useCallback(P=>{P!==_.current&&(_.current=P,g(P))},[]),w=m.useCallback(P=>{P!==E.current&&(E.current=P,x(P))},[]),S=i||y,k=o||b,_=m.useRef(null),E=m.useRef(null),C=m.useRef(d),N=l!=null,R=Xp(l),$=Xp(s),D=Xp(u),U=m.useCallback(()=>{if(!_.current||!E.current)return;const P={placement:t,strategy:n,middleware:f};$.current&&(P.platform=$.current),_4(_.current,E.current,P).then(L=>{const W={...L,isPositioned:D.current!==!1};F.current&&!xh(C.current,W)&&(C.current=W,Ao.flushSync(()=>{h(W)}))})},[f,t,n,$,D]);Ad(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[u]);const F=m.useRef(!1);Ad(()=>(F.current=!0,()=>{F.current=!1}),[]),Ad(()=>{if(S&&(_.current=S),k&&(E.current=k),S&&k){if(R.current)return R.current(S,k,U);U()}},[S,k,U,R,N]);const J=m.useMemo(()=>({reference:_,floating:E,setReference:v,setFloating:w}),[v,w]),V=m.useMemo(()=>({reference:S,floating:k}),[S,k]),ne=m.useMemo(()=>{const P={position:n,left:0,top:0};if(!V.floating)return P;const L=_b(V.floating,d.x),W=_b(V.floating,d.y);return a?{...P,transform:"translate("+L+"px, "+W+"px)",...uC(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:W}},[n,a,V.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:U,refs:J,elements:V,floatingStyles:ne}),[d,U,J,V,ne])}const T4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?kb({element:r.current,padding:s}).fn(n):{}:r?kb({element:r,padding:s}).fn(n):{}}}},C4=(e,t)=>({...v4(e),options:[e,t]}),j4=(e,t)=>({...x4(e),options:[e,t]}),R4=(e,t)=>({...k4(e),options:[e,t]}),N4=(e,t)=>({...w4(e),options:[e,t]}),A4=(e,t)=>({...b4(e),options:[e,t]}),P4=(e,t)=>({...S4(e),options:[e,t]}),O4=(e,t)=>({...T4(e),options:[e,t]});var I4="Arrow",dC=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return c.jsx(fe.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});dC.displayName=I4;var D4=dC;function vx(e){const[t,n]=m.useState(void 0);return At(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xx="Popper",[hC,Tf]=br(xx),[L4,fC]=hC(xx),pC=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return c.jsx(L4,{scope:t,anchor:r,onAnchorChange:s,children:n})};pC.displayName=xx;var mC="PopperAnchor",gC=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=fC(mC,n),o=m.useRef(null),a=be(t,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:c.jsx(fe.div,{...s,ref:a})});gC.displayName=mC;var wx="PopperContent",[M4,F4]=hC(wx),yC=m.forwardRef((e,t)=>{var G,Ae,We,Ee,ke,Te;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:y,...g}=e,b=fC(wx,n),[x,v]=m.useState(null),w=be(t,Ct=>v(Ct)),[S,k]=m.useState(null),_=vx(S),E=(_==null?void 0:_.width)??0,C=(_==null?void 0:_.height)??0,N=r+(i!=="center"?"-"+i:""),R=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],D=$.length>0,U={padding:R,boundary:$.filter(V4),altBoundary:D},{refs:F,floatingStyles:J,placement:V,isPositioned:ne,middlewareData:P}=E4({strategy:"fixed",placement:N,whileElementsMounted:(...Ct)=>y4(...Ct,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[C4({mainAxis:s+C,alignmentAxis:o}),l&&j4({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?R4():void 0,...U}),l&&N4({...U}),A4({...U,apply:({elements:Ct,rects:Kt,availableWidth:_r,availableHeight:Er})=>{const{width:Yr,height:Oo}=Kt.reference,Xr=Ct.floating.style;Xr.setProperty("--radix-popper-available-width",`${_r}px`),Xr.setProperty("--radix-popper-available-height",`${Er}px`),Xr.setProperty("--radix-popper-anchor-width",`${Yr}px`),Xr.setProperty("--radix-popper-anchor-height",`${Oo}px`)}}),S&&O4({element:S,padding:a}),U4({arrowWidth:E,arrowHeight:C}),f&&P4({strategy:"referenceHidden",...U})]}),[L,W]=wC(V),ce=Et(y);At(()=>{ne&&(ce==null||ce())},[ne,ce]);const oe=(G=P.arrow)==null?void 0:G.x,me=(Ae=P.arrow)==null?void 0:Ae.y,pe=((We=P.arrow)==null?void 0:We.centerOffset)!==0,[Ve,Je]=m.useState();return At(()=>{x&&Je(window.getComputedStyle(x).zIndex)},[x]),c.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ne?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ve,"--radix-popper-transform-origin":[(Ee=P.transformOrigin)==null?void 0:Ee.x,(ke=P.transformOrigin)==null?void 0:ke.y].join(" "),...((Te=P.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(M4,{scope:n,placedSide:L,onArrowChange:k,arrowX:oe,arrowY:me,shouldHideArrow:pe,children:c.jsx(fe.div,{"data-side":L,"data-align":W,...g,ref:w,style:{...g.style,animation:ne?void 0:"none"}})})})});yC.displayName=wx;var vC="PopperArrow",$4={top:"bottom",right:"left",bottom:"top",left:"right"},xC=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=F4(vC,r),o=$4[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(D4,{...s,ref:n,style:{...s.style,display:"block"}})})});xC.displayName=vC;function V4(e){return e!==null}var U4=e=>({name:"transformOrigin",options:e,fn(t){var b,x,v;const{placement:n,rects:r,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=wC(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((x=s.arrow)==null?void 0:x.x)??0)+a/2,p=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let y="",g="";return u==="bottom"?(y=o?h:`${f}px`,g=`${-l}px`):u==="top"?(y=o?h:`${f}px`,g=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,g=o?h:`${p}px`):u==="left"&&(y=`${r.floating.width+l}px`,g=o?h:`${p}px`),{data:{x:y,y:g}}}});function wC(e){const[t,n="center"]=e.split("-");return[t,n]}var B4=pC,bC=gC,SC=yC,kC=xC,[Cf,DG]=br("Tooltip",[Tf]),bx=Tf(),_C="TooltipProvider",z4=700,Eb="tooltip.open",[W4,EC]=Cf(_C),TC=e=>{const{__scopeTooltip:t,delayDuration:n=z4,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=m.useRef(!0),a=m.useRef(!1),l=m.useRef(0);return m.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(W4,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 5,838 bytes, line 216
216o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:m.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};TC.displayName=_C;var CC="Tooltip",[LG,jf]=Cf(CC),Bg="TooltipTrigger",H4=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=jf(Bg,n),i=EC(Bg,n),o=bx(n),a=m.useRef(null),l=be(t,a,s.onTriggerChange),u=m.useRef(!1),d=m.useRef(!1),h=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(bC,{asChild:!0,...o,children:c.jsx(fe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:le(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:le(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:le(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:le(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:le(e.onBlur,s.onClose),onClick:le(e.onClick,s.onClose)})})});H4.displayName=Bg;var q4="TooltipPortal",[MG,K4]=Cf(q4,{forceMount:void 0}),Ya="TooltipContent",jC=m.forwardRef((e,t)=>{const n=K4(Ya,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=jf(Ya,e.__scopeTooltip);return c.jsx(Wn,{present:r||o.open,children:o.disableHoverableContent?c.jsx(RC,{side:s,...i,ref:t}):c.jsx(G4,{side:s,...i,ref:t})})}),G4=m.forwardRef((e,t)=>{const n=jf(Ya,e.__scopeTooltip),r=EC(Ya,e.__scopeTooltip),s=m.useRef(null),i=be(t,s),[o,a]=m.useState(null),{trigger:l,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=m.useCallback(()=>{a(null),h(!1)},[h]),p=m.useCallback((y,g)=>{const b=y.currentTarget,x={x:y.clientX,y:y.clientY},v=Z4(x,b.getBoundingClientRect()),w=eF(x,v),S=tF(g.getBoundingClientRect()),k=rF([...w,...S]);a(k),h(!0)},[h]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(l&&d){const y=b=>p(b,d),g=b=>p(b,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[l,d,p,f]),m.useEffect(()=>{if(o){const y=g=>{const b=g.target,x={x:g.clientX,y:g.clientY},v=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),w=!nF(x,o);v?f():w&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,o,u,f]),c.jsx(RC,{...e,ref:i})}),[Y4,X4]=Cf(CC,{isInside:!1}),J4=pD("TooltipContent"),RC=m.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=jf(Ya,n),u=bx(n),{onClose:d}=l;return m.useEffect(()=>(document.addEventListener(Eb,d),()=>document.removeEventListener(Eb,d)),[d]),m.useEffect(()=>{if(l.trigger){const h=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,d]),c.jsx(ou,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:c.jsxs(SC,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(J4,{children:r}),c.jsx(Y4,{scope:n,isInside:!0,children:c.jsx(LD,{id:l.contentId,role:"tooltip",children:s||r})})]})})});jC.displayName=Ya;var NC="TooltipArrow",Q4=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=bx(n);return X4(NC,n).isInside?null:c.jsx(kC,{...s,...r,ref:t})});Q4.displayName=NC;function Z4(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function eF(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function tF(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function nF(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],u=a.x,d=a.y,h=l.x,f=l.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function rF(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),sF(t)}function sF(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var iF=TC,AC=jC;const oF=iF,aF=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(AC,{ref:r,sideOffset:t,className:ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
216de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));aF.displayName=AC.displayName;var uu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},So=typeof window>"u"||"Deno"in globalThis;function un(){}function lF(e,t){return typeof e=="function"?e(t):e}function zg(e){return typeof e=="number"&&e>=0&&e!==1/0}function PC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ci(e,t){return typeof e=="function"?e(t):e}function Dn(e,t){return typeof e=="function"?e(t):e}function Tb(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Sx(o,t.options))return!1}else if(!Oc(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Cb(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Pc(t.options.mutationKey)!==Pc(i))return!1}else if(!Oc(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Sx(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pc)(e)}function Pc(e){return JSON.stringify(e,(t,n)=>Hg(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Oc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Oc(e[n],t[n])):!1}function OC(e,t){if(e===t)return e;const n=jb(e)&&jb(t);if(n||Hg(e)&&Hg(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:i[d];(!n&&l.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,u++):(a[h]=OC(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function Wg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function jb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hg(e){if(!Rb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Rb(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Rb(e){return Object.prototype.toString.call(e)==="[object Object]"}function cF(e){return new Promise(t=>{setTimeout(t,e)})}function qg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?OC(e,t):t}function uF(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function dF(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var kx=Symbol();function IC(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===kx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hF(e,t){return typeof e=="function"?e(...t):!!e}var Zi,Bs,ja,Lk,fF=(Lk=class extends uu{constructor(){super();he(this,Zi);he(this,Bs);he(this,ja);te(this,ja,t=>{if(!So&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,Bs)||this.setEventListener(j(this,ja))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Bs))==null||t.call(this),te(this,Bs,void 0))}setEventListener(t){var n;te(this,ja,t),(n=j(this,Bs))==null||n.call(this),te(this,Bs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){j(this,Zi)!==t&&(te(this,Zi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,Zi)=="boolean"?j(this,Zi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zi=new WeakMap,Bs=new WeakMap,ja=new WeakMap,Lk),_x=new fF,Ra,zs,Na,Mk,pF=(Mk=class extends uu{constructor(){super();he(this,Ra,!0);he(this,zs);he(this,Na);te(this,Na,t=>{if(!So&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,zs)||this.setEventListener(j(this,Na))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,zs))==null||t.call(this),te(this,zs,void 0))}setEventListener(t){var n;te(this,Na,t),(n=j(this,zs))==null||n.call(this),te(this,zs,t(this.setOnline.bind(this)))}setOnline(t){j(this,Ra)!==t&&(te(this,Ra,t),this.listeners.forEac
vendor: 30,223 bytes, line 216
216h(r=>{r(t)}))}isOnline(){return j(this,Ra)}},Ra=new WeakMap,zs=new WeakMap,Na=new WeakMap,Mk),wh=new pF;function Kg(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function mF(e){return Math.min(1e3*2**e,3e4)}function DC(e){return(e??"online")==="online"?wh.isOnline():!0}var LC=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Jp(e){return e instanceof LC}function MC(e){let t=!1,n=0,r=!1,s;const i=Kg(),o=g=>{var b;r||(f(new LC(g)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>_x.isFocused()&&(e.networkMode==="always"||wh.isOnline())&&e.canRun(),d=()=>DC(e.networkMode)&&e.canRun(),h=g=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,g),s==null||s(),i.resolve(g))},f=g=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,g),s==null||s(),i.reject(g))},p=()=>new Promise(g=>{var b;s=x=>{(r||u())&&g(x)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(h).catch(x=>{var _;if(r)return;const v=e.retry??(So?0:3),w=e.retryDelay??mF,S=typeof w=="function"?w(n,x):w,k=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,x);if(t||!k){f(x);return}n++,(_=e.onFail)==null||_.call(e,n,x),cF(S).then(()=>u()?void 0:p()).then(()=>{t?f(x):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?y():p().then(y),i)}}var gF=e=>setTimeout(e,0);function yF(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=gF;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Mt=yF(),eo,Fk,FC=(Fk=class{constructor(){he(this,eo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zg(this.gcTime)&&te(this,eo,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(So?1/0:5*60*1e3))}clearGcTimeout(){j(this,eo)&&(clearTimeout(j(this,eo)),te(this,eo,void 0))}},eo=new WeakMap,Fk),Aa,to,In,no,Wt,Jc,ro,ar,rs,$k,vF=($k=class extends FC{constructor(t){super();he(this,ar);he(this,Aa);he(this,to);he(this,In);he(this,no);he(this,Wt);he(this,Jc);he(this,ro);te(this,ro,!1),te(this,Jc,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,no,t.client),te(this,In,j(this,no).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,Aa,xF(this.options)),this.state=t.state??j(this,Aa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,Wt))==null?void 0:t.promise}setOptions(t){this.options={...j(this,Jc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,In).remove(this)}setData(t,n){const r=qg(this.state.data,t,this.options);return Ce(this,ar,rs).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ce(this,ar,rs).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=j(this,Wt))==null?void 0:r.promise;return(s=j(this,Wt))==null||s.cancel(t),n?n.then(un).catch(un):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Aa))}isActive(){return this.observers.some(t=>Dn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ci(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!PC(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,Wt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,Wt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,In).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(j(this,Wt)&&(j(this,ro)?j(this,Wt).cancel({revert:!0}):j(this,Wt).cancelRetry()),this.scheduleGc()),j(this,In).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ce(this,ar,rs).call(this,{type:"invalidate"})}fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,Wt))return j(this,Wt).continueRetry(),j(this,Wt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(te(this,ro,!0),r.signal)})},i=()=>{const f=IC(this.options,n),y=(()=>{const g={client:j(this,no),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return te(this,ro,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,no),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),te(this,to,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&Ce(this,ar,rs).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=f=>{var p,y,g,b;Jp(f)&&f.silent||Ce(this,ar,rs).call(this,{type:"error",error:f}),Jp(f)||((y=(p=j(this,In).config).onError)==null||y.call(p,f,this),(b=(g=j(this,In).config).onSettled)==null||b.call(g,this.state.data,f,this)),this.scheduleGc()};return te(this,Wt,MC({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,y,g,b;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(x){l(x);return}(y=(p=j(this,In).config).onSuccess)==null||y.call(p,f,this),(b=(g=j(this,In).config).onSettled)==null||b.call(g,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,p)=>{Ce(this,ar,rs).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{Ce(this,ar,rs).call(this,{type:"pause"})},onContinue:()=>{Ce(this,ar,rs).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),j(this,Wt).start()}},Aa=new WeakMap,to=new WeakMap,In=new WeakMap,no=new WeakMap,Wt=new WeakMap,Jc=new WeakMap,ro=new WeakMap,ar=new WeakSet,rs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...$C(r.data,this.options),fetchMeta:t.meta??null};case"success":return te(this,to,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Jp(s)&&s.revert&&j(this,to)?{...j(this,to),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Mt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,In).notify({query:this,type:"updated",action:t})})},$k);function $C(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:DC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xF(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Or,Vk,wF=(Vk=class extends uu{constructor(t={}){super();he(this,Or);this.config=t,te(this,Or,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Sx(s,n);let o=this.get(i);return o||(o=new vF({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){j(this,Or).has(t.queryHash)||(j(this,Or).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=j(this,Or).get(t.queryHash);n&&(t.destroy(),n===t&&j(this,Or).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Mt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,Or).get(t)}getAll(){return[...j(this,Or).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Tb(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Tb(t,r)):n}notify(t){Mt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Mt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Mt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Or=new WeakMap,Vk),Ir,Gt,so,Dr,Ns,Uk,bF=(Uk=class extends FC{constructor(t){super();he(this,Dr);he(this,Ir);he(this,Gt);he(this,so);this.mutationId=t.mutationId,te(this,Gt,t.mutationCache),te(this,Ir,[]),this.state=t.state||SF(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,Ir).includes(t)||(j(this,Ir).push(t),this.clearGcTimeout(),j(this,Gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,Ir,j(this,Ir).filter(n=>n!==t)),this.scheduleGc(),j(this,Gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Ir).length||(this.state.status==="pending"?this.scheduleGc():j(this,Gt).remove(this))}continue(){var t;return((t=j(this,so))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,d,h,f,p,y,g,b,x,v,w,S,k,_,E,C;const n=()=>{Ce(this,Dr,Ns).call(this,{type:"continue"})};te(this,so,MC({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,R)=>{Ce(this,Dr,Ns).call(this,{type:"failed",failureCount:N,error:R})},onPause:()=>{Ce(this,Dr,Ns).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,Gt).canRun(this)}));const r=this.state.status==="pending",s=!j(this,so).canStart();try{if(r)n();else{Ce(this,Dr,Ns).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=j(this,Gt).config).onMutate)==null?void 0:o.call(i,t,this));const R=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));R!==this.state.context&&Ce(this,Dr,Ns).call(this,{type:"pending",context:R,variables:t,isPaused:s})}const N=await j(this,so).start();return await((d=(u=j(this,Gt).config).onSuccess)==null?void 0:d.call(u,N,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,N,t,this.state.context)),await((y=(p=j(this,Gt).config).onSettled)==null?void 0:y.call(p,N,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,N,null,t,this.state.context)),Ce(this,Dr,Ns).call(this,{type:"success",data:N}),N}catch(N){try{throw await((v=(x=j(this,Gt).config).onError)==null?void 0:v.call(x,N,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,N,t,this.state.context)),await((_=(k=j(this,Gt).config).onSettled)==null?void 0:_.call(k,void 0,N,this.state.variables,this.state.context,this)),await((C=(E=this.options).onSettled)==null?void 0:C.call(E,void 0,N,t,this.state.context)),N}finally{Ce(this,Dr,Ns).call(this,{type:"error",error:N})}}finally{j(this,Gt).runNext(this)}}},Ir=new WeakMap,Gt=new WeakMap,so=new WeakMap,Dr=new WeakSet,Ns=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Mt.batch(()=>{j(this,Ir).forEach(r=>{r.onMutationUpdate(t)}),j(this,Gt).notify({mutation:this,type:"updated",action:t})})},Uk);function SF(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ls,lr,Qc,Bk,kF=(Bk=class extends uu{constructor(t={}){super();he(this,ls);he(this,lr);he(this,Qc);this.config=t,te(this,ls,new Set),te(this,lr,new Map),te(this,Qc,0)}build(t,n,r){const s=new bF({mutationCache:this,mutationId:++Su(this,Qc)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){j(this,ls).add(t);const n=qu(t);if(typeof n=="string"){const r=j(this,lr).get(n);r?r.push(t):j(this,lr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,ls).delete(t)){const n=qu(t);if(typeof n=="string"){const r=j(this,lr).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&j(this,lr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=qu(t);if(typeof n=="string"){const r=j(this,lr).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=qu(t);if(typeof n=="string"){const s=(r=j(this,lr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Mt.batch(()=>{j(this,ls).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,ls).clear(),j(this,lr).clear()})}getAll(){return Array.from(j(this,ls))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Cb(n,r))}findAll(t={}){return this.getAll().filter(n=>Cb(t,n))}notify(t){Mt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Mt.batch(()=>Promise.all(t.map(n=>n.continue().catch(un))))}},ls=new WeakMap,lr=new WeakMap,Qc=new WeakMap,Bk);function qu(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Nb(e){return{onFetch:(t,n)=>{var d,h,f,p,y;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=IC(t.options,t.fetchOptions),v=async(w,S,k)=>{if(g)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:S,direction:k?"backward":"forward",meta:t.options.meta};return b($),$})(),C=await x(E),{maxPages:N}=t.options,R=k?dF:uF;return{pages:R(w.pages,C,N),pageParams:R(w.pageParams,S,N)}};if(s&&i.length){const w=s==="backward",S=w?_F:Ab,k={pages:i,pageParams:o},_=S(r,k);a=await v(k,_,w)}else{const w=e??i.length;do{const S=l===0?o[0]??r.initialPageParam:Ab(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ab(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function _F(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var it,Ws,Hs,Pa,Oa,qs,Ia,Da,zk,EF=(zk=class{constructor(e={}){he(this,it);he(this,Ws);he(this,Hs);he(this,Pa);he(this,Oa);he(this,qs);he(this,Ia);he(this,Da);te(this,it,e.queryCache||new wF),te(this,Ws,e.mutationCache||new kF),te(this,Hs,e.defaultOptions||{}),te(this,Pa,new Map),te(this,Oa,new Map),te(this,qs,0)}mount(){Su(this,qs)._++,j(this,qs)===1&&(te(this,Ia,_x.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,it).onFocus())})),te(this,Da,wh.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,it).onOnline())})))}unmount(){var e,t;Su(this,qs)._--,j(this,qs)===0&&((e=j(this,Ia))==null||e.call(this),te(this,Ia,void 0),(t=j(this,Da))==null||t.call(this),te(this,Da,void 0))}isFetching(e){return j(this,it).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,Ws).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,it).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=j(this,it).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ci(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return j(this,it).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=j(this,it).get(r.queryHash),i=s==null?void 0:s.state.data,o=lF(t,i);if(o!==void 0)return j(this,it).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Mt.batch(()=>j(this,it).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,it).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=j(this,it);Mt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=j(this,it);return Mt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Mt.batch(()=>j(this,it).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(un).catch(un)}invalidateQueries(e,t={}){return Mt.batch(()=>(j(this,it).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Mt.batch(()=>j(this,it).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(un)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(un)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=j(this,it).build(this,t);return n.isStaleByTime(ci(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(un).catch(un)}fetchInfiniteQuery(e){return e.behavior=Nb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(un).catch(un)}ensureInfiniteQueryData(e){return e.behavior=Nb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return wh.isOnline()?j(this,Ws).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,it)}getMutationCache(){return j(this,Ws)}getDefaultOptions(){return j(this,Hs)}setDefaultOptions(e){te(this,Hs,e)}setQueryDefaults(e,t){j(this,Pa).set(Pc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,Pa).values()],n={};return t.forEach(r=>{Oc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){j(this,Oa).set(Pc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,Oa).values()],n={};return t.forEach(r=>{Oc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,Hs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===kx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,Hs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,it).clear(),j(this,Ws).clear()}},it=new WeakMap,Ws=new WeakMap,Hs=new WeakMap,Pa=new WeakMap,Oa=new WeakMap,qs=new WeakMap,Ia=new WeakMap,Da=new WeakMap,zk),an,je,Zc,Yt,io,La,Ks,Gs,eu,Ma,Fa,oo,ao,Ys,$a,De,$l,Gg,Yg,Xg,Jg,Qg,Zg,ey,VC,Wk,TF=(Wk=class extends uu{constructor(t,n){super();he(this,De);he(this,an);he(this,je);he(this,Zc);he(this,Yt);he(this,io);he(this,La);he(this,Ks);he(this,Gs);he(this,eu);he(this,Ma);he(this,Fa);he(this,oo);he(this,ao);he(this,Ys);he(this,$a,new Set);this.options=n,te(this,an,t),te(this,Gs,null),te(this,Ks,Kg()),this.options.experimental_prefetchInRender||j(this,Ks).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,je).addObserver(this),Pb(j(this,je),this.options)?Ce(this,De,$l).call(this):this.updateResult(),Ce(this,De,Jg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ty(j(this,je),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ty(j(this,je),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ce(this,De,Qg).call(this),Ce(this,De,Zg).call(this),j(this,je).removeObserver(this)}setOptions(t){const n=this.options,r=j(this,je);if(this.options=j(this,an).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dn(this.options.enabled,j(this,je))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ce(this,De,ey).call(this),j(this,je).setOptions(this.options),n._defaulted&&!Wg(this.options,n)&&j(this,an).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,je),observer:this});const s=this.hasListeners();s&&Ob(j(this,je),r,this.options,n)&&Ce(this,De,$l).call(this),this.updateResult(),s&&(j(this,je)!==r||Dn(this.options.enabled,j(this,je))!==Dn(n.enabled,j(this,je))||ci(this.options.staleTime,j(this,je))!==ci(n.staleTime,j(this,je)))&&Ce(this,De,Gg).call(this);const i=Ce(this,De,Yg).call(this);s&&(j(this,je)!==r||Dn(this.options.enabled,j(this,je))!==Dn(n.enabled,j(this,je))||i!==j(this,Ys))&&Ce(this,De,Xg).call(this,i)}getOptimisticResult(t){const n=j(this,an).getQueryCache().build(j(this,an),t),r=this.createResult(n,t);return jF(this,r)&&(te(this,Yt,r),te(this,La,this.options),te(this,io,j(this,je).state)),r}getCurrentResult(){return j(this,Yt)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){j(this,$a).add(t)}getCurrentQuery(){return j(this,je)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=j(this,an).defaultQueryOptions(t),r=j(this,an).getQueryCache().build(j(this,an),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ce(this,De,$l).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,Yt)))}createResult(t,n){var N;const r=j(this,je),s=this.options,i=j(this,Yt),o=j(this,io),a=j(this,La),u=t!==r?t.state:j(this,Zc),{state:d}=t;let h={...d},f=!1,p;if(n._optimisticResults){const R=this.hasListeners(),$=!R&&Pb(t,n),D=R&&Ob(t,r,n,s);($||D)&&(h={...h,...$C(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:b}=h;p=h.data;let x=!1;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let R;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(R=i.data,x=!0):R=typeof n.placeholderData=="function"?n.placeholderData((N=j(this,Fa))==null?void 0:N.state.data,j(this,Fa)):n.placeholderData,R!==void 0&&(b="success",p=qg(i==null?void 0:i.data,R,n),f=!0)}if(n.select&&p!==void 0&&!x)if(i&&p===(o==null?void 0:o.data)&&n.select===j(this,eu))p=j(this,Ma);else try{te(this,eu,n.select),p=n.select(p),p=qg(i==null?void 0:i.data,p,n),te(this,Ma,p),te(this,Gs,null)}catch(R){te(this,Gs,R)}j(this,Gs)&&(y=j(this,Gs),p=j(this,Ma),g=Date.now(),b="error");const v=h.fetchStatus==="fetching",w=b==="pending",S=b==="error",k=w&&v,_=p!==void 0,C={status:b,fetchStatus:h.fetchStatus,isPending:w,isSuccess:b==="success",isError:S,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:S&&!_,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&_,isStale:Ex(t,n),refetch:this.refetch,promise:j(this,Ks),isEnabled:Dn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=U=>{C.status==="error"?U.reject(C.error):C.data!==void 0&&U.resolve(C.data)},$=()=>{const U=te(this,Ks,C.promise=Kg());R(U)},D=j(this,Ks);switch(D.status){case"pending":t.queryHash===r.queryHash&&R(D);break;case"fulfilled":(C.status==="error"||C.data!==D.value)&&$();break;case"rejected":(C.status!=="error"||C.error!==D.reason)&&$();break}}return C}updateResult(){const t=j(this,Yt),n=this.createResult(j(this,je),this.options);if(te(this,io,j(this,je).state),te(this,La,this.options),j(this,io).data!==void 0&&te(this,Fa,j(this,je)),Wg(n,t))return;te(this,Yt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!j(this,$a).size)return!0;const o=new Set(i??j(this,$a));return this.options.throwOnError&&o.add("error"),Object.keys(j(this,Yt)).some(a=>{const l=a;return j(this,Yt)[l]!==t[l]&&o.has(l)})};Ce(this,De,VC).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ce(this,De,Jg).call(this)}},an=new WeakMap,je=new WeakMap,Zc=new WeakMap,Yt=new WeakMap,io=new WeakMap,La=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,eu=new WeakMap,Ma=new WeakMap,Fa=new WeakMap,oo=new WeakMap,ao=new WeakMap,Ys=new WeakMap,$a=new WeakMap,De=new WeakSet,$l=function(t){Ce(this,De,ey).call(this);let n=j(this,je).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(un)),n},Gg=function(){Ce(this,De,Qg).call(this);const t=ci(this.options.staleTime,j(this,je));if(So||j(this,Yt).isStale||!zg(t))return;const r=PC(j(this,Yt).dataUpdatedAt,t)+1;te(this,oo,setTimeout(()=>{j(this,Yt).isStale||this.updateResult()},r))},Yg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,je)):this.options.refetchInterval)??!1},Xg=function(t){Ce(this,De,Zg).call(this),te(this,Ys,t),!(So||Dn(this.options.enabled,j(this,je))===!1||!zg(j(this,Ys))||j(this,Ys)===0)&&te(this,ao,setInterval(()=>{(this.options.refetchIntervalInBackground||_x.isFocused())&&Ce(this,De,$l).call(this)},j(this,Ys)))},Jg=function(){Ce(this,De,Gg).call(this),Ce(this,De,Xg).call(this,Ce(this,De,Yg).call(this))},Qg=function(){j(this,oo)&&(clearTimeout(j(this,oo)),te(this,oo,void 0))},Zg=function(){j(this,ao)&&(clearInterval(j(this,ao)),te(this,ao,void 0))},ey=function(){const t=j(this,an).getQueryCache().build(j(this,an),this.options);if(t===j(this,je))return;const n=j(this,je);te(this,je,t),te(this,Zc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},VC=function(t){Mt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(j(this,Yt))}),j(this,an).getQueryCache().notify({query:j(this,je),type:"observerResultsUpdated"})})},Wk);function CF(e,t){return Dn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Pb(e,t){return CF(e,t)||e.state.data!==void 0&&ty(e,t,t.refetchOnMount)}function ty(e,t,n){if(Dn(t.enabled,e)!==!1&&ci(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ex(e,t)}return!1}function Ob(e,t,n,r){return(e!==t||Dn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ex(e,n)}function Ex(e,t){return Dn(t.enabled,e)!==!1&&e.isStaleByTime(ci(t.staleTime,e))}function jF(e,t){return!Wg(e.getCurrentResult(),t)}var UC=m.createContext(void 0),RF=e=>{const t=m.useContext(UC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},NF=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(UC.Provider,{value:e,children:t})),BC=m.createContext(!1),AF=()=>m.useContext(BC);BC.Provider;function PF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
216var OF=m.createContext(PF()),IF=()=>m.useContext(OF),DF=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},LF=e=>{m.useEffect(()=>{e.clearReset()},[e])},MF=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||hF(n,[e.error,r])),FF=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$F=(e,t)=>e.isLoading&&e.isFetching&&!t,VF=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ib=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function UF(e,t,n){var h,f,p,y,g;const r=AF(),s=IF(),i=RF(),o=i.defaultQueryOptions(e);(f=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||f.call(h,o),o._optimisticResults=r?"isRestoring":"optimistic",FF(o),DF(o,s),LF(s);const a=!i.getQueryCache().get(o.queryHash),[l]=m.useState(()=>new t(i,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const x=d?l.subscribe(Mt.batchCalls(b)):un;return l.updateResult(),x},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),VF(o,u))throw Ib(o,l,s);if(MF({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((y=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||y.call(p,o,u),o.experimental_prefetchInRender&&!So&&$F(u,r)){const b=a?Ib(o,l,s):(g=i.getQueryCache().get(o.queryHash))==null?void 0:g.promise;b==null||b.catch(un).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function BF(e,t){return UF(e,TF)}/** 217 * @remix-run/router v1.23.0 218 * 219 * Copyright (c) Remix Software Inc. 220 * 221 * This source code is licensed under the MIT license found in the 222 * LICENSE.md file in the root directory of this source tree. 223 * 224 * @license MIT 225 */function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}var Qs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Qs||(Qs={}));const Db="popstate";function zF(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return ny("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:bh(s)}return HF(t,n,null,e)}function dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function zC(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function WF(){return Math.random().toString(36).substr(2,8)}function Lb(e,t){return{usr:e.state,key:e.key,idx:t}}function ny(e,t,n,r){return n===void 0&&(n=null),Ic({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ul(t):t,{state:n,key:t&&t.key||r||WF()})}function bh(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ul(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function HF(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Qs.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Ic({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=Qs.Pop;let b=d(),x=b==null?null:b-u;u=b,l&&l({action:a,location:g.location,delta:x})}function f(b,x){a=Qs.Push;let v=ny(g.location,b,x);u=d()+1;let w=Lb(v,u),S=g.createHref(v);try{o.pushState(w,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(S)}i&&l&&l({action:a,location:g.location,delta:1})}function p(b,x){a=Qs.Replace;let v=ny(g.location,b,x);u=d();let w=Lb(v,u),S=g.createHref(v);o.replaceState(w,"",S),i&&l&&l({action:a,location:g.location,delta:0})}function y(b){let x=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof b=="string"?b:bh(b);return v=v.replace(/ $/,"%20"),dt(x,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,x)}let g={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");
vendor: 2,650 bytes, line 225
225return s.addEventListener(Db,h),l=b,()=>{s.removeEventListener(Db,h),l=null}},createHref(b){return t(s,b)},createURL:y,encodeLocation(b){let x=y(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:p,go(b){return o.go(b)}};return g}var Mb;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Mb||(Mb={}));function qF(e,t,n){return n===void 0&&(n="/"),KF(e,t,n,!1)}function KF(e,t,n,r){let s=typeof t=="string"?ul(t):t,i=Tx(s.pathname||"/",n);if(i==null)return null;let o=WC(e);GF(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=i$(i);a=r$(o[l],u,r)}return a}function WC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(dt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=ui([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(dt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),WC(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:t$(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of HC(i.path))s(i,o,l)}),t}function HC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=HC(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function GF(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:n$(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const YF=/^:[\w-]+$/,XF=3,JF=2,QF=1,ZF=10,e$=-2,Fb=e=>e==="*";function t$(e,t){let n=e.split("/"),r=n.length;return n.some(Fb)&&(r+=e$),t&&(r+=JF),n.filter(s=>!Fb(s)).reduce((s,i)=>s+(YF.test(i)?XF:i===""?QF:ZF),r)}function n$(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function r$(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=$b({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=$b({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;
vendor: 6,834 bytes, lines 225-234
225Object.assign(s,h.params),o.push({params:s,pathname:ui([i,h.pathname]),pathnameBase:c$(ui([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=ui([i,h.pathnameBase]))}return o}function $b(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=s$(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let g=a[h]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=a[h];return p&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function s$(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zC(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function i$(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zC(!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 Tx(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function o$(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?ul(e):e;return{pathname:n?n.startsWith("/")?n:a$(n,t):t,search:u$(r),hash:d$(s)}}function a$(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Qp(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function l$(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cx(e,t){let n=l$(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function jx(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=ul(e):(s=Ic({},e),dt(!s.pathname||!s.pathname.includes("?"),Qp("?","pathname","search",s)),dt(!s.pathname||!s.pathname.includes("#"),Qp("#","pathname","hash",s)),dt(!s.search||!s.search.includes("#"),Qp("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}a=h>=0?t[h]:"/"}let l=o$(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const ui=e=>e.join("/").replace(/\/\/+/g,"/"),c$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),u$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,d$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function h$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const qC=["post","put","patch","delete"];new Set(qC);const f$=["get",...qC];new Set(f$);/** 226 * React Router v6.30.1 227 * 228 * Copyright (c) Remix Software Inc. 229 * 230 * This source code is licensed under the MIT license found in the 231 * LICENSE.md file in the root directory of this source tree. 232 * 233 * @license MIT 234 */function Dc(){return Dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dc.apply(this,arguments)}const Rx=m.createContext(null),p$=m.createContext(null),Ti=m.createContext(null),Rf=m.createContext(null),Ci=m.createContext({outlet:null,matches:[],isDataRoute:!1}),KC=m.createContext(null);function m$(e,t){let{relative:n}=t===void 0?{}:t;dl()||dt(!1);let{basename:r,navigator:s}=m.useContext(Ti),{hash:i,pathname:o,search:a}=YC(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:ui([r,o])),s.createHref({pathname:l,search:a,hash:i})}function dl(){return m.useContext(Rf)!=null}function Po(){return dl()||dt(!1),m.useContext(Rf).location}function GC(e){m.useContext(Ti).static||m.useLayoutEffect(e)}function du(){let{isDataRoute:e}=m.useContext(Ci);return e?j$():g$()}function g$(){dl()||dt(!1);let e=m.useContext(Rx),{basename:t,future:n,navigator:r}=m.useContext(Ti),{matches:s}=m.useContext(Ci),{pathname:i}=Po(),o=JSON.stringify(Cx(s,n.v7_relativeSplatPath)),a=m.useRef(!1);return GC(()=>{a.current=!0}),m.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let h=jx(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ui([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,i,e])}function YC(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(Ti),{matches:s}=m.useContext(Ci),{pathname:i}=Po(),o=JSON.stringify(Cx(s,r.v7_relativeSplatPath));return m.useMemo(()=>jx(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function y$(e,t){return v$(e,t)}function v$(e,t,n,r){dl()||dt(!1);let{navigator:s}=m.useContext(Ti),{matches:i}=m.useContext(Ci),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Po(),d;if(t){var h;let b=typeof t=="string"?ul(t):t;l==="/"||(h=b.pathname)!=null&&h.startsWith(l)||dt(!1),d=b}else d=u;let f=d.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=qF(e,{pathname:p}),g=k$(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:ui([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:ui([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&g?m.createElement(Rf.Provider,{value:{location:Dc({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Qs.Pop}},g):g}function x$(){let e=C$(),t=h$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application
234Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,null)}const w$=m.createElement(x$,null);class b$ extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(Ci.Provider,{value:this.props.routeContext},m.createElement(KC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function S$(e){let{routeContext:t,match:n,children:r}=e,s=m.useContext(Rx);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(Ci.Provider,{value:t},r)}function k$(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);d>=0||dt(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:p}=n,y=h.route.loader&&f[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||y){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let p,y=!1,g=null,b=null;n&&(p=a&&h.route.id?a[h.route.id]:void 0,g=h.route.errorElement||w$,l&&(u<0&&f===0?(y=!0,b=null):u===f&&(y=!0,b=h.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,f+1)),v=()=>{let w;return p?w=g:y?w=b:h.route.Component?w=m.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,m.createElement(S$,{match:h,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?m.createElement(b$,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:v(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):v()},null)}var XC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(XC||{}),Sh=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}(Sh||{});function _$(e){let t=m.useContext(Rx);return t||dt(!1),t}function E$(e){let t=m.useContext(p$);return t||dt(!1),t}function T$(e){let t=m.useContext(Ci);return t||dt(!1),t}function JC(e){let t=T$(),n=t.matches[t.matches.length-1];return n.route.id||dt(!1),n.route.id}function C$(){var e;let t=m.useContext(KC),n=E$(Sh.UseRouteError),r=JC(Sh.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function j$(){let{router:e}=_$(XC.UseNavigateStable),t=JC(Sh.UseNavigateStable),n=m.useRef(!1);return GC(()=>{n.current=!0}),m.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Dc({fromRouteId:t},i)))},[e,t])}function R$(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function N$(e){let{to:t,replace:n,state:r,relative:s}=e;dl()||dt(!1);let{future:i,static:o}=m.useContext(Ti),{matches:a}=m.useContext(Ci),{pathname:l}=Po(),u=du(),d=jx(t,Cx(a,i.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(d);return m.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:s}),[u,h,s,n,r]),null}function zt(e){dt(!1)}function A$(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Qs.Pop,navigator:i,static:o=!1,future:a}=e;dl()&&dt(!1);let l=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:l,navigator:i,static:o,future:Dc({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=ul(r));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:y="default"}=r,g=m.useMemo(()=>{let b=Tx(d,l);return b==null?null:{location:{pathname:b,search:h,hash:f,state:p,key:y},navigationType:s}},[l,d,h,f,p,y,s]);return g==null?null:m.createElement(Ti.Provider,{value:u},m.createElement(Rf.Provider,{children:n,value:g}))}function P$(e){let{children:t,location:n}=e;return y$(ry(t),n)}new Promise(()=>{});
234function ry(e,t){t===void 0&&(t=[]);let n=[];return m.Children.forEach(e,(r,s)=>{if(!m.isValidElement(r))return;let i=[...t,s];if(r.type===m.Fragment){n.push.apply(n,ry(r.props.children,i));return}r.type!==zt&&dt(!1),!r.props.index||!r.props.children||dt(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ry(r.props.children,i)),n.push(o)}),n}/** 235 * React Router DOM v6.30.1 236 * 237 * Copyright (c) Remix Software Inc. 238 * 239 * This source code is licensed under the MIT license found in the 240 * LICENSE.md file in the root directory of this source tree. 241 * 242 * @license MIT 243 */function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sy.apply(this,arguments)}function O$(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function I$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function D$(e,t){return e.button===0&&(!t||t==="_self")&&!I$(e)}const L$=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],M$="6";try{window.__reactRouterVersion=M$}catch{}const F$="startTransition",Vb=pv[F$];function $$(e){let{basename:t,children:n,future:r,window:s}=e,i=m.useRef();i.current==null&&(i.current=zF({window:s,v5Compat:!0}));let o=i.current,[a,l]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=m.useCallback(h=>{u&&Vb?Vb(()=>l(h)):l(h)},[l,u]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>R$(r),[r]),m.createElement(A$,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const V$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",U$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ko=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:h}=t,f=O$(t,L$),{basename:p}=m.useContext(Ti),y,g=!1;if(typeof u=="string"&&U$.test(u)&&(y=u,V$))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),k=Tx(S.pathname,p);S.origin===w.origin&&k!=null?u=k+S.search+S.hash:g=!0}catch{}let b=m$(u,{relative:s}),x=B$(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:h});function v(w){r&&r(w),w.defaultPrevented||x(w)}return m.createElement("a",sy({},f,{href:y||b,onClick:g||i?r:v,ref:n,target:l}))});var Ub;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ub||(Ub={}));var Bb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bb||(Bb={}));function B$(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=du(),u=Po(),d=YC(e,{relative:o});return m.useCallback(h=>{if(D$(h,n)){h.preventDefault();let f=r!==void 0?r:bh(u)===bh(d);l(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,d,r,s,n,e,i,o,a])}function z$(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}const W$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Nx extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class H$ extends Nx{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class zb extends Nx{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Wb extends Nx{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var iy;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(iy||(iy={}));class q${constructor(t,{headers:n={},customFetch:r,region:s=iy.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=W$(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return z$(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:d,timeout:h}=r;let f={},{region:p}=r;p||(p=this.region);const y=new URL(`${this.url}/${n}`);p&&p!=="any"&&(f["x-region"]=p,y.searchParams.set("forceFunctionRegion",p));let g;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(f["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(f["Content-Type"]="application/json",g=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?g=JSON.stringify(u):g=u;let b=d;h&&(o=new AbortController,i=setTimeout(()=>
243o.abort(),h),d?(b=o.signal,d.addEventListener("abort",()=>o.abort())):b=o.signal);const x=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:g,signal:b}).catch(k=>{throw new H$(k)}),v=x.headers.get("x-relay-error");if(v&&v==="true")throw new zb(x);if(!x.ok)throw new Wb(x);let w=((s=x.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return w==="application/json"?S=yield x.json():w==="application/octet-stream"||w==="application/pdf"?S=yield x.blob():w==="text/event-stream"?S=x:w==="multipart/form-data"?S=yield x.formData():S=yield x.text(),{data:S,error:null,response:x}}catch(a){return{data:null,error:a,response:a instanceof Wb||a instanceof zb?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const QC=3,Hb=e=>Math.min(1e3*2**e,3e4),K$=[520,503],ZC=["GET","HEAD","OPTIONS"];var G$=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function qb(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function Y$(e,t,n,r){return!(!r||n>=QC||!ZC.includes(e)||!K$.includes(t))}var X$=class{constructor(e){var t,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const u=new Headers(n.headers);o>0&&u.set("X-Retry-Count",String(o));let d;try{d=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(h,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!ZC.includes(n.method))throw h;if(n.retryEnabled&&o<QC){const f=Hb(o);o++,await qb(f,n.signal);continue}throw h}if(Y$(n.method,d.status,o,n.retryEnabled)){var a,l;const h=(a=(l=d.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:Hb(o);await d.text(),o++,await qb(f,n.signal);continue}return await n.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",d="";const h=o==null?void 0:o.cause;if(h){var f,p,y,g;const v=(f=h==null?void 0:h.message)!==null&&f!==void 0?f:"",w=(p=h==null?void 0:h.code)!==null&&p!==void 0?p:"";l=`${(y=o==null?void 0:o.name)!==null&&y!==void 0?y:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 244 245Caused by: ${(g=h==null?void 0:h.name)!==null&&g!==void 0?g:"Error"}: ${v}`,w&&(l+=` (${w})`),h!=null&&h.stack&&(l+=` 246${h.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const x=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${x} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(u+=`. Your request URL is ${x} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:d},data:null,count:null,status:0,statusText:""}}
246)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?r=f:r=JSON.parse(f))}const d=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),h=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&h&&h.length>1&&(s=parseInt(h[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const d=await e.text();try{n=JSON.parse(d),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,o="OK")}catch{e.status===404&&d===""?(i=204,o="No Content"):n={message:d}}if(n&&t.shouldThrowOnError)throw new G$(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},J$=class extends X${select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Kb=new RegExp("[,()]");var Go=class extends J${eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Kb.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Kb.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
246n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},Q$=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new Go({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
2460){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new Go({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);a.searchParams.set("columns",d.join(","))}}return new Go({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Go({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Go({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Lc(e){"@babel/helpers - typeof";return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(e)}function Z$(e,t){if(Lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Lc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e3(e){var t=Z$(e,"string");return Lc(t)=="symbol"?t:t+""}function t3(e,t,n){return(t=e3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ku(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gb(Object(n),!0).forEach(function(r){t3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var n3=class ej{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,d)=>{const h=new AbortController,f=setTimeout(()=>h.abort(),i),p=d==null?void 0:d.signal;if(p){if(p.aborted)return clearTimeout(f),l(u,d);const y=()=>{clearTimeout(f),h.abort()};return p.addEventListener("abort",y,{once:!0}),l(u,Ku(Ku({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(f),p.removeEventListener("abort",y)})}return l(u,Ku(Ku({},d),{},{signal:h.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Q$(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new ej(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),h=r&&Object.values(n).some(d);h?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([p,y])=>y!==void 0).map(([p,y])=>[p,Array.isArray(y)?`{${y.join(",")}}`:`${y}
246`]).forEach(([p,y])=>{l.searchParams.append(p,y)})):(a="POST",u=n);const f=new Headers(this.headers);return h?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Go({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class r3{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 247import ws from "ws" 248new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 249 250Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const s3="2.105.4",i3=`realtime-js/${s3}`,o3="1.0.0",tj="2.0.0",a3=tj,l3=1e4,c3=100,Vs={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},nj={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},oy={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class u3{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+h.length,p=new ArrayBuffer(this.HEADER_LENGTH+f);let y=new DataView(p),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,l.length),y.setUint8(g++,a.length),y.setUint8(g++,o.length),y.setUint8(g++,u.length),y.setUint8(g++,h.length),y.setUint8(g++,n),Array.from(l,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(a,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(o,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(u,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(h,x=>y.setUint8(g++,x.charCodeAt(0)));var b=new Uint8Array(p.byteLength+r.byteLength);return b.set(new Uint8Array(p),0),b.set(new Uint8Array(r),p.byteLength),b.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;
250return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const u=r.decode(t.slice(l,l+s));l=l+s;const d=r.decode(t.slice(l,l+i));l=l+i;const h=r.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),p=a===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,y={type:this.BROADCAST_EVENT,event:d,payload:p};return o>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var He;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(He||(He={}));const Yb=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=d3(o,e,t,s),i),{}):{}},d3=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?rj(i,o):ay(o)},rj=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return m3(t,n)}switch(e){case He.bool:return h3(t);case He.float4:case He.float8:case He.int2:case He.int4:case He.int8:case He.numeric:case He.oid:return f3(t);case He.json:case He.jsonb:return p3(t);case He.timestamp:return g3(t);case He.abstime:case He.date:case He.daterange:case He.int4range:case He.int8range:case He.money:case He.reltime:case He.text:case He.time:case He.timestamptz:case He.timetz:case He.tsrange:case He.t
vendor: 4,948 bytes, line 250
250stzrange:return ay(t);default:return ay(t)}},ay=e=>e,h3=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},f3=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},p3=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},m3=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>rj(t,a))}return e},g3=e=>typeof e=="string"?e.replace(" ","T"):e,sj=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var sc=e=>typeof e=="function"?e:function(){return e},y3=typeof self<"u"?self:null,Yo=typeof window<"u"?window:null,Pr=y3||Yo||globalThis,v3="2.0.0",x3=1e4,w3=1e3,Lr={connecting:0,open:1,closing:2,closed:3},sn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},is={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ly={longpoll:"longpoll",websocket:"websocket"},b3={complete:4},cy="base64url.bearer.phx.",Gu=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},ij=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},S3=class{constructor(e,t,n){this.state=sn.closed,this.topic=e,this.params=sc(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Gu(this,is.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new ij(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=sn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=sn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=sn.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=sn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Gu(this,is.leave,sc({}),this.timeout).send(),this.state=sn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(is.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 250
250teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=sn.closed,this.bindings=[]}onClose(e){this.on(is.close,e)}onError(e){return this.on(is.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Gu(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=sn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(is.close,"leave")},n=new Gu(this,is.leave,sc({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=sn.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===sn.closed}isErrored(){return this.state===sn.errored}isJoined(){return this.state===sn.joined}isJoining(){return this.state===sn.joining}isLeaving(){return this.state===sn.leaving}},kh=class{static request(e,t,n,r,s,i,o){if(Pr.XDomainRequest){let a=new Pr.XDomainRequest;return this.xdomainRequest(a,e,t,r,s,i,o)}else if(Pr.XMLHttpRequest){let a=new Pr.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,s,i,o)}else{if(Pr.fetch&&Pr.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let a={method:e,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Pr.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,a){e.open(t,n,!0),e.timeout=i;for(let[l,u]of Object.entries(r))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===b3.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},k3=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},Lo=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(cy)&&(this.authToken=atob(t[1].slice(cy.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Lr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+ly.websocket),"$1/"+ly.longpoll)}endpointURL(){return kh.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Lr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Lr.open||this.readyState===Lr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Lr.open,this.onopen({}),this.poll();break;
250case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=k3(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 251`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=Lr.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=kh.request(e,this.endpointURL(),t,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},_3=class Vl{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Vl.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Vl.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Vl.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Vl.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),o={},a={};return this.map(i,(l,u)=>{n[l]||(a[l]=u)}),this.map(n,(l,u)=>{let d=i[l];if(d){let h=u.metas.map(g=>g.phx_ref),f=d.metas.map(g=>g.phx_ref),p=u.metas.filter(g=>f.indexOf(g.phx_ref)<0),y=d.metas.filter(g=>h.indexOf(g.phx_ref)<0);p.length>0&&(o[l]=u,o[l].metas=p),y.length>0&&(a[l]=this.clone(d),a[l].metas=y)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let d=t[a].metas.map(f=>f.phx_ref),h=u.metas.filter(f=>d.indexOf(f.phx_ref)<0);t[a].metas.unshift(...h)}r(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let d=l.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Yu={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,n.length),l.setUint8(u++,s.length),l.setUint8(u++,r.length),Array.from(t,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(a.byteLength+i.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(i),a.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 8,485 bytes, line 251
251,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+s));o=o+s;let u=n.decode(e.slice(o,o+i));o=o+i;let d=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:d}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(a,a+r));a=a+r;let u=n.decode(e.slice(a,a+s));a=a+s;let d=n.decode(e.slice(a,a+i));a=a+i;let h=n.decode(e.slice(a,a+o));a=a+o;let f=e.slice(a,e.byteLength),p={status:h,response:f};return{join_ref:l,ref:u,topic:d,event:is.reply,payload:p}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let a=n.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},E3=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||x3,this.transport=t.transport||Pr.WebSocket||Lo,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Pr&&Pr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Yu.encode.bind(Yu),this.defaultDecoder=Yu.decode.bind(Yu),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Lo?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Yo&&Yo.addEventListener&&(Yo.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Yo.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),Yo.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=sc(t.params||{}),this.endPoint=`${e}/${ly.websocket}`,this.vsn=t.vsn||v3,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new ij(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Lo}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=kh.appendParams(kh.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=sc(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Lo?this.connectWithFallback(Lo,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Lo:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${cy}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),w3,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Lr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 251
251triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(is.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Lr.connecting:return"connecting";case Lr.open:return"open";case Lr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new S3(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class ic{constructor(t,n){const r=C3(n);this.presence=new _3(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=ic.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=ic.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return ic.transformState(this.presence.state)}static transformState(t){return t=T3(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=Pd(s),n},{})}static onJoinPayload(t,n,r){const s=Xb(n),i=Pd(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=Xb(n),i=Pd(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function Pd(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function T3(e){return JSON.parse(JSON.stringify(e))}function C3(e){return(e==null?void 0:e.events)&&{events:e.events}}function Xb(e){return e!=null&&e.metas?Pd(e):[]}var Jb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Jb||(Jb={}));class j3{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new ic(this.channel.channelAdapter,n)}}function R3(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
251if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class N3{constructor(t,n,r){const s=A3(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>c3){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Vs.joined}isJoined(){return this.state===Vs.joined}isJoining(){return this.state===Vs.joining}isClosed(){return this.state===Vs.closed}
251isLeaving(){return this.state===Vs.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function A3(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Qb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Qb||(Qb={}));var ha;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ha||(ha={}));var os;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(os||(os={}));class oc{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new N3(this.socket.socketAdapter,t,this.params),this.presence=new j3(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=sj(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[ha.PRESENCE]&&this.bindings[ha.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(os.CHANNEL_ERROR,R3(p))}),this._onClose(()=>t==null?void 0:t(os.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(os.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}).receive("error",p=>{this.state=Vs.errored;const y=Object.values(p).join(", ")||"error";t==null||t(os.CHANNEL_ERROR,new Error(y,{cause:p}))}).receive("timeout",()=>{t==null||t(os.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:d,table:h,filter:f}}=l,p=t&&t[a];if(p&&p.event===u&&oc.isFilterValueEqual(p.schema,d)&&oc.isFilterValueEqual(p.table,h)&&oc.isFilterValueEqual(p.filter,f))o.push(Object.assign(Object.assign({},l),{id:p.id}));else{this.unsubscribe(),this.state=Vs.errored,n==null||n(os.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Vs.errored&&n&&n(os.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===ha.PRESENCE||t===ha.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
251try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,a,l,u,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,r))return!1;const f=(s=this.bindings[h])===null||s===void 0?void 0:s.find(p=>p.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in f){const p=f.id,y=(i=f.filter)===null||i===void 0?void 0:i.event;return p&&((o=n.ids)===null||o===void 0?void 0:o.includes(p))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const p=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((d=n==null?void 0:n.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=nj;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Yb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Yb(t.columns,t.old_record)),n}}class P3{constructor(t,n){this.socket=new E3(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==oy.connecting}isDisconnecting(){return this.socket.connectionState()==oy.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Zb={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},O3=[1e3,2e3,5e3,1e4],I3=1e4;function D3(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function L3(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return D3()}const M3=` 252 addEventListener("message", (e) => { 253 if (e.data.event === "start") { 254 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 255 } 256 });`;class F3{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
256,this.ref=0,this.serializer=new u3,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new P3(t,s),this.httpEndpoint=sj(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n} 257 258To use Realtime in Node.js, you need to provide a WebSocket implementation: 259 260Option 1: Use Node.js 22+ which has native WebSocket support 261Option 2: Install and provide the "ws" package: 262 263 npm install ws 264 265 import ws from "ws" 266 const client = new RealtimeClient(url, { 267 ...options, 268 transport: ws 269 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||oy.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new oc(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
269this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:i3};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(nj.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([M3],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,a,l,u,d,h,f,p;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const y={};y.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:l3,y.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:Zb.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Zb.HEARTBEAT_INTERVAL),y.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:r3.getWebSocketConstructor(),y.params=t==null?void 0:t.params,y.logger=t==null?void 0:t.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),y.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:L3(),y.reconnectAfterMs=(d=t==null?void 0:t.reconnectAfterMs)!==null&&d!==void 0?d:v=>O3[v-1]||I3;let g,b;const x=(h=t==null?void 0:t.vsn)!==null&&h!==void 0?h:a3;switch(x){case o3:g=(v,w)=>w(JSON.stringify(v)),b=(v,w)=>w(JSON.parse(v));break;case tj:g=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=x,y.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:g,y.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:b,y.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,y.params=Object.assign(Object.assign({},y.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
269var Mc=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function $3(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function V3(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function U3(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=$3(e.baseUrl,r,s),l=await V3(e.auth),u=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const p=h?f:void 0,y=p==null?void 0:p.error;throw new Mc((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:p})}return{status:u.status,headers:u.headers,data:f}}}}function Xu(e){return e.join("�")}var B3=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Xu(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}
269/namespaces/${Xu(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Xu(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Xu(e.namespace)}`}),!0}catch(t){if(t instanceof Mc&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Mc&&n.status===409)return;throw n}}};function Mo(e){return e.join("�")}var z3=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Mo(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Mo(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Mo(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Mo(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Mo(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Mo(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Mc&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Mc&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},W3=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=U3({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new B3(this.client,t),this.tableOps=new z3(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Fc(e){"@babel/helpers - typeof";return Fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fc(e)}function H3(e,t){if(Fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q3(e){var t=H3(e,"string");return Fc(t)=="symbol"?t:t+""}function K3(e,t,n){return(t=q3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
269t%2?eS(Object(n),!0).forEach(function(r){K3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Nf=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Af(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var uy=class extends Nf{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return de({},super.toJSON())}},oj=class extends Nf{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function _h(e,t,n){const r=de({},e),s=t.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function G3(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const Y3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),X3=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},dy=e=>{if(Array.isArray(e))return e.map(n=>dy(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=dy(r)}),t},J3=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),tS=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},Q3=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new uy(tS(o),i,a,r))}).catch(()=>{const o=i+"";t(new uy(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new oj(tS(e),e,r))},Z3=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return de(de({},s),n);if(X3(r)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=_h(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),de(de({},s),n)};async function Rl(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,Z3(t,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>Q3(u,l,r,o))})}function aj(e="storage"){return{get:async(t,n,r,s)=>Rl(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>Rl(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>Rl(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>Rl(t,"HEAD",n,de(de({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>Rl(t,"DELETE",n,s,i,r,e)}}const eV=aj("storage"),{get:$c,post:or,put:hy,head:tV,remove:Ax}=eV,bn=aj("vectors");var hl=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=G3(t),this.fetch=Y3(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=_h(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Af(n))return{data:null,error:n};throw n}}},nV=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Af(t))return{data:null,error:t};throw t}}};let lj;lj=Symbol.toStringTag;var rV=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[lj]="BlobDownloadBuilder",this.promise=null}asStream(){return new nV(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Af(t))return{data:null,error:t};throw t}}};const sV={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},nS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var iV=class extends hl{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=de(de({},nS),r);let a=de(de({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))a=_h(a,f,p);const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?hy:or)(s.fetch,`${s.url}/object/${d}`,i,de({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=de(de({},nS),r);let d=de(de({},s.headers),{"x-upsert":String(u.upsert)});const h=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),h&&l.append("metadata",s.encodeMetadata(h)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),h&&!l.has("metadata")&&l.a
269ppend("metadata",s.encodeMetadata(h))):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,h&&(d["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))d=_h(d,f,p);return{path:i,fullPath:(await hy(s.fetch,a.toString(),l,de({headers:d},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=de({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await or(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Nf("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await or(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
269stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await or(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await or(r.fetch,`${r.url}/object/sign/${s}`,de({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await or(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>de(de({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>$c(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new rV(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>dy(await $c(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await tV(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Af(s)){var r;const i=s instanceof uy?s.status:s instanceof oj?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const s=r.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Ax(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=de(de(de({},sV),t),{},{prefix:e||""});return await or(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=de({},e);return await or(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const oV="2.105.4",hu={"X-Client-Info":`storage-js/${oV}`};var aV=class extends hl{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=de(de({},hu),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await $c(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await $c(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await or(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await hy(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await or(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ax(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},lV=class extends hl{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=de(de({},hu),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await or(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await $c(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ax(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!J3(e))throw new Nf("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new W3({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
269),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},cV=class extends hl{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=de(de({},hu),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await bn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await bn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},uV=class extends hl{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=de(de({},hu),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},dV=class extends hl{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=de(de({},hu),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await bn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},hV=class extends dV{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new fV(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},fV=class extends cV{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new pV(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
269,pV=class extends uV{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},mV=class extends aV{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new iV(this.url,this.headers,e,this.fetch)}get vectors(){return new hV(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new lV(this.url+"/iceberg",this.headers,this.fetch)}};function Pf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}const cj="2.105.4",Xo=30*1e3,fy=3,Zp=fy*Xo,gV="http://localhost:9999",yV="supabase.auth.token",vV={"X-Client-Info":`gotrue-js/${cj}`},py="X-Supabase-Api-Version",uj={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},xV=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,wV=10*60*1e3;class Vc extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function X(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class bV extends Vc{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function SV(e){return X(e)&&e.name==="AuthApiError"}class dr extends Vc{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Ss extends Vc{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class jt extends Ss{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ju(e){return X(e)&&e.name==="AuthSessionMissingError"}class Fo extends Ss{constructor(){super("Auth session or user missing","AuthInvalidToken
269ResponseError",500,void 0)}}class Qu extends Ss{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Zu extends Ss{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function kV(e){return X(e)&&e.name==="AuthImplicitGrantRedirectError"}class rS extends Ss{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class _V extends Ss{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class my extends Ss{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function em(e){return X(e)&&e.name==="AuthRetryableFetchError"}class sS extends Ss{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class gy extends Ss{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),iS=` 270\r=`.split(""),EV=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<iS.length;t+=1)e[iS[t].charCodeAt(0)]=-2;for(let t=0;t<Eh.length;t+=1)e[Eh[t].charCodeAt(0)]=t;return e})();function oS(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Eh[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Eh[r]),t.queuedBits-=6}}function dj(e,t,n){const r=EV[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function aS(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{jV(o,r,n)};for(let o=0;o<e.length;o+=1)dj(e.charCodeAt(o),s,i);return t.join("")}function TV(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function CV(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}TV(r,t)}}function jV(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Ta(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)dj(e.charCodeAt(s),n,r);return new Uint8Array(t)}function RV(e){const t=[];return CV(e,n=>t.push(n)),new Uint8Array(t)}function Gi(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>oS(s,n,r)),oS(null,n,r),t.join("")}function NV(e){return Math.round(Date.now()/1e3)+e}function AV(){return Symbol("auth-callback")}const It=()=>typeof window<"u"&&typeof document<"u",Ii={tested:!1,writable:!1},hj=()=>{if(!It())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ii.tested)return Ii.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ii.tested=!0,Ii.writable=!0}catch{Ii.tested=!0,Ii.writable=!1}return Ii.writable};function PV(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
270h((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const fj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),OV=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Jo=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Di=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Ot=async(e,t)=>{await e.removeItem(t)};class Of{constructor(){this.promise=new Of.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Of.promiseConstructor=Promise;function ed(e){const t=e.split(".");if(t.length!==3)throw new gy("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!xV.test(t[r]))throw new gy("JWT not in base64url format");return{header:JSON.parse(aS(t[0])),payload:JSON.parse(aS(t[1])),signature:Ta(t[2]),raw:{header:t[0],payload:t[1]}}}async function IV(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function DV(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function LV(e){return("0"+e.toString(16)).substr(-2)}function MV(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,LV).join("")}async function FV(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function $V(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await FV(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function $o(e,t,n=!1){const r=MV();let s=r;n&&(s+="/recovery"),await Jo(e,`${t}-code-verifier`,s);const i=await $V(r);return[i,r===i?"plain":"s256"]}const VV=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function UV(e){const t=e.headers.get(py);if(!t||!t.match(VV))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function BV(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function zV(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const WV=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ts(e){if(!WV.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function nr(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function tm(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function HV(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
270if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function lS(e){return JSON.parse(JSON.stringify(e))}const $i=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},qV=[502,503,504,520,521,522,523,524,530];async function cS(e){var t;if(!OV(e))throw new my($i(e),0);if(qV.includes(e.status))throw new my($i(e),e.status);let n;try{n=await e.json()}catch(i){throw new dr($i(i),i)}let r;const s=UV(e);if(s&&s.getTime()>=uj["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new sS($i(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new jt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new sS($i(n),e.status,n.weak_password.reasons);throw new bV($i(n),e.status||500,r)}const KV=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function se(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[py]||(i[py]=uj["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await GV(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function GV(e,t,n,r,s,i){const o=KV(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new my($i(l),0)}if(a.ok||await cS(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await cS(l)}}function An(e){var t;let n=null;JV(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=NV(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function uS(e){const t=An(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Us(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function YV(e){return{data:e,error:null}}function XV(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Pf(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function dS(e){return e}function JV(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const nm=["global","local","others"];class QV{constructor({url:t="",headers:n={},fetch:r,experimental:s}){this.url=t,this.headers=n,this.fetch=fj(r),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,n=nm[0]){if(nm.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${nm.join(", ")}`);try{return await se(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(X(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await se(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Us})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Pf(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await se(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:XV,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(X(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await se(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Us})}catch(n){if(X(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await se(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:dS});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>
2700&&(p.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(X(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){ts(t);try{return await se(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Us})}catch(n){if(X(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){ts(t);try{return await se(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Us})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){ts(t);try{return await se(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Us})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){ts(t.userId);try{const{data:n,error:r}=await se(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(X(n))return{data:null,error:n};throw n}}async _deleteFactor(t){ts(t.userId),ts(t.id);try{return{data:await se(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(X(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await se(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:dS});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(X(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await se(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await se(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await se(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(X(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await se(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(X(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await se(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await se(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await se(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await se(this.fetch,"DELET
270E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(X(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){nr(this.experimental),ts(t.userId);try{return await se(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){nr(this.experimental),ts(t.userId),ts(t.passkeyId);try{return await se(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(X(n))return{data:null,error:n};throw n}}}function hS(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Rr={debug:!!(globalThis&&hj()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class pj extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class fS extends pj{}async function ZV(e,t,n){Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new fS(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Rr.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&t>0){if(r.signal.aborted)return Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Rr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new fS(`Lock "${e}" was released because another request stole it`)}throw i}}function eU(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function mj(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function tU(e){return parseInt(e,16)}function nU(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function rU(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 271`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=mj(e.address),y=d?`${d}://${r}
271`:r,g=e.statement?`${e.statement} 272`:"",b=`${y} wants you to sign in with your Ethereum account: 273${p} 274 275${g}`;let x=`URI: ${h} 276Version: ${f} 277Chain ID: ${n}${o?` 278Nonce: ${o}`:""} 279Issued At: ${i.toISOString()}`;if(s&&(x+=` 280Expiration Time: ${s.toISOString()}`),a&&(x+=` 281Not Before: ${a.toISOString()}`),l&&(x+=` 282Request ID: ${l}`),u){let v=` 283Resources:`;for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);v+=` 284- ${w}`}x+=v}return`${b} 285${x}`}class yt extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Th extends yt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function sU({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new yt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new yt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new yt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new yt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new yt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new yt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new yt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(gj(o)){if(i.rp.id!==o)return new yt({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new yt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new yt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new yt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function iU({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new yt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(gj(r)){if(n.rpId!==r)return new yt({message:`The RP ID "${n.rpId}
285" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new yt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new yt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class oU{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const yy=new oU;function pS(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Pf(e,["challenge","user","excludeCredentials"]),i=Ta(t).buffer,o=Object.assign(Object.assign({},n),{id:Ta(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const u=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Ta(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function mS(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Pf(e,["challenge","allowCredentials"]),s=Ta(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Ta(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function gS(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Gi(new Uint8Array(e.response.attestationObject)),clientDataJSON:Gi(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function yS(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Gi(new Uint8Array(s.authenticatorData)),clientDataJSON:Gi(new Uint8Array(s.clientDataJSON)),signature:Gi(new Uint8Array(s.signature)),userHandle:s.userHandle?Gi(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function gj(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Ch(){var e,t;return!!(It()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function yj(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Th("Browser returned unexpected credential type",t)}:{data:null,error:new Th("Empty credential response",t)}}catch(t){return{data:null,error:sU({error:t,options:e})}}}async function vj(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Th("Browser returned unexpected credential type",t)}:{data:null,error:new Th("Empty credential response",t)}}
285catch(t){return{data:null,error:iU({error:t,options:e})}}}const aU={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},lU={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function jh(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];t(a)?r[i]=jh(a,o):r[i]=jh(o)}else r[i]=o}return r}function cU(e,t){return jh(aU,e,t||{})}function uU(e,t){return jh(lU,e,t||{})}class dU{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const u=s??yy.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const h=r;if(h)d.name=`${d.id}:${h}`;else{const p=(await this.client.getUser()).data.user,y=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${y}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=cU(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:f}=await yj({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const d=uU(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:f}=await vj(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(a){return X(a)?{data:null,error:a}:{data:null,error:new dr("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Vc("rpId is required for WebAuthn authentication")};try{if(!Ch())return{data:null,error:new dr("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return X(o)?{data:null,error:o}:{data:null,error:new dr("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Vc("rpId is required for WebAuthn registration")};try{if(!Ch())return{data:null,error:new dr("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return X(o)?{data:null,error:o}:{data:null,error:new dr("Unexpected error in register",o)}}}}eU();const hU={url:gV,storageKey:yV,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:vV,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};
285async function vS(e,t,n){return await n()}const Vo={};class Uc{get jwks(){var t,n;return(n=(t=Vo[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Vo[this.storageKey]=Object.assign(Object.assign({},Vo[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Vo[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Vo[this.storageKey]=Object.assign(Object.assign({},Vo[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},hU),t);if(this.storageKey=o.storageKey,this.instanceID=(n=Uc.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Uc.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&It()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(r=o.experimental)!==null&&r!==void 0?r:{},this.admin=new QV({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=fj(o.fetch),this.lock=o.lock||vS,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&It()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=ZV:this.lock=vS,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new dU(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:hj()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=hS(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=hS(this.memoryStorage)),It()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${cj}
285) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(It()&&(n=PV(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),It()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),kV(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return X(n)?this._returnResult({error:n}):this._returnResult({error:new dr("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:An}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:d,password:h,options:f}=t;let p=null,y=null;this.flowType==="pkce"&&([p,y]=await $o(this.storage,this.storageKey)),i=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:y},xform:An})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:An})}else throw new Qu("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ot(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:uS})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:uS})}else throw new Qu("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new Fo;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,u,d,h,f;let p,y;if("message"in t)p=t.message,y=t.signature;else{const{chain:g,wallet:b,statement:x,options:v}=t;let w;if(It())if(typeof b=="object")w=b;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")w=N.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=b}const S=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href),k=await w.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=mj(k[0]);let E=(r=v==null?void 0:v.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const N=await w.request({method:"eth_chainId"});E=tU(N)}const C={domain:S.host,address:_,statement:x,uri:S.href,version:"1",chainId:E,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=rU(C),y=await w.request({method:"personal_sign",params:[nU(p),_]})}try{const{data:g,error:b}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:y}
285,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:An});if(b)throw b;if(!g||!g.session||!g.user){const x=new Fo;return this._returnResult({data:{user:null,session:null},error:x})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:b})}catch(g){if(X(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var n,r,s,i,o,a,l,u,d,h,f,p;let y,g;if("message"in t)y=t.message,g=t.signature;else{const{chain:b,wallet:x,statement:v,options:w}=t;let S;if(It())if(typeof x=="object")S=x;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))S=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=x}const k=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const _=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),v?{statement:v}:null));let E;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")E=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)E=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)y=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),g=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${k.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 286`);const _=await S.signMessage(new TextEncoder().encode(y),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=_}}try{const{data:b,error:x}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Gi(g)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:An});if(x)throw x;if(!b||!b.session||!b.user){const v=new Fo;return this._returnResult({data:{user:null,session:null},error:v})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:x})}catch(b){if(X(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const n=await Di(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new _V;const{data:i,error:o}=await se(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:An});if(await Ot(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Fo;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),X(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:An}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new Fo;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await $o(this.storage,this.storageKey));const{error:h}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:d}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new Qu("You must provide either an email or phone number.")}catch(a){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),X(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await se(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:An});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(X(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await $o(this.storage,this.storageKey));const u=await se(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:YV});return!((i=u.data)===null||i===void 0)&&i.url&&It()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),X(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new jt;const{error:s}=await se(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(X(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await se(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await se(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new Qu("You must provide either an email or phone number and a type")}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Di(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
286id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Zp:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Di(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=tm()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=HV(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Us}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new jt}:await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Us})})}catch(n){if(X(n))return Ju(n)&&(await this._removeSession(),await Ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new jt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await $o(this.storage,this.storageKey));const{data:u,error:d}=await se(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Us});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),X(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new jt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=ed(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(X(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new jt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;try{if(!It())throw new Zu("No browser detected.");
286if(t.error||t.error_description||t.error_code)throw new Zu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new rS("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Zu("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new rS("No code detected.");const{data:w,error:S}=await this._exchangeCodeForSession(t.code);if(S)throw S;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:w.session,redirectType:(r=w.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:u,token_type:d}=t;if(!o||!l||!a||!d)throw new Zu("No session defined in URL");const h=Math.round(Date.now()/1e3),f=parseInt(l);let p=h+f;u&&(p=parseInt(u));const y=p-h;y*1e3<=Xo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${f}s`);const g=p-f;h-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,p,h):h-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,p,h);const{data:b,error:x}=await this._getUser(o);if(x)throw x;const v={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:p,refresh_token:a,token_type:d,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(s){if(X(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Di(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!Ju(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(SV(a)&&(a.status===404||a.status===401||a.status===403)||Ju(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=AV(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),Ju(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await $o(this.storage,this.storageKey,!0));try{return await se(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),X(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,u,d;const{data:h,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await se(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return It()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(X(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
286if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:d}=t,h=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:An}),{data:f,error:p}=h;return p?this._returnResult({data:{user:null,session:null},error:p}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Fo}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:p}))}catch(s){if(await Ot(this.storage,`${this.storageKey}-code-verifier`),X(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await se(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await DV(async s=>(s>
2860&&await IV(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await se(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:An})),(s,i)=>{const o=200*Math.pow(2,s);return i&&em(i)&&Date.now()+o-r<Xo})}catch(r){if(this._debug(n,"error",r),X(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),It()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Di(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Di(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Jo(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:tm()}else if(s&&!s.user&&!s.user){const o=await Di(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ot(this.storage,this.storageKey+"-user"),await Jo(this.storage,this.storageKey,s)):s.user=tm()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Zp;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Zp}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),em(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new jt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Of;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new jt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),X(i)){const o={data:null,error:i};return em(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ot(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Jo(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=lS(s);await Jo(this.storage,this.storageKey,i)}else{const s=lS(n);await Jo(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ot(this.storage,this.storageKey),await Ot(this.storage,this.storageKey+"-code-verifier"),await Ot(this.storage,this.storageKey+"-user"),this.userStorage&&await Ot(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&It()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
286catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Xo);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/Xo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Xo}ms, refresh threshold is ${fy} ticks`),s<=fy&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof pj)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!It()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await $o(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await se(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await se(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?gS(t.webauthn.credential_response):yS(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await se(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await se(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:pS(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:mS(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:p}=ed(t);let y=null;p.aal&&(y=p.aal);let g=y;const{data:{user:b},error:x}=await this.getUser(t);if(x)return this._returnResult({data:null,error:x});((r=(n=b==null?void 0:b.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(g="aal2");const w=p.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:w},error:null}}catch(p){if(X(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:a}
286=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=ed(o.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await se(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new jt})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new jt});const o=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&It()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new jt});const o=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&It()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await se(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new jt})})}catch(t){if(X(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await se(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new jt})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+wV>s)return r;const{data:i,error:o}=await se(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:y}
286=await this.getSession();if(y||!p.session)return this._returnResult({data:null,error:y});r=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=ed(r);n!=null&&n.allowExpired||BV(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const d=zV(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,RV(`${a}.${l}`)))throw new gy("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,s;nr(this.experimental);try{if(!Ch())return this._returnResult({data:null,error:new dr("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=mS(i.options),l=(s=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:yy.createNewAbortSignal(),{data:u,error:d}=await vj({publicKey:a,signal:l});if(d||!u)return this._returnResult({data:null,error:d??new dr("WebAuthn ceremony failed",null)});const h=yS(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:h})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var n,r;nr(this.experimental);try{if(!Ch())return this._returnResult({data:null,error:new dr("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=pS(s.options),a=(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:yy.createNewAbortSignal(),{data:l,error:u}=await yj({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new dr("WebAuthn ceremony failed",null)});const d=gS(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:d})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){nr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new jt});const{data:s,error:i}=await se(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(X(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){nr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new jt});const{data:i,error:o}=await se(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;nr(this.experimental);try{const{data:r,error:s}=await se(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){nr(this.experimental);try{const{data:n,error:r}=await se(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:An});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){nr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new jt});const{data:s,error:i}=await se(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(X(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){nr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new jt});const{data:i,error:o}=await se(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){nr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new jt});const{error:i}
286=await se(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}}Uc.nextInstanceID={};const fU=Uc,pU="2.105.4";let Ul="";typeof Deno<"u"?Ul="deno":typeof document<"u"?Ul="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ul="react-native":Ul="node";const mU={"X-Client-Info":`supabase-js-${Ul}/${pU}`},gU={headers:mU},yU={schema:"public"},vU={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},xU={};function Bc(e){"@babel/helpers - typeof";return Bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bc(e)}function wU(e,t){if(Bc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bU(e){var t=wU(e,"string");return Bc(t)=="symbol"?t:t+""}function SU(e,t,n){return(t=bU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xS(Object(n),!0).forEach(function(r){SU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const kU=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),_U=()=>Headers,EU=(e,t,n)=>{const r=kU(n),s=_U();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(i,ot(ot({},o),{},{headers:u}))}};function TU(e){return e.endsWith("/")?e:e+"/"}function CU(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:u,realtime:d,global:h}=t,f={db:ot(ot({},l),s),auth:ot(ot({},u),i),realtime:ot(ot({},d),o),storage:{},global:ot(ot(ot({},h),a),{},{headers:ot(ot({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function jU(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(TU(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var RU=class extends fU{constructor(e){super(e)}},NU=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=jU(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:yU,realtime:xU,auth:ot(ot({},vU),{},{storageKey:o}),global:gU},l=CU(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=EU(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(ot({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new n3(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new mV(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new q$(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
286channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:d,lockAcquireTimeout:h,skipAutoInitialize:f},p,y){const g={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new RU({url:this.authUrl.href,headers:ot(ot({},g),p),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:d,fetch:y,lockAcquireTimeout:h,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new F3(this.realtimeUrl.href,ot(ot({},e),{},{params:ot(ot({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const xj=(e,t,n)=>new NU(e,t,n);function AU(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}AU()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");let td=null,Uo=null;function PU(){return"https://ussdotrdzglbfisttrmp.supabase.co"}function OU(){return"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVzc2RvdHJkemdsYmZpc3R0cm1wIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzAyMDE5NTksImV4cCI6MjA4NTc3Nzk1OX0.sSb88SZEARSS4h0ngAdJ2l4tWMIRa53gf-2r_TkjLtM"}function wj(){if(td)return td;if(Uo)throw Uo;const e=PU(),t=OU();if(!e)throw Uo=new Error("Backend URL is missing (VITE_SUPABASE_URL / VITE_SUPABASE_PROJECT_ID)."),Uo;if(!t)throw Uo=new Error("Backend key is missing (VITE_SUPABASE_PUBLISHABLE_KEY)."),Uo;return td=xj(e,t,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),td}const bj=m.createContext(void 0),Px=()=>{const e=m.useContext(bj);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},IU=({children:e})=>{const[t,n]=m.useState(null),[r,s]=m.useState(null),[i,o]=m.useState(!1),[a,l]=m.useState(!0),u=m.useMemo(()=>{try{return wj()}catch(p){return console.error("Backend client init failed:",p),null}},[]),d=async p=>{if(!u)return!1;try{const{data:y,error:g}=await u.rpc("has_role",{_user_id:p,_role:"admin"});return g?(console.error("Error checking admin role:",g),!1):y===!0}catch(y){return console.error("Error checking admin role:",y),!1}};m.useEffect(()=>{if(!u){l(!1);return}const{data:{subscription:p}}=u.auth.onAuthStateChange(async(y,g)=>{s(g),n((g==null?void 0:g.user)??null),g!=null&&g.user?setTimeout(async()=>{const b=await d(g.user.id);o(b),l(!1)},0):(o(!1),l(!1))});return u.auth.getSession().then(async({data:{session:y}})=>{if(s(y),n((y==null?void 0:y.user)??null),y!=null&&y.user){const g=await d(y.user.id);o(g)}l(!1)}),()=>p.unsubscribe()},[u]);const h=async(p,y)=>{if(!u)return{error:new Error("Backend client not initialized")};const{error:g}=await u.auth.signInWithPassword({email:p,password:y});return{error:g}},f=async()=>{u&&(await u.auth.signOut(),n(null),s(null),o(!1))};return c.jsx(bj.Provider,{value:{user:t,session:r,isAdmin:i,isLoading:a,signIn:h,signOut:f},children:e})},DU=({children:e,requireAdmin:t=!1})=>{const{user:n,isAdmin:r,isLoading:s}=Px();return s?c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:c.jsx(mh,{className:"h-8 w-8 animate-spin text-primary"})}):n?t&&!r?c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-2xl font-bold text-destructive mb-2",children:"Access Denied"}),c.jsx("p",{className:"text-muted-foreground",children:"You don't have permission to access this page."})]})}):c.jsx(c.Fragment,{children:e}):c.jsx(N$,{to:"/admin/login",replace:!0})},LU="https://iride-adventures.lovable.app",wS="https://storage.googleapis.com/gpt-engineer-file-uploads/Uq2NiBaUOEMxwwNjdnJqGlFdJVv2/social-images/social-1770217569644-iride-logo_white_med.svg",Rn=({title:e,description:t,path:n,jsonLd:r})=>{const s=`${LU}${n}`,i=r?Array.isArray(r)?r:[r]:[];return c.jsxs(sD,{children:[c.jsx("title",{children:e}),c.jsx("meta",{name:"description",content:t}),c.jsx("link",{rel:"canonical",href:s}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{property:"og:title",content:e}),c.jsx("meta",{property:"og:description",content:t}),c.jsx("meta",{property:"og:url",content:s}),c.jsx("meta",{property:"og:image",content:wS}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:e}),c.jsx("meta",{name:"twitter:description",content:t}),c.jsx("meta",{name:"twitter:image",content:wS}),i.map((o,a)=>c.jsx("script",{type:"application/ld+json",children:JSON.stringify(o)},a))]})},Ox=m.createContext({});function Ix(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const MU=typeof window<"u",Sj=MU?m.useLayoutEffect:m.useEffect,If=m.createContext(null);function Dx(e,t){e.indexOf(t)===-1&&e.push(t)}function Rh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const qr=(e,t,n)=>n>t?t:n<e?e:n;let Df=()=>{},Xa=()=>{};const xi={},kj=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function _j(e){return typeof e=="object"&&e!==null}const Ej=e=>/^0[^.\s]+$/u.test(e);function Tj(e){let t;return()=>(t===void 0&&(t=e()),t)}const Un=e=>e,FU=(e,t)=>n=>t(e(n)),fu=(...e)=>e.reduce(FU),zc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Lx{constructor(){this.subscriptions=[]}add(t){return Dx(this.subscriptions,t),()=>Rh(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const gn=e=>e*1e3,$n=e=>e/1e3;function Cj(e,t){return t?e*(1e3/t):0}const jj=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,$U=1e-7,VU=12;
vendor: 28,801 bytes, line 286
286function UU(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=jj(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>$U&&++a<VU);return o}function pu(e,t,n,r){if(e===t&&n===r)return Un;const s=i=>UU(i,0,1,e,n);return i=>i===0||i===1?i:jj(s(i),t,r)}const Rj=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Nj=e=>t=>1-e(1-t),Aj=pu(.33,1.53,.69,.99),Mx=Nj(Aj),Pj=Rj(Mx),Oj=e=>e>=1?1:(e*=2)<1?.5*Mx(e):.5*(2-Math.pow(2,-10*(e-1))),Fx=e=>1-Math.sin(Math.acos(e)),Ij=Nj(Fx),Dj=Rj(Fx),BU=pu(.42,0,1,1),zU=pu(0,0,.58,1),Lj=pu(.42,0,.58,1),WU=e=>Array.isArray(e)&&typeof e[0]!="number",Mj=e=>Array.isArray(e)&&typeof e[0]=="number",bS={linear:Un,easeIn:BU,easeInOut:Lj,easeOut:zU,circIn:Fx,circInOut:Dj,circOut:Ij,backIn:Mx,backInOut:Pj,backOut:Aj,anticipate:Oj},HU=e=>typeof e=="string",SS=e=>{if(Mj(e)){Xa(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return pu(t,n,r,s)}else if(HU(e))return Xa(bS[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),bS[e];return e},nd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],kS={value:null,addProjectionMetrics:null};function qU(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(h){o.has(h)&&(d.schedule(h),e()),l++,h(a)}const d={schedule:(h,f=!1,p=!1)=>{const g=p&&s?n:r;return f&&o.add(h),g.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(a=h,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(u),t&&kS.value&&kS.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,d.process(h))}};return d}const KU=40;function Fj(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=nd.reduce((w,S)=>(w[S]=qU(i,t?S:void 0),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:p,postRender:y}=o,g=()=>{const w=xi.useManualTiming,S=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,KU),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),d.process(s),h.process(s),f.process(s),p.process(s),y.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},b=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:nd.reduce((w,S)=>{const k=o[S];return w[S]=(_,E=!1,C=!1)=>(n||b(),k.schedule(_,E,C)),w},{}),cancel:w=>{for(let S=0;S<nd.length;S++)o[nd[S]].cancel(w)},state:s,steps:o}}const{schedule:ze,cancel:wi,state:Lt,steps:rm}=Fj(typeof requestAnimationFrame<"u"?requestAnimationFrame:Un,!0);let Od;function GU(){Od=void 0}const Qt={now:()=>(Od===void 0&&Qt.set(Lt.isProcessing||xi.useManualTiming?Lt.timestamp:performance.now()),Od),set:e=>{Od=e,queueMicrotask(GU)}},$j=e=>t=>typeof t=="string"&&t.startsWith(e),Vj=$j("--"),YU=$j("var(--"),$x=e=>YU(e)?XU.test(e.split("/*")[0].trim()):!1,XU=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function _S(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const fl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Wc={...fl,transform:e=>qr(0,1,e)},rd={...fl,default:1},ac=e=>Math.round(e*1e5)/1e5,Vx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function JU(e){return e==null}const QU=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ux=(e,t)=>n=>!!(typeof n=="string"&&QU.test(n)&&n.startsWith(e)||t&&!JU(n)&&Object.prototype.hasOwnProperty.call(n,t)),Uj=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Vx);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ZU=e=>qr(0,255,e),sm={...fl,transform:e=>Math.round(ZU(e))},Yi={test:Ux("rgb","red"),parse:Uj("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sm.transform(e)+", "+sm.transform(t)+", "+sm.transform(n)+", "+ac(Wc.transform(r))+")"};function e5(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const vy={test:Ux("#"),parse:e5,transform:Yi.transform},mu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),As=mu("deg"),zr=mu("%"),re=mu("px"),t5=mu("vh"),n5=mu("vw"),ES={...zr,parse:e=>zr.parse(e)/100,transform:e=>zr.transform(e*100)},fa={test:Ux("hsl","hue"),parse:Uj("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zr.transform(ac(t))+", "+zr.transform(ac(n))+", "+ac(Wc.transform(r))+")"},vt={test:e=>Yi.test(e)||vy.test(e)||fa.test(e),parse:e=>Yi.test(e)?Yi.parse(e):fa.test(e)?fa.parse(e):vy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yi.transform(e):fa.transform(e),getAnimatableNone:e=>{const t=vt.parse(e);return t.alpha=0,vt.transform(t)}},r5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function s5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vx))==null?void 0:t.length)||0)+(((n=e.match(r5))==null?void 0:n.length)||0)>0}const Bj="number",zj="color",i5="var",o5="var(",TS="${}",a5=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ja(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(a5,l=>(vt.test(l)?(r.color.push(i),s.push(zj),n.push(vt.parse(l))):l.startsWith(o5)?(r.var.push(i),s.push(i5),n.push(l)):(r.number.push(i),s.push(Bj),n.push(parseFloat(l))),++i,TS)).split(TS);return{values:n,split:a,indexes:r,types:s}}function l5(e){return Ja(e).values}function Wj({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===Bj?s+=ac(r[i]):o===zj?s+=vt.transform(r[i]):s+=r[i]}return s}}function c5(e){return Wj(Ja(e))}const u5=e=>typeof e=="number"?0:vt.test(e)?vt.getAnimatableNone(e):e,d5=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:u5(e);function h5(e){const t=Ja(e);return Wj(t)(t.values.map((r,s)=>d5(r,t.split[s])))}const yr={test:s5,parse:l5,createTransformer:c5,getAnimatableNone:h5};function im(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function f5({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=im(l,a,e+1/3),i=im(l,a,e),o=im(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Nh(e,t){return n=>n>0?t:e}const Ye=(e,t,n)=>e+(t-e)*n,om=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},p5=[vy,Yi,fa],m5=e=>p5.find(t=>t.test(e));function CS(e){const t=m5(e);if(Df(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===fa&&(n=f5(n)),n}const jS=(e,t)=>{const n=CS(e),r=CS(t);if(!n||!r)return Nh(e,t);const s={...n};return i=>(s.red=om(n.red,r.red,i),s.green=om(n.green,r.green,i),s.blue=om(n.blue,r.blue,i),s.alpha=Ye(n.alpha,r.alpha,i),Yi.transform(s))},xy=new Set(["none","hidden"]);function g5(e,t){return xy.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function y5(e,t){return n=>Ye(e,t,n)}function Bx(e){return typeof e=="number"?y5:typeof e=="string"?$x(e)?Nh:vt.test(e)?jS:w5:Array.isArray(e)?Hj:typeof e=="object"?vt.test(e)?jS:v5:Nh}function Hj(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Bx(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function v5(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Bx(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function x5(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const w5=(e,t)=>{const n=yr.createTransformer(t),r=Ja(e),s=Ja(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?xy.has(e)&&!s.values.length||xy.has(t)&&!r.values.length?g5(e,t):fu(Hj(x5(r,s),s.values),n):(Df(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Nh(e,t))};function qj(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ye(e,t,n):Bx(e)(e,t)}const b5=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ze.update(t,n),stop:()=>wi(t),now:()=>Lt.isProcessing?Lt.timestamp:Qt.now()}},Kj=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ah=2e4;function zx(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ah;)t+=n,r=e.next(t);return t>=Ah?1/0:t}function S5(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(zx(r),Ah);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:$n(s)}}const tt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function wy(e,t){return e*Math.sqrt(1-t*t)}const k5=12;function _5(e,t,n){let r=n;for(let s=1;s<k5;s++)r=r-e(r)/t(r);return r}const am=.001;function E5({duration:e=tt.duration,bounce:t=tt.bounce,velocity:n=tt.velocity,mass:r=tt.mass}){let s,i;Df(e<=gn(tt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=qr(tt.minDamping,tt.maxDamping,o),e=qr(tt.minDuration,tt.maxDuration,$n(e)),o<1?(s=u=>{const d=u*o,h=d*e,f=d-n,p=wy(u,o),y=Math.exp(-h);return am-f/p*y},i=u=>{const h=u*o*e,f=h*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-h),g=wy(Math.pow(u,2),o);return(-s(u)+am>0?-1:1)*((f-p)*y)/g}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-am+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const a=5/e,l=_5(s,i,a);if(e=gn(e),isNaN(l))return{stiffness:tt.stiffness,damping:tt.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const T5=["duration","bounce"],C5=["stiffness","damping","mass"];function RS(e,t){return t.some(n=>e[n]!==void 0)}function j5(e){let t={velocity:tt.velocity,stiffness:tt.stiffness,damping:tt.damping,mass:tt.mass,isResolvedFromDuration:!1,...e};if(!RS(e,C5)&&RS(e,T5))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*qr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:tt.mass,stiffness:s,damping:i}}else{const n=E5({...e,velocity:0});t={...t,...n,mass:tt.mass},t.isResolvedFromDuration=!0}return t}function Ph(e=tt.visualDuration,t=tt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=j5({...n,velocity:-$n(n.velocity||0)}),y=f||0,g=u/(2*Math.sqrt(l*d)),b=o-i,x=$n(Math.sqrt(l/d)),v=Math.abs(b)<5;r||(r=v?tt.restSpeed.granular:tt.restSpeed.default),s||(s=v?tt.restDelta.granular:tt.restDelta.default);let w,S,k,_,E,C;if(g<1)k=wy(x,g),_=(y+g*x*b)/k,w=R=>{const $=Math.exp(-g*x*R);return o-$*(_*Math.sin(k*R)+b*Math.cos(k*R))},E=g*x*_+b*k,C=g*x*b-_*k,S=R=>Math.exp(-g*x*R)*(E*Math.sin(k*R)+C*Math.cos(k*R));else if(g===1){w=$=>o-Math.exp(-x*$)*(b+(y+x*b)*$);const R=y+x*b;S=$=>Math.exp(-x*$)*(x*R*$-y)}else{const R=x*Math.sqrt(g*g-1);w=F=>{const J=Math.exp(-g*x*F),V=Math.min(R*F,300);return o-J*((y+g*x*b)*Math.sinh(V)+R*b*Math.cosh(V))/R};const $=(y+g*x*b)/R,D=g*x*$-b*R,U=g*x*b-$*R;S=F=>{const J=Math.exp(-g*x*F),V=Math.min(R*F,300);return J*(D*Math.sinh(V)+U*Math.cosh(V))}}const N={calculatedDuration:p&&h||null,velocity:R=>gn(S(R)),next:R=>{if(!p&&g<1){const D=Math.exp(-g*x*R),U=Math.sin(k*R),F=Math.cos(k*R),J=o-D*(_*U+b*F),V=gn(D*(E*U+C*F));return a.done=Math.abs(V)<=r&&Math.abs(o-J)<=s,a.value=a.done?o:J,a}const $=w(R);if(p)a.done=R>=h;else{const D=gn(S(R));a.done=Math.abs(D)<=r&&Math.abs(o-$)<=s}return a.value=a.done?o:$,a},toString:()=>{const R=Math.min(zx(N),Ah),$=Kj(D=>N.next(R*D).value,R,30);return R+"ms "+$},toTransition:()=>{}};return N}Ph.applyToOptions=e=>{const t=S5(e,100,Ph);return e.ease=t.ease,e.duration=gn(t.duration),e.type="keyframes",e};const R5=5;function Gj(e,t,n){const r=Math.max(t-R5,0);return Cj(n-e(r),t-r)}function by({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},p=C=>a!==void 0&&C<a||l!==void 0&&C>l,y=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let g=n*t;const b=h+g,x=o===void 0?b:o(b);x!==b&&(g=x-h);const v=C=>-g*Math.exp(-C/r),w=C=>x+v(C),S=C=>{const N=v(C),R=w(C);f.done=Math.abs(N)<=u,f.value=f.done?x:R};let k,_;const E=C=>{p(f.value)&&(k=C,_=Ph({keyframes:[f.value,y(f.value)],velocity:Gj(w,C,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:C=>{let N=!1;return!_&&k===void 0&&(N=!0,S(C),E(C)),k!==void 0&&C>=k?_.next(C-k):(!N&&S(C),f)}}}function N5(e,t,n){const r=[],s=n||xi.mix||qj,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Un:t;a=fu(l,a)}r.push(a)}return r}function A5(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Xa(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=N5(t,r,s),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=zc(e[h],e[h+1],d);return a[h](f)};return n?d=>u(qr(e[0],e[i-1],d)):u}function P5(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=zc(0,t,r);e.push(Ye(n,1,s))}}function O5(e){const t=[0];return P5(t,e.length-1),t}function I5(e,t){return e.map(n=>n*t)}function D5(e,t){return e.map(()=>t||Lj).splice(0,e.length-1)}function lc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=WU(r)?r.map(SS):SS(r),i={done:!1,value:t[0]},o=I5(n&&n.length===t.length?n:O5(t),e),a=A5(o,t,{ease:Array.isArray(s)?s:D5(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const L5=e=>e!==null;function Lf(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(L5),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const M5={decay:by,inertia:by,tween:lc,keyframes:lc,spring:Ph};function Yj(e){typeof e.type=="string"&&(e.type=M5[e.type])}class Wx{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const F5=e=>e/100;class Oh extends Wx{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Qt.now()&&this.tick(Qt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Yj(t);const{type:n=lc,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||lc;l!==lc&&typeof a[0]!="number"&&(this.mixKeyframes=fu(F5,qj(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=zx(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:y,onUpdate:g,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,S=r;if(h){const C=Math.min(this.currentTime,s)/a;let N=Math.floor(C),R=C%1;!R&&C>=1&&(R=1),R===1&&N--,N=Math.min(N,h+1),!!(N%2)&&(f==="reverse"?(R=1-R,p&&(R-=p/a)):f==="mirror"&&(S=o)),w=qr(0,1,R)*a}let k;v?(this.delayState.value=d[0],k=this.delayState):k=S.next(w),i&&!v&&(k.value=i(k.value));let{done:_}=k;!v&&l!==null&&(_=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return E&&y!==by&&(k.value=Lf(d,this.options,b,this.speed)),g&&g(k.value),E&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return $n(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+$n(t)}get time(){return $n(this.currentTime)}set time(t){t=gn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Gj(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Qt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=$n(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=b5,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Qt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function $5(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Xi=e=>e*180/Math.PI,Sy=e=>{const t=Xi(Math.atan2(e[1],e[0]));return ky(t)},V5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sy,rotateZ:Sy,skewX:e=>Xi(Math.atan(e[1])),skewY:e=>Xi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ky=e=>(e=e%360,e<0&&(e+=360),e),NS=Sy,AS=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),PS=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),U5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:AS,scaleY:PS,scale:e=>(AS(e)+PS(e))/2,rotateX:e=>ky(Xi(Math.atan2(e[6],e[5]))),rotateY:e=>ky(Xi(Math.atan2(-e[2],e[0]))),rotateZ:NS,rotate:NS,skewX:e=>Xi(Math.atan(e[4])),skewY:e=>Xi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function _y(e){return e.includes("scale")?1:0}function Ey(e,t){if(!e||e==="none")return _y(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=U5,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=V5,s=a}if(!s)return _y(t);const i=r[t],o=s[1].split(",").map(z5);return typeof i=="function"?i(o):o[i]}const B5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ey(n,t)};function z5(e){return parseFloat(e.trim())}const pl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ml=new Set(pl),OS=e=>e===fl||e===re,W5=new Set(["x","y","z"]),H5=pl.filter(e=>!W5.has(e));function q5(e){const t=[];return H5.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Zs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ey(t,"x"),y:(e,{transform:t})=>Ey(t,"y")};Zs.translateX=Zs.x;Zs.translateY=Zs.y;const ho=new Set;let Ty=!1,Cy=!1,jy=!1;function Xj(){if(Cy){const e=Array.from(ho).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=q5(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Cy=!1,Ty=!1,ho.forEach(e=>e.complete(jy)),ho.clear()}function Jj(){ho.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Cy=!0)})}function K5(){jy=!0,Jj(),Xj(),jy=!1}class Hx{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ho.add(this),Ty||(Ty=!0,ze.read(Jj),ze.resolveKeyframes(Xj))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}$5(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ho.delete(this)}cancel(){this.state==="scheduled"&&(ho.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const G5=e=>e.startsWith("--");function Qj(e,t,n){G5(t)?e.style.setProperty(t,n):e.style[t]=n}const Y5={};function Zj(e,t){const n=Tj(e);return()=>Y5[t]??n()}const X5=Zj(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),eR=Zj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Bl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,IS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bl([0,.65,.55,1]),circOut:Bl([.55,0,1,.45]),backIn:Bl([.31,.01,.66,-.59]),backOut:Bl([.33,1.53,.69,.99])};function tR(e,t){if(e)return typeof e=="function"?eR()?Kj(e,t):"ease-out":Mj(e)?Bl(e):Array.isArray(e)?e.map(n=>tR(n,t)||IS.easeOut):IS[e]}function J5(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const h=tR(a,s);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function nR(e){return typeof e=="function"&&"applyToOptions"in e}function Q5({type:e,...t}){return nR(e)&&eR()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class rR extends Wx{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Xa(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Q5(t);this.animation=J5(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Lf(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Qj(n,r,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return $n(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+$n(t)}get time(){return $n(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=gn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&X5()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Un):s(this)}}const sR={anticipate:Oj,backInOut:Pj,circInOut:Dj};function Z5(e){return e in sR}function eB(e){typeof e.ease=="string"&&Z5(e.ease)&&(e.ease=sR[e.ease])}const lm=10;class tB extends rR{constructor(t){eB(t),Yj(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Oh({...o,autoplay:!1}),l=Math.max(lm,Qt.now()-this.startTime),u=qr(0,lm,l-lm),d=a.sample(l).value,{name:h}=this.options;i&&h&&Qj(i,h,d),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,d,u),a.stop()}}const DS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(yr.test(e)||e==="0")&&!e.startsWith("url("));function nB(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function rB(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=DS(s,t),a=DS(i,t);return Df(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:nB(e)||(n==="spring"||nR(n))&&r}function Ry(e){e.duration=0,e.type="keyframes"}const iR=new Set(["opacity","clipPath","filter","transform"]),sB=/^(?:
286oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function iB(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&sB.test(e[t]))return!0;return!1}const oB=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),aB=Tj(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function lB(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return aB()&&n&&(iR.has(n)||oB.has(n)&&iB(a))&&(n!=="transform"||!d)&&!u&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const cB=40;class uB extends Wx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:d,...h}){var y;super(),this.stop=()=>{var g,b;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Qt.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:d,...h},p=(d==null?void 0:d.KeyframeResolver)||Hx;this.keyframeResolver=new p(a,(g,b,x)=>this.onKeyframesResolved(g,b,f,!x),l,u,d),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,s){var x,v;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Qt.now();let h=!0;rB(t,i,o,a)||(h=!1,(xi.instantAnimations||!l)&&(d==null||d(Lf(t,r,n))),t[0]=t[t.length-1],Ry(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>cB?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=h&&!u&&lB(p),g=(v=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:v.current;let b;if(y)try{b=new tB({...p,element:g})}catch{b=new Oh(p)}else b=new Oh(p);b.finished.then(()=>{this.notifyFinished()}).catch(Un),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),K5()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function oR(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const dB=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hB(e){const t=dB.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const fB=4;function aR(e,t,n=1){Xa(n<=fB,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=hB(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return kj(o)?parseFloat(o):o}return $x(s)?aR(s,t,n+1):s}const pB={type:"spring",stiffness:500,damping:25,restSpeed:10},mB=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gB={type:"keyframes",duration:.8},yB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vB=(e,{keyframes:t})=>t.length>2?gB:ml.has(e)?e.startsWith("scale")?mB(t[1]):pB:yB;function lR(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function qx(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?lR(n,e):n}const xB=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function wB(e){for(const t in e)if(!xB.has(t))return!0;return!1}const Kx=(e,t,n,r={},s,i)=>o=>{const a=qx(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-gn(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};wB(a)||Object.assign(d,vB(e,d)),d.duration&&(d.duration=gn(d.duration)),d.repeatDelay&&(d.repeatDelay=gn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Ry(d),d.delay===0&&(h=!0)),(xi.instantAnimations||xi.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,Ry(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,h&&!i&&t.get()!==void 0){const f=Lf(d.keyframes,a);if(f!==void 0){ze.update(()=>{d.onUpdate(f),d.onComplete()});return}}return a.isSync?new Oh(d):new uB(d)};function LS(e){const t=[{},{}];
vendor: 60,464 bytes, line 286
286return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Gx(e,t,n,r){if(typeof t=="function"){const[s,i]=LS(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=LS(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function fo(e,t,n){const r=e.getProps();return Gx(r,t,n!==void 0?n:r.custom,e)}const cR=new Set(["width","height","top","left","right","bottom",...pl]),MS=30,bB=e=>!isNaN(parseFloat(e));class SB{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Qt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bB(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Lx);const r=this.events[t].add(n);return t==="change"?()=>{r(),ze.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Qt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>MS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,MS);return Cj(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qa(e,t){return new SB(e,t)}const Ny=e=>Array.isArray(e);function kB(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qa(n))}function _B(e){return Ny(e)?e[e.length-1]||0:e}function EB(e,t){const n=fo(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=_B(i[o]);kB(e,o,a)}}const Ft=e=>!!(e&&e.getVelocity);function TB(e){return!!(Ft(e)&&e.add)}function Ay(e,t){const n=e.getValue("willChange");if(TB(n))return n.add(t);if(!n&&xi.WillChange){const r=new xi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Yx(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const CB="framerAppearId",uR="data-"+Yx(CB);function dR(e){return e.props[uR]}function jB({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hR(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?lR(i,l):l;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const p=e.getValue(f,e.latestValues[f]??null),y=a[f];if(y===void 0||h&&jB(h,f))continue;const g={delay:n,...qx(i||{},f)},b=p.get();if(b!==void 0&&!p.isAnimating()&&!Array.isArray(y)&&y===b&&!g.velocity){ze.update(()=>p.set(y));continue}let x=!1;if(window.MotionHandoffAnimation){const S=dR(e);if(S){const k=window.MotionHandoffAnimation(S,f,ze);k!==null&&(g.startTime=k,x=!0)}}Ay(e,f);const v=u??e.shouldReduceMotion;p.start(Kx(f,p,y,v&&cR.has(f)?{type:!1}:g,e,x));const w=p.animation;w&&d.push(w)}if(o){const f=()=>ze.update(()=>{o&&EB(e,o)});d.length?Promise.all(d).then(f):f()}return d}function Py(e,t,n={}){var l;const r=fo(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(hR(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return RB(e,t,u,d,h,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,d]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function RB(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Py(l,t,{...o,delay:n+(typeof r=="function"?0:r)+oR(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function NB(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Py(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Py(e,t,n);else{const s=typeof t=="function"?fo(e,t,n.custom):t;r=Promise.all(hR(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const AB={test:e=>e==="auto",parse:e=>e},fR=e=>t=>t.test(e),pR=[fl,re,zr,As,n5,t5,AB],FS=e=>pR.find(fR(e));function PB(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ej(e):!0}const OB=new Set(["brightness","contrast","saturate","opacity"]);function IB(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vx)||[];if(!r)return e;const s=n.replace(r,"");let i=OB.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const DB=/\b([a-z-]*)\(.*?\)/gu,Oy={...yr,getAnimatableNone:e=>{const t=e.match(DB);return t?t.map(IB).join(" "):e}},Iy={...yr,getAnimatableNone:e=>{const t=yr.parse(e);return yr.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},$S={...fl,transform:Math.round},LB={rotate:As,rotateX:As,rotateY:As,rotateZ:As,scale:rd,scaleX:rd,scaleY:rd,scaleZ:rd,skew:As,skewX:As,skewY:As,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:Wc,originX:ES,originY:ES,originZ:re},Xx={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,inset:re,insetBlock:re,insetBlockStart:re,insetBlockEnd:re,insetInline:re,insetInlineStart:re,insetInlineEnd:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,paddingBlock:re,paddingBlockStart:re,paddingBlockEnd:re,paddingInline:re,paddingInlineStart:re,paddingInlineEnd:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,marginBlock:re,marginBlockStart:re,marginBlockEnd:re,marginInline:re,marginInlineStart:re,marginInlineEnd:re,fontSize:re,backgroundPositionX:re,backgroundPositionY:re,...LB,zIndex:$S,fillOpacity:Wc,strokeOpacity:Wc,numOctaves:$S},MB={...Xx,color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:Oy,WebkitFilter:Oy,mask:Iy,WebkitMask:Iy},mR=e=>MB[e],FB=new Set([Oy,Iy]);function gR(e,t){let n=mR(e);return FB.has(n)||(n=yr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $B=new Set(["auto","none","0"]);function VB(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!$B.has(i)&&Ja(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=gR(n,s)}class UB extends Hx{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),$x(h))){const f=aR(h,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!cR.has(r)||t.length!==2)return;const[s,i]=t,o=FS(s),a=FS(i),l=_S(s),u=_S(i);if(l!==u&&Zs[r]){this.needsMeasurement=!0;return}if(o!==a)if(OS(o)&&OS(a))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Zs[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||PB(t[s]))&&r.push(s);r.length&&VB(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Zs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Zs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Jx(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const yR=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Id(e){return _j(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Qx,cancel:FG}=Fj(queueMicrotask,!1),rr={x:!1,y:!1};function vR(){return rr.x||rr.y}function BB(e){return e==="x"||e==="y"?rr[e]?null:(rr[e]=!0,()=>{rr[e]=!1}):rr.x||rr.y?null:(rr.x=rr.y=!0,()=>{rr.x=rr.y=!1})}function xR(e,t){const n=Jx(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function zB(e){return!(e.pointerType==="touch"||vR())}function WB(e,t,n={}){const[r,s,i]=xR(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const d=()=>{o.removeEventListener("pointerleave",y)},h=b=>{u&&(u(b),u=void 0),d()},f=b=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(b))},p=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},y=b=>{if(b.pointerType!=="touch"){if(a){l=!0;return}h(b)}},g=b=>{if(!zB(b))return;l=!1;const x=t(o,b);typeof x=="function"&&(u=x,o.addEventListener("pointerleave",y,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",p,s)}),i}const wR=(e,t)=>t?e===t?!0:wR(e,t.parentElement):!1,Zx=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,HB=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function qB(e){return HB.has(e.tagName)||e.isContentEditable===!0}const KB=new Set(["INPUT","SELECT","TEXTAREA"]);function GB(e){return KB.has(e.tagName)||e.isContentEditable===!0}const Dd=new WeakSet;function VS(e){return t=>{t.key==="Enter"&&e(t)}}function cm(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const YB=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=VS(()=>{if(Dd.has(n))return;cm(n,"down");const s=VS(()=>{cm(n,"up")}),i=()=>cm(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function US(e){return Zx(e)&&!vR()}const BS=new WeakSet;function XB(e,t,n={}){const[r,s,i]=xR(e,n),o=a=>{const l=a.currentTarget;if(!US(a)||BS.has(a))return;Dd.add(l),n.stopPropagation&&BS.add(a);const u=t(l,a),d=(p,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Dd.has(l)&&Dd.delete(l),US(p)&&typeof u=="function"&&u(p,{success:y})},h=p=>{d(p,l===window||l===document||n.useGlobalTarget||wR(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Id(a)&&(a.addEventListener("focus",u=>YB(u,s)),!qB(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function e0(e){return _j(e)&&"ownerSVGElement"in e}const Ld=new WeakMap;let Ps;const bR=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:e0(r)&&"getBBox"in r?r.getBBox()[t]:r[n],JB=bR("inline","width","offsetWidth"),QB=bR("block","height","offsetHeight");function ZB({target:e,borderBoxSize:t}){var n;(n=Ld.get(e))==null||n.forEach(r=>{r(e,{get width(){return JB(e,t)},get height(){return QB(e,t)}})})}function e6(e){e.forEach(ZB)}function t6(){typeof ResizeObserver>"u"||(Ps=new ResizeObserver(e6))}function n6(e,t){Ps||t6();const n=Jx(e);return n.forEach(r=>{let s=Ld.get(r);s||(s=new Set,Ld.set(r,s)),s.add(t),Ps==null||Ps.observe(r)}),()=>{n.forEach(r=>{const s=Ld.get(r);s==null||s.delete(t),s!=null&&s.size||Ps==null||Ps.unobserve(r)})}}const Md=new Set;let pa;function r6(){pa=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Md.forEach(t=>t(e))},window.addEventListener("resize",pa)}function s6(e){return Md.add(e),pa||r6(),()=>{Md.delete(e),!Md.size&&typeof pa=="function"&&(window.removeEventListener("resize",pa),pa=void 0)}}function zS(e,t){return typeof e=="function"?s6(e):n6(e,t)}function i6(e){return e0(e)&&e.tagName==="svg"}const o6=[...pR,vt,yr],a6=e=>o6.find(fR(e)),WS=()=>({translate:0,scale:1,origin:0,originPoint:0}),ma=()=>({x:WS(),y:WS()}),HS=()=>({min:0,max:0}),kt=()=>({x:HS(),y:HS()}),l6=new WeakMap;function Mf(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Hc(e){return typeof e=="string"||Array.isArray(e)}const t0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],n0=["initial",...t0];function Ff(e){return Mf(e.animate)||n0.some(t=>Hc(e[t]))}function SR(e){return!!(Ff(e)||e.variants)}function c6(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Ft(s))e.addValue(r,s);else if(Ft(i))e.addValue(r,Qa(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Qa(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Dy={current:null},kR={current:!1},u6=typeof window<"u";function d6(){if(kR.current=!0,!!u6)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dy.current=e.matches;e.addEventListener("change",t),t()}else Dy.current=!1}const qS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ih={};function _R(e){Ih=e}function h6(){return Ih}class f6{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Hx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Qt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ze.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Ff(n),this.isVariantNode=SR(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const y=f[p];u[p]!==void 0&&Ft(y)&&y.set(u[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,l6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(kR.current||d6(),this.shouldReduceMotion=Dy.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),wi(this.notifyUpdate),wi(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&iR.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:d}=n.accelerate,h=new rR({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:gn(d)}),f=o(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=ml.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ze.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ih){const n=Ih[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<qS.length;r++){const s=qS[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=c6(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(kj(r)||Ej(r))?r=parseFloat(r):!a6(r)&&yr.test(n)&&(r=gR(t,n)),this.setBaseTarget(t,Ft(r)?r.get():r)),Ft(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Gx(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ft(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Lx),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Qx.render(this.render)}}class ER extends f6{constructor(){super(...arguments),this.KeyframeResolver=UB}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ft(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ji{constructor(t){this.isMounted=!1,this.node=t}update(){}}function TR({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function p6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function m6(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function um(e){return e===void 0||e===1}function Ly({scale:e,scaleX:t,scaleY:n}){return!um(e)||!um(t)||!um(n)}function Vi(e){return Ly(e)||CR(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function CR(e){return KS(e.x)||KS(e.y)}function KS(e){return e&&e!=="0%"}function Dh(e,t,n){const r=e-n,s=t*r;return n+s}function GS(e,t,n,r,s){return s!==void 0&&(e=Dh(e,s,r)),Dh(e,n,r)+t}function My(e,t=0,n=1,r,s){e.min=GS(e.min,t,n,r,s),e.max=GS(e.max,t,n,r,s)}function jR(e,{x:t,y:n}){My(e.x,t.translate,t.scale,t.originPoint),My(e.y,n.translate,n.scale,n.originPoint)}const YS=.999999999999,XS=1.0000000000001;function g6(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Mr(e.x,-i.scroll.offset.x),Mr(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,jR(e,o)),r&&Vi(i.latestValues)&&Fd(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<XS&&t.x>YS&&(t.x=1),t.y<XS&&t.y>YS&&(t.y=1)}function Mr(e,t){e.min+=t,e.max+=t}function JS(e,t,n,r,s=.5){const i=Ye(e.min,e.max,s);My(e,t,n,i,r)}function QS(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Fd(e,t,n){const r=n??e;JS(e.x,QS(t.x,r.x),t.scaleX,t.scale,t.originX),JS(e.y,QS(t.y,r.y),t.scaleY,t.scale,t.originY)}function RR(e,t){return TR(m6(e.getBoundingClientRect(),t))}function y6(e,t,n){const r=RR(e,n),{scroll:s}=t;return s&&(Mr(r.x,s.offset.x),Mr(r.y,s.offset.y)),r}const v6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},x6=pl.length;function w6(e,t,n){let r="",s=!0;for(let i=0;i<x6;i++){const o=pl[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=yR(a,Xx[o]);if(!l){s=!1;const d=v6[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function r0(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ml.has(l)){o=!0;continue}else if(Vj(l)){s[l]=u;continue}else{const d=yR(u,Xx[l]);l.startsWith("origin")?(a=!0,i[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=w6(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${l} ${u} ${d}`}}function NR(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function ZS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;const n=ZS(e,t.target.x),r=ZS(e,t.target.y);return`${n}% ${r}%`}},b6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=yr.parse(e);if(s.length>5)return r;const i=yr.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=Ye(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},Fy={borderRadius:{...Nl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nl,borderTopRightRadius:Nl,borderBottomLeftRadius:Nl,borderBottomRightRadius:Nl,boxShadow:b6};function AR(e,{layout:t,layoutId:n}){return ml.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fy[e]||e==="opacity")}function s0(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Ft(r[a])||s&&Ft(s[a])||AR(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function S6(e){return window.getComputedStyle(e)}class k6 extends ER{constructor(){super(...arguments),this.type="html",this.renderInstance=NR}readValueFromInstance(t,n){var r;if(ml.has(n))return(r=this.projection)!=null&&r.isProjecting?_y(n):B5(t,n);{const s=S6(t),i=(Vj(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return RR(t,n)}build(t,n,r){r0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return s0(t,n,r)}}const _6={offset:"stroke-dashoffset",array:"stroke-dasharray"},E6={offset:"strokeDashoffset",array:"strokeDasharray"};function T6(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?_6:E6;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const C6=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function PR(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,u,d){if(r0(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const p of C6)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&T6(h,s,i,o,!1)}const OR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),IR=e=>typeof e=="string"&&e.toLowerCase()==="svg";function j6(e,t,n,r){NR(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(OR.has(s)?s:Yx(s),t.attrs[s])}function DR(e,t,n){const r=s0(e,t,n);for(const s in e)if(Ft(e[s])||Ft(t[s])){const i=pl.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class R6 extends ER{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ml.has(n)){const r=mR(n);return r&&r.default||0}return n=OR.has(n)?n:Yx(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return DR(t,n,r)}build(t,n,r){PR(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){j6(t,n,r,s)}mount(t){this.isSVGTag=IR(t.tagName),super.mount(t)}}const N6=n0.length;function LR(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?LR(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<N6;n++){const r=n0[n],s=e.props[r];(Hc(s)||s===!1)&&(t[r]=s)}return t}function MR(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const A6=[...t0].reverse(),P6=t0.length;function O6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>NB(e,n,r)))}function I6(e){let t=O6(e),n=e1(),r=!0,s=!1;const i=u=>(d,h)=>{var p;const f=fo(e,h,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:y,transitionEnd:g,...b}=f;d={...d,...b,...g}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,h=LR(e.parent)||{},f=[],p=new Set;let y={},g=1/0;for(let x=0;x<P6;x++){const v=A6[x],w=n[v],S=d[v]!==void 0?d[v]:h[v],k=Hc(S),_=v===u?w.isActive:null;_===!1&&(g=x);let E=S===h[v]&&S!==d[v]&&k;if(E&&(r||s)&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...y},!w.isActive&&_===null||!S&&!w.prevProp||Mf(S)||typeof S=="boolean")continue;if(v==="exit"&&w.isActive&&_!==!0){w.prevResolvedValues&&(y={...y,...w.prevResolvedValues});continue}const C=D6(w.prevProp,S);let N=C||v===u&&w.isActive&&!E&&k||x>g&&k,R=!1;const $=Array.isArray(S)?S:[S];let D=$.reduce(i(v),{});_===!1&&(D={});const{prevResolvedValues:U={}}=w,F={...U,...D},J=P=>{N=!0,p.has(P)&&(R=!0,p.delete(P)),w.needsAnimating[P]=!0;const L=e.getValue(P);L&&(L.liveStyle=!1)};for(const P in F){const L=D[P],W=U[P];if(y.hasOwnProperty(P))continue;let ce=!1;Ny(L)&&Ny(W)?ce=!MR(L,W):ce=L!==W,ce?L!=null?J(P):p.add(P):L!==void 0&&p.has(P)?J(P):w.protectedKeys[P]=!0}w.prevProp=S,w.prevResolvedValues=D,w.isActive&&(y={...y,...D}),(r||s)&&e.blockInitialAnimation&&(N=!1);const V=E&&C;N&&(!V||R)&&f.push(...$.map(P=>{const L={type:v};if(typeof P=="string"&&(r||s)&&!V&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,ce=fo(W,P);if(W.enteringChildren&&ce){const{delayChildren:oe}=ce.transition||{};L.delay=oR(W.enteringChildren,e,oe)}}return{animation:P,options:L}}))}if(p.size){const x={};if(typeof d.initial!="boolean"){const v=fo(e,Array.isArray(d.initial)?d.initial[0]:d.initial);v&&v.transition&&(x.transition=v.transition)}p.forEach(v=>{const w=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),x[v]=w??null}),f.push({animation:x})}let b=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,s=!1,b?t(f):Promise.resolve()}function l(u,d){var f;if(n[u].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var y;return(y=p.animationState)==null?void 0:y.setActive(u,d)}),n[u].isActive=d;const h=a(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=e1(),s=!0}}}function D6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!MR(t,e):!1}function Li(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function e1(){return{animate:Li(!0),whileInView:Li(),whileHover:Li(),whileTap:Li(),whileDrag:Li(),whileFocus:Li(),exit:Li()}}function $y(e,t){e.min=t.min,e.max=t.max}function er(e,t){$y(e.x,t.x),$y(e.y,t.y)}function t1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const FR=1e-4,L6=1-FR,M6=1+FR,$R=.01,F6=0-$R,$6=0+$R;function Zt(e){return e.max-e.min}function V6(e,t,n){return Math.abs(e-t)<=n}function n1(e,t,n,r=.5){e.origin=r,e.originPoint=Ye(t.min,t.max,e.origin),e.scale=Zt(n)/Zt(t),e.translate=Ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=L6&&e.scale<=M6||isNaN(e.scale))&&(e.scale=1),(e.translate>=F6&&e.translate<=$6||isNaN(e.translate))&&(e.translate=0)}function cc(e,t,n,r){n1(e.x,t.x,n.x,r?r.originX:void 0),n1(e.y,t.y,n.y,r?r.originY:void 0)}function r1(e,t,n,r=0){const s=r?Ye(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+Zt(t)}function U6(e,t,n,r){r1(e.x,t.x,n.x,r==null?void 0:r.x),r1(e.y,t.y,n.y,r==null?void 0:r.y)}function s1(e,t,n,r=0){const s=r?Ye(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+Zt(t)}function Lh(e,t,n,r){s1(e.x,t.x,n.x,r==null?void 0:r.x),s1(e.y,t.y,n.y,r==null?void 0:r.y)}function i1(e,t,n,r,s){return e-=t,e=Dh(e,1/n,r),s!==void 0&&(e=Dh(e,1/s,r)),e}function B6(e,t=0,n=1,r=.5,s,i=e,o=e){if(zr.test(t)&&(t=parseFloat(t),t=Ye(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ye(i.min,i.max,r);e===i&&(a-=t),e.min=i1(e.min,t,n,a,s),e.max=i1(e.max,t,n,a,s)}function o1(e,t,[n,r,s],i,o){B6(e,t[n],t[r],t[s],t.scale,i,o)}const z6=["x","scaleX","originX"],W6=["y","scaleY","originY"];function a1(e,t,n,r){o1(e.x,t,z6,n?n.x:void 0,r?r.x:void 0),o1(e.y,t,W6,n?n.y:void 0,r?r.y:void 0)}function l1(e){return e.translate===0&&e.scale===1}function VR(e){return l1(e.x)&&l1(e.y)}function c1(e,t){return e.min===t.min&&e.max===t.max}function H6(e,t){return c1(e.x,t.x)&&c1(e.y,t.y)}function u1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function UR(e,t){return u1(e.x,t.x)&&u1(e.y,t.y)}function d1(e){return Zt(e.x)/Zt(e.y)}function h1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ar(e){return[e("x"),e("y")]}function q6(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:p,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const BR=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],K6=BR.length,f1=e=>typeof e=="string"?parseFloat(e):e,p1=e=>typeof e=="number"||re.test(e);function G6(e,t,n,r,s,i){s?(e.opacity=Ye(0,n.opacity??1,Y6(r)),e.opacityExit=Ye(t.opacity??1,0,X6(r))):i&&(e.opacity=Ye(t.opacity??1,n.opacity??1,r));for(let o=0;o<K6;o++){const a=BR[o];let l=m1(t,a),u=m1(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||p1(l)===p1(u)?(e[a]=Math.max(Ye(f1(l),f1(u),r),0),(zr.test(u)||zr.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Ye(t.rotate||0,n.rotate||0,r))}function m1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Y6=zR(0,.5,Ij),X6=zR(.5,.95,Un);function zR(e,t,n){return r=>r<e?0:r>t?1:n(zc(e,t,r))}function J6(e,t,n){const r=Ft(e)?e:Qa(e);return r.start(Kx("",r,t,n)),r.animation}function qc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Q6=(e,t)=>e.depth-t.depth;class Z6{constructor(){this.children=[],this.isDirty=!1}add(t){Dx(this.children,t),this.isDirty=!0}remove(t){Rh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Q6),this.isDirty=!1,this.children.forEach(t)}}function ez(e,t){const n=Qt.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(wi(r),e(i-t))};return ze.setup(r,!0),()=>wi(r)}function $d(e){return Ft(e)?e.get():e}class tz{constructor(){this.members=[]}add(t){Dx(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Rh(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Rh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Vd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dm=["","X","Y","Z"],nz=1e3;let rz=0;function hm(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function WR(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=dR(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ze,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&WR(r)}function HR({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=rz++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(oz),this.nodes.forEach(hz),this.nodes.forEach(fz),this.nodes.forEach(az)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Z6)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Lx),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=e0(o)&&!i6(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;ze.read(()=>{h=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,d&&d(),d=ez(f,250),Vd.hasAnimatedSinceResize&&(Vd.hasAnimatedSinceResize=!1,this.nodes.forEach(v1)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||vz,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=u.getProps(),x=!this.targetLayout||!UR(this.targetLayout,p),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...qx(y,"layout"),onPlay:g,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,v)}else h||v1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),wi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(pz),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&WR(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(cz),this.nodes.forEach(g1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(y1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(uz),this.nodes.forEach(dz),this.nodes.forEach(sz),this.nodes.forEach(iz)):this.nodes.forEach(y1),this.clearAllSnapshots();const a=Qt.now();Lt.delta=qr(0,1e3/60,a-Lt.timestamp),Lt.timestamp=a,Lt.isProcessing=!0,rm.update.process(Lt),rm.preRender.process(Lt),rm.render.process(Lt),Lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qx.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lz),this.sharedNodes.forEach(mz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ze.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ze.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Zt(this.snapshot.measuredBox.x)&&!Zt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=kt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!VR(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Vi(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),xz(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return kt();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(wz))){const{scroll:d}=this.root;d&&(Mr(a.x,d.offset.x),Mr(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=kt();if(er(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&er(a,o),Mr(a.x,h.offset.x),Mr(a.y,h.offset.y))}return a}applyTransform(o,a=!1,l){var d,h;const u=l||kt();er(u,o);for(let f=0;f<this.path.length;f++){const p=this.path[f];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Mr(u.x,-p.scroll.offset.x),Mr(u.y,-p.scroll.offset.y)),Vi(p.latestValues)&&Fd(u,p.latestValues,(d=p.layout)==null?void 0:d.layoutBox)}return Vi(this.latestValues)&&Fd(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(o){var l;const a=kt();er(a,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!Vi(d.latestValues))continue;let h;d.instance&&(Ly(d.latestValues)&&d.updateSnapshot(),h=kt(),er(h,d.measurePageBox())),a1(a,d.latestValues,(l=d.snapshot)==null?void 0:l.layoutBox,h)}return Vi(this.latestValues)&&a1(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=Lt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=kt(),this.targetWithTransforms=kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),U6(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):er(this.target,this.layout.layoutBox),jR(this.target,this.targetDelta)):er(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ly(this.parent.latestValues)||CR(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kt(),this.relativeTargetOrigin=kt(),Lh(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),er(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Lt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;er(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;g6(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=kt());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(t1(this.prevProjectionDelta.x,this.projectionDelta.x),t1(this.prevProjectionDelta.y,this.projectionDelta.y)),cc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!h1(this.projectionDelta.x,this.prevProjectionDelta.x)||!h1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ma(),this.projectionDelta=ma(),this.projectionDeltaWithTransform=ma()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},h=ma();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=kt(),p=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=p!==y,b=this.getStack(),x=!b||b.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(yz));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const k=S/1e3;x1(h.x,o.x,k),x1(h.y,o.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lh(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),gz(this.relativeTarget,this.relativeTargetOrigin,f,k),w&&H6(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=kt()),er(w,this.relativeTarget)),g&&(this.animationValues=d,G6(d,u,this.latestValues,k,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(wi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ze.update(()=>{Vd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qa(0)),this.motionValue.jump(0,!1),this.currentAnimation=J6(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nz),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&qR(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||kt();const h=Zt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=Zt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}er(a,l),Fd(a,d),cc(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new tz),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&hm("z",o,u,this.animationValues);for(let d=0;d<dm.length;d++)hm(`rotate${dm[d]}`,o,u,this.animationValues),hm(`skew${dm[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=$d(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=$d(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Vi(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=q6(this.projectionDeltaWithTransform,this.treeScale,d);l&&(h=l(d,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Fy){if(d[y]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:x}=Fy[y],v=h==="none"?d[y]:g(d[y],u);if(b){const w=b.length;for(let S=0;S<w;S++)o[b[S]]=v}else x?this.options.visualElement.renderState.vars[y]=v:o[y]=v}this.options.layoutId&&(o.pointerEvents=u===this?$d(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(g1),this.root.sharedNodes.clear()}}}function sz(e){e.updateLayout()}function iz(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")Ar(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=Zt(f);f.min=r[h].min,f.max=f.min+p});else if(i==="x"||i==="y"){const h=i==="x"?"y":"x";$y(o?t.measuredBox[h]:t.layoutBox[h],r[h])}else qR(i,t.layoutBox,r)&&Ar(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=Zt(r[h]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const a=ma();cc(a,r,t.layoutBox);const l=ma();o?cc(l,e.applyTransform(s,!0),t.measuredBox):cc(l,r,t.layoutBox);const u=!VR(a);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const y=e.options.layoutAnchor||void 0,g=kt();Lh(g,t.layoutBox,f.layoutBox,y);const b=kt();Lh(b,r,p.layoutBox,y),UR(g,b)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function oz(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function az(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lz(e){e.clearSnapshot()}function g1(e){e.clearMeasurements()}function cz(e){e.isLayoutDirty=!0,e.updateLayout()}function y1(e){e.isLayoutDirty=!1}function uz(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function dz(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function v1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hz(e){e.resolveTargetDelta()}function fz(e){e.calcProjection()}
286function pz(e){e.resetSkewAndRotation()}function mz(e){e.removeLeadSnapshot()}function x1(e,t,n){e.translate=Ye(t.translate,0,n),e.scale=Ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function w1(e,t,n,r){e.min=Ye(t.min,n.min,r),e.max=Ye(t.max,n.max,r)}function gz(e,t,n,r){w1(e.x,t.x,n.x,r),w1(e.y,t.y,n.y,r)}function yz(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vz={duration:.45,ease:[.4,0,.1,1]},b1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),S1=b1("applewebkit/")&&!b1("chrome/")?Math.round:Un;function k1(e){e.min=S1(e.min),e.max=S1(e.max)}function xz(e){k1(e.x),k1(e.y)}function qR(e,t,n){return e==="position"||e==="preserve-aspect"&&!V6(d1(t),d1(n),.2)}function wz(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const bz=HR({attachResizeListener:(e,t)=>qc(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),fm={current:void 0},KR=HR({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fm.current){const e=new bz({});e.mount(window),e.setOptions({layoutScroll:!0}),fm.current=e}return fm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),i0=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function _1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Sz(...e){return t=>{let n=!1;const r=e.map(s=>{const i=_1(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():_1(e[s],null)}}}}function kz(...e){return m.useCallback(Sz(...e),e)}class _z extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Id(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Id(r)&&r.offsetWidth||0,i=Id(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ez({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var f;const o=m.useId(),a=m.useRef(null),l=m.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=m.useContext(i0),d=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),h=kz(a,d);return m.useInsertionEffect(()=>{const{width:p,height:y,top:g,left:b,right:x,bottom:v}=l.current;if(t||i===!1||!a.current||!p||!y)return;const w=n==="left"?`left: ${b}`:`right: ${x}`,S=r==="bottom"?`bottom: ${v}`:`top: ${g}`;a.current.dataset.motionPopId=o;const k=document.createElement("style");u&&(k.nonce=u);const _=s??document.head;return _.appendChild(k),k.sheet&&k.sheet.insertRule(` 287 [data-motion-pop-id="${o}"] { 288 position: absolute !important; 289 width: ${p}px !important; 290 height: ${y}px !important; 291 ${w}px !important; 292 ${S}px !important; 293 } 294 `),()=>{var E;(E=a.current)==null||E.removeAttribute("data-motion-pop-id"),_.contains(k)&&_.removeChild(k)}},[t]),c.jsx(_z,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:m.cloneElement(e,{ref:h})})}const Tz=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:u})=>{const d=Ix(Cz),h=m.useId();let f=!0,p=m.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:y=>{d.set(y,!0);for(const g of d.values())if(!g)return;r&&r()},register:y=>(d.set(y,!1),()=>d.delete(y))}),[n,d,r]);return i&&f&&(p={...p}),m.useMemo(()=>{d.forEach((y,g)=>d.set(g,!1))},[n]),m.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=c.jsx(Ez,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),c.jsx(If.Provider,{value:p,children:e})};function Cz(){return new Map}function GR(e=!0){const t=m.useContext(If);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{if(e)return s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const sd=e=>e.key||"";function E1(e){const t=[];
vendor: 6,301 bytes, line 294
294return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const jz=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[d,h]=GR(o),f=m.useMemo(()=>E1(e),[e]),p=o&&!d?[]:f.map(sd),y=m.useRef(!0),g=m.useRef(f),b=Ix(()=>new Map),x=m.useRef(new Set),[v,w]=m.useState(f),[S,k]=m.useState(f);Sj(()=>{y.current=!1,g.current=f;for(let C=0;C<S.length;C++){const N=sd(S[C]);p.includes(N)?(b.delete(N),x.current.delete(N)):b.get(N)!==!0&&b.set(N,!1)}},[S,p.length,p.join("-")]);const _=[];if(f!==v){let C=[...f];for(let N=0;N<S.length;N++){const R=S[N],$=sd(R);p.includes($)||(C.splice(N,0,R),_.push(R))}return i==="wait"&&_.length&&(C=_),k(E1(C)),w(f),null}const{forceRender:E}=m.useContext(Ox);return c.jsx(c.Fragment,{children:S.map(C=>{const N=sd(C),R=o&&!d?!1:f===S||p.includes(N),$=()=>{if(x.current.has(N))return;if(b.has(N))x.current.add(N),b.set(N,!0);else return;let D=!0;b.forEach(U=>{U||(D=!1)}),D&&(E==null||E(),k(g.current),o&&(h==null||h()),r&&r())};return c.jsx(Tz,{isPresent:R,initial:!y.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:u,onExitComplete:R?void 0:$,anchorX:a,anchorY:l,children:C},N)})})},YR=m.createContext({strict:!1}),T1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let C1=!1;function Rz(){if(C1)return;const e={};for(const t in T1)e[t]={isEnabled:n=>T1[t].some(r=>!!n[r])};_R(e),C1=!0}function XR(){return Rz(),h6()}function Nz(e){const t=XR();for(const n in e)t[n]={...t[n],...e[n]};_R(t)}const Az=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Mh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Az.has(e)}let JR=e=>!Mh(e);function Pz(e){typeof e=="function"&&(JR=t=>t.startsWith("on")?!Mh(t):e(t))}try{Pz(require("@emotion/is-prop-valid").default)}catch{}function Oz(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Ft(e[s])||(JR(s)||n===!0&&Mh(s)||!t&&!Mh(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const $f=m.createContext({});function Iz(e,t){if(Ff(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hc(n)?n:void 0,animate:Hc(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dz(e){const{initial:t,animate:n}=Iz(e,m.useContext($f));return m.useMemo(()=>({initial:t,animate:n}),[j1(t),j1(n)])}function j1(e){return Array.isArray(e)?e.join(" "):e}const o0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function QR(e,t,n){for(const r in t)!Ft(t[r])&&!AR(r,n)&&(e[r]=t[r])}function Lz({transformTemplate:e},t){return m.useMemo(()=>{const n=o0();return r0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Mz(e,t){const n=e.style||{},r={};return QR(r,n,e),Object.assign(r,Lz(e,t)),r}function Fz(e,t){const n={},r=Mz(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ZR=()=>({...o0(),attrs:{}});function $z(e,t,n,r){const s=m.useMemo(()=>{const i=ZR();return PR(i,t,IR(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};QR(i,e.style,e),s.style={...i,...s.style}}return s}const Vz=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function a0(e){return typeof e!="string"||e.includes("-")?!1:!!(Vz.indexOf(e)>-1||/[A-Z]/u.test(e))}function Uz(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??a0(e)?$z:Fz)(t,r,s,e),u=Oz(t,typeof e=="string",i),d=e!==m.Fragment?{...u,...l,ref:n}:{},{children:h}=t,f=m.useMemo(()=>Ft(h)?h.get():h,[h]);return m.createElement(e,{...d,children:f})}function Bz({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:zz(n,r,s,e),renderState:t()}}function zz(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=$d(i[f]);let{initial:o,animate:a}=e;const l=Ff(e),u=SR(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?a:o;if(h&&typeof h!="boolean"&&!Mf(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const y=Gx(e,f[p]);if(y){const{transitionEnd:g,transition:b,...x}=y;for(const v in x){let w=x[v];if(Array.isArray(w)){const S=d?w.length-1:0;w=w[S]}w!==null&&(s[v]=w)}for(const v in g)s[v]=g[v]}}}return s}const eN=e=>(t,n)=>{const r=m.useContext($f),s=m.useContext(If),i=()=>Bz(e,t,r,s);return n?i():Ix(i)},Wz=eN({scrapeMotionValuesFromProps:s0,createRenderState:o0}),Hz=eN({scrapeMotionValuesFromProps:DR,createRenderState:ZR}),qz=Symbol.for("motionComponentSymbol");function Kz(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i));const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const tN=m.createContext({});function Qo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Gz(e,t,n,r,s,i){var w,S;const{visualElement:o}=m.useContext($f),a=m.useContext(YR),l=m.useContext(If),u=m.useContext(i0),d=u.reducedMotion,h=u.ski
vendor: 21,037 bytes, line 294
294pAnimations,f=m.useRef(null),p=m.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const y=f.current,g=m.useContext(tN);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&Yz(f.current,n,s,g);const b=m.useRef(!1);m.useInsertionEffect(()=>{y&&b.current&&y.update(n,l)});const x=n[uR],v=m.useRef(!!x&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,x))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,x)));return Sj(()=>{p.current=!0,y&&(b.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),v.current&&y.animationState&&y.animationState.animateChanges())}),m.useEffect(()=>{y&&(!v.current&&y.animationState&&y.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,x)}),v.current=!1),y.enteringChildren=void 0)}),y}function Yz(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:nN(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Qo(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:l,layoutRoot:u,layoutAnchor:d})}function nN(e){if(e)return e.options.allowProjection!==!1?e.projection:nN(e.parent)}function pm(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Nz(r);const i=n?n==="svg":a0(e),o=i?Hz:Wz;function a(u,d){let h;const f={...m.useContext(i0),...u,layoutId:Xz(u)},{isStatic:p}=f,y=Dz(u),g=o(u,p);if(!p&&typeof window<"u"){Jz();const b=Qz(f);h=b.MeasureLayout,y.visualElement=Gz(e,g,f,s,b.ProjectionNode,i)}return c.jsxs($f.Provider,{value:y,children:[h&&y.visualElement?c.jsx(h,{visualElement:y.visualElement,...f}):null,Uz(e,u,Kz(g,y.visualElement,d),g,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=m.forwardRef(a);return l[qz]=e,l}function Xz({layoutId:e}){const t=m.useContext(Ox).id;return t&&e!==void 0?t+"-"+e:e}function Jz(e,t){m.useContext(YR).strict}function Qz(e){const t=XR(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Zz(e,t){if(typeof Proxy>"u")return pm;const n=new Map,r=(i,o)=>pm(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,pm(o,void 0,e,t)),n.get(o))})}const e8=(e,t)=>t.isSVG??a0(e)?new R6(t):new k6(t,{allowProjection:e!==m.Fragment});class t8 extends ji{constructor(t){super(t),t.animationState||(t.animationState=I6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Mf(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let n8=0;class r8 extends ji{constructor(){super(...arguments),this.id=n8++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=fo(this.node,o,a);if(l){const{transition:u,transitionEnd:d,...h}=l;for(const f in h)(i=this.node.getValue(f))==null||i.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const s8={animation:{Feature:t8},exit:{Feature:r8}};function gu(e){return{point:{x:e.pageX,y:e.pageY}}}const i8=e=>t=>Zx(t)&&e(t,gu(t));function uc(e,t,n,r){return qc(e,t,i8(n),r)}const rN=({current:e})=>e?e.ownerDocument.defaultView:null,R1=(e,t)=>Math.abs(e-t);function o8(e,t){const n=R1(e.x,t.x),r=R1(e.y,t.y);return Math.sqrt(n**2+r**2)}const N1=new Set(["auto","scroll"]);class sN{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=id(this.lastRawMoveEventInfo,this.transformPagePoint));const p=mm(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,g=o8(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!g)return;const{point:b}=p,{timestamp:x}=Lt;this.history.push({...b,timestamp:x});const{onStart:v,onMove:w}=this.handlers;y||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,p)},this.handlePointerMove=(p,y)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=id(y,this.transformPagePoint),ze.update(this.updatePoint,!0)},this.handlePointerUp=(p,y)=>{this.end();const{onEnd:g,onSessionEnd:b,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=mm(p.type==="pointercancel"?this.lastMoveEventInfo:id(y,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,v),b&&b(p,v)},!Zx(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=gu(t),u=id(l,this.transformPagePoint),{point:d}=u,{timestamp:h}=Lt;this.history=[{...d,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,mm(u,this.history)),this.removeListeners=fu(uc(this.contextWindow,"pointermove",this.handlePointerMove),uc(this.contextWindow,"pointerup",this.handlePointerUp),uc(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(N1.has(r.overflowX)||N1.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),ze.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),wi(this.updatePoint)}}function id(e,t){return t?{point:t(e.point)}:e}function A1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mm({point:e},t){return{point:e,delta:A1(e,iN(t)),offset:A1(e,a8(t)),velocity:l8(t,.1)}}function a8(e){return e[0]}function iN(e){return e[e.length-1]}function l8(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=iN(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>gn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>gn(t)*2&&(r=e[1]);const i=$n(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function c8(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ye(n,e,r.max):Math.min(e,n)),e}function P1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function u8(e,{top:t,left:n,bottom:r,right:s}){return{x:P1(e.x,n,s),y:P1(e.y,t,r)}}function O1(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function d8(e,t){return{x:O1(e.x,t.x),y:O1(e.y,t.y)}}function h8(e,t){let n=.5;const r=Zt(e),s=Zt(t);return s>r?n=zc(t.min,t.max-r,e.min):r>s&&(n=zc(e.min,e.max-s,t.min)),qr(0,1,n)}function f8(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Vy=.35;function p8(e=Vy){return e===!1?e=0:e===!0&&(e=Vy),{x:I1(e,"left","right"),y:I1(e,"top","bottom")}}function I1(e,t,n){return{min:D1(e,t),max:D1(e,n)}}function D1(e,t){return typeof e=="number"?e:e[t]||0}const m8=new WeakMap;class g8{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=kt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n&&this.snapToCursor(gu(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:y,onDragStart:g}=this.getProps();if(p&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=BB(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ar(x=>{let v=this.getAxisMotionValue(x).get()||0;if(zr.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[x];S&&(v=Zt(S)*(parseFloat(v)/100))}}this.originPoint[x]=v}),g&&ze.update(()=>g(h,f),!1,!0),Ay(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:y,onDirectionLock:g,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=f;if(y&&this.currentDirection===null){this.currentDirection=v8(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),b&&ze.update(()=>b(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new sN(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:rN(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ze.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!od(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=c8(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Qo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=u8(r.layoutBox,t):this.constraints=!1,this.elastic=p8(n),s!==this.constraints&&!Qo(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ar(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=f8(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Qo(t))return!1;const r=t.current;Xa(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=y6(r,s.root,this.visualElement.getTransformPagePoint());let o=d8(s.layout.layoutBox,i);if(n){const a=n(p6(o));this.hasMutatedConstraints=!!a,a&&(o=TR(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ar(d=>{if(!od(d,n,this.currentDirection))return;let h=l&&l[d]||{};(o===!0||o===d)&&(h={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ay(this.visualElement,t),r.start(Kx(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ar(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ar(n=>{const{drag:r}=this.getProps();if(!od(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-Ye(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Qo(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ar(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=h8({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ar(o=>{if(!od(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Ye(l,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;m8.set(this.visualElement,this);const t=this.visualElement.current,n=uc(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),f=u.target,p=f!==t&&GB(f);d&&h&&!p&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();Qo(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=y8(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ze.read(s);const a=qc(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ar(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Vy,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function L1(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function y8(e,t,n){const r=zS(e,L1(n)),s=zS(t,L1(n));return()=>{r(),s()}}function od(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function v8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class x8 extends ji{constructor(t){super(t),this.removeGroupControls=Un,this.removeListeners=Un,this.controls=new g8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Un}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const gm=e=>(t,n)=>{e&&ze.update(()=>e(t,n),!1,!0)};class w8 extends ji{constructor(){super(...arguments),this.removePointerDownListener=Un}onPointerDown(t){this.session=new sN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:gm(t),onStart:gm(n),onMove:gm(r),onEnd:(i,o)=>{delete this.session,s&&ze.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=uc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ym=!1;class b8 extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),ym&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Vd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),ym=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ze.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Qx.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;ym=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function oN(e){const[t,n]=GR(),r=m.useContext(Ox);return c.jsx(b8,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(tN),isPresent:t,safeToRemove:n})}const S8={pan:{Feature:w8},drag:{Feature:x8,ProjectionNode:KR,MeasureLayout:oN}};function M1(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ze.postRender(()=>i(t,gu(t)))}class k8 extends ji{mount(){const{current:t}=this.node;t&&(this.unmount=WB(t,(n,r)=>(M1(this.node,r,"Start"),s=>M1(this.node,s,"End"))))}unmount(){}}class _8 extends ji{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fu(qc(this.node.current,"focus",()=>this.onFocus()),qc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function F1(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ze.postRender(()=>i(t,gu(t)))}class E8 extends ji{mount(){const{current:t}=this.node;if(!t)return;
294const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=XB(t,(s,i)=>(F1(this.node,i,"Start"),(o,{success:a})=>F1(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Uy=new WeakMap,vm=new WeakMap,T8=e=>{const t=Uy.get(e.target);t&&t(e)},C8=e=>{e.forEach(T8)};function j8({root:e,...t}){const n=e||document;vm.has(n)||vm.set(n,{});const r=vm.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(C8,{root:e,...t})),r[s]}function R8(e,t,n){const r=j8(t);return Uy.set(e,n),r.observe(e),()=>{Uy.delete(e),r.unobserve(e)}}const N8={some:0,all:1};class A8 extends ji{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:N8[s]},a=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=d?h:f;p&&p(u)};this.stopObserver=R8(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(P8(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function P8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const O8={inView:{Feature:A8},tap:{Feature:E8},focus:{Feature:_8},hover:{Feature:k8}},I8={layout:{ProjectionNode:KR,MeasureLayout:oN}},D8={...s8,...O8,...S8,...I8},I=Zz(D8,e8),L8={some:0,all:1};function M8(e,t,{root:n,margin:r,amount:s="some"}={}){const i=Jx(e),o=new WeakMap,a=u=>{u.forEach(d=>{const h=o.get(d.target);if(d.isIntersecting!==!!h)if(d.isIntersecting){const f=t(d.target,d);typeof f=="function"?o.set(d.target,f):l.unobserve(d.target)}else typeof h=="function"&&(h(d),o.delete(d.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:r,threshold:typeof s=="number"?s:L8[s]});return i.forEach(u=>l.observe(u)),()=>l.disconnect()}function Oe(e,{root:t,margin:n,amount:r,once:s=!1,initial:i=!1}={}){const[o,a]=m.useState(i);return m.useEffect(()=>{if(!e.current||s&&o)return;const l=()=>(a(!0),s?void 0:()=>a(!1)),u={root:t&&t.current||void 0,margin:n,amount:r};return M8(e.current,l,u)},[t,e,n,s,r]),o}const F8=lu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",hero:"bg-primary text-primary-foreground hover:bg-primary/90 font-display tracking-wider text-base shadow-lg hover:shadow-xl hover:scale-105",heroOutline:"border-2 border-foreground
294/30 bg-transparent text-foreground hover:border-primary hover:text-primary font-display tracking-wider text-base"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-12 rounded-md px-10",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),et=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?fT:"button";return c.jsx(o,{className:ue(F8({variant:t,size:n,className:e})),ref:i,...s})});et.displayName="Button";const Vf="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20215.78%2033.26'%20xmlns:v='https://vecta.io/nano'%3e%3cpath%20d='M4.76%2027.92c.68-9.55%201.03-16.9%201.03-22.05l-.02-2.3%204.18.04%203.84-.04-.52%207.6-.36%209.34-.11%207.41-3.66-.04a366.45%20366.45%200%200%200-4.38.04m12.38%200l.54-5.65.34-5.83.21-7%20.07-5.86%203.6.05%203.48-.08%204-.08%204.07.18c.89.08%201.7.26%202.43.52s1.35.58%201.85.95c.5.38.92.79%201.25%201.26s.59%201.01.78%201.63c.18.62.28%201.29.28%202.01%200%20.8-.1%201.54-.3%202.24a6.27%206.27%200%200%201-.96%201.96c-.43.61-.98%201.14-1.64%201.59s-1.58.9-2.77%201.36l.93%202.27.84%201.93%202.39%205.23.57%201.34-3.96-.04-4.21.04-1.04-3.44-.52-1.62-1.27-3.55-1.84-5.05a10.24%2010.24%200%200%200%201.89.18c.87%200%201.66-.13%202.36-.39.71-.26%201.24-.67%201.61-1.21s.54-1.12.54-1.73c0-.51-.14-.96-.41-1.35s-.7-.67-1.29-.87c-.59-.19-1.5-.29-2.72-.29l-1.29.03-1.56.04-.4%208.92-.23%2010.33-3.88-.04-3.73.04m25.7-.02c.68-9.55%201.03-16.9%201.03-22.05l-.02-2.3%204.18.04%203.84-.04-.52%207.6-.36%209.34-.11%207.41-3.66-.04-4.39.04m12.46%200l.54-6.51.43-9.42.16-6.33V3.57l3.6.05%203.83-.08%204.46-.08c1.59%200%202.99.1%204.19.29s2.32.58%203.36%201.18%201.91%201.37%202.61%202.34c.7.96%201.24%202.09%201.61%203.38s.55%202.62.55%203.99a16.84%2016.84%200%200%201-.43%203.88c-.29%201.24-.68%202.36-1.2%203.36-.51%201-1.11%201.86-1.79%202.58s-1.47%201.33-2.35%201.85a9.65%209.65%200%200%201-1.98.89c-.67.21-1.58.39-2.73.52-1.28.14-2.74.21-4.37.21l-7.21-.05-3.3.05m7.71-5.37l2.05.09c1.21%200%202.29-.11%203.25-.32a5.07%205.07%200%200%200%202.5-1.37c.72-.7%201.25-1.6%201.6-2.7.34-1.1.52-2.23.52-3.38%200-1.42-.26-2.61-.77-3.58s-1.19-1.64-2.04-2.02-2.01-.57-3.47-.57l-3.03.11-.6%2013.75-.01-.01zm20.51%205.36l.65-7.71.41-8.25.21-6.82-.02-1.57%2010.18.04%209.72-.04-.04.59-.09%201.55-.11%201.94-.03%201.26-5.78-.14h-3.47l-2.81.08-.22%204.1%204.91.05%205.32-.12-.34%205.44-4.74-.04-5.51.12-.21%204.33h2.05l3.76-.05%203.69-.09%202.74-.14-.36%205.46-9.54-.04-7.85.02-2.52.03h0zm124.86.02H106.25l1.82-24.27h102.1z'%20fill='%23fff'/%3e%3cpath%20d='M121.95%2022.1h-1.92l-1.2-2.66h-.01l-2.78-6.13-2.78%206.13h-.01l-1.2%202.66h-1.92l5.91-12.7zm10.93-6.2c0%203.44-2.29%206.21-6.33%206.21h-3.71v-1.77h4.17c2.42%200%204.1-1.98%204.1-4.43s-1.68-4.43-4.1-4.43h-4.17V9.71h3.71c4.14%200%206.33%202.77%206.33%206.19m6.08%202.32l.91%202.11-.92%202.08-5.61-12.71h1.92l3.69%208.53h0l.01-.01zm5.61-8.52l-4.16%209.41-.92-2.11%203.16-7.3h1.92zm7.93%201.76h-7.09V9.69h7.09v1.77zm-7.09%203.57h6.21v1.75h-6.21v-1.75zm1.77%205.29h5.32v1.77h-7.09v-1.78h1.77v.01zm17.53-10.63V22.4l-10.34-10.56V9.39l8.57%208.79V9.69h1.77zm-10.34%203.65l1.77%201.78v6.98h-1.77v-8.76zm11.94-3.65h8.27v1.74h-8.27V9.69zm3.25%202.75h1.77v9.66h-1.77v-9.66zm15.88-2.75v6.94c0%203.27-1.48%205.61-4.73%205.61s-4.73-2.35-4.73-5.61V9.69h1.77v7.54c0%201.92%201.09%203.25%202.95%203.25s2.96-1.33%202.96-3.25V9.69h1.78%200zm11.17%2012.41h-2.07l-3.08-4.28h-1.94v4.28h-1.77v-6.06h4.41c1.29%200%202.38-.67%202.38-2.27s-1.05-2.31-2.35-2.31h-4.45V9.69h3.84c3.23%200%204.73%201.62%204.73%203.97%200%201.92-1.05%203.49-2.9%203.99l3.2%204.45h0zm8.42-10.64h-7.09V9.69h7.09v1.77zm-7.09%203.57h6.2v1.75h-6.2v-1.75zm1.77%205.29h5.32v1.77h-7.09v-1.78h1.77v.01z'/%3e%3c/svg%3e",$1=[{label:"HOME",href:"/"},{label:"INSIDE IRIDE",href:"/inside-iride"},{label:"EXPEDITIONS",href:"/expeditions"},{label:"TRAINING",href:"/training"},{label:"SPECIAL COURSES",href:"/special-courses"},{label:"GREAT ESCAPE",href:"/great-escape"},{label:"FACILITIES",href:"/facilities"},{label:"GALLERY",href:"/gallery"}],Hn=()=>{const[e,t]=m.useState(!1);return c.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/90 backdrop-blur-md border-b border-border",children:[c.jsx("div",{className:"container mx-auto px-6 py-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(I.a,{href:"/",className:"flex items-center gap-2",initial:{opacity:0,x:-20}
294,animate:{opacity:1,x:0},transition:{duration:.5},children:c.jsx("img",{src:Vf,alt:"IRIDE Logo",className:"h-8 w-auto"})}),c.jsx("nav",{className:"hidden lg:flex items-center gap-1",children:$1.map((n,r)=>c.jsxs(I.a,{href:n.href,className:"px-4 py-2 text-sm font-medium text-muted-foreground hover:text-primary transition-colors duration-300 relative group",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,delay:r*.05},children:[n.label,c.jsx("span",{className:"absolute bottom-0 left-4 right-4 h-0.5 bg-primary scale-x-0 group-hover:scale-x-100 transition-transform duration-300 origin-left"})]},n.label))}),c.jsx(et,{variant:"ghost",size:"icon",className:"lg:hidden text-foreground",onClick:()=>t(!e),children:e?c.jsx(Sf,{size:24}):c.jsx(mL,{size:24})})]})}),c.jsx(jz,{children:e&&c.jsx(I.nav,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"lg:hidden bg-background border-t border-border overflow-hidden",children:c.jsx("div",{className:"container mx-auto px-6 py-4 flex flex-col gap-2",children:$1.map((n,r)=>c.jsx(I.a,{href:n.href,className:"px-4 py-3 text-sm font-medium text-muted-foreground hover:text-primary hover:bg-muted/50 rounded transition-colors duration-300",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3,delay:r*.05},onClick:()=>t(!1),children:n.label},n.label))})})})]})},$8="/assets/home-hero-bg-DJG7GiQ3.jpg",V8=()=>c.jsxs("section",{id:"home",className:"relative min-h-screen flex items-center justify-center overflow-hidden",children:[c.jsxs("div",{className:"absolute inset-0",children:[c.jsx("img",{src:$8,alt:"",width:1920,height:1080,fetchPriority:"high",decoding:"async",className:"absolute inset-0 w-full h-full object-cover"}),c.jsx("div",{className:"absolute inset-0 hero-overlay"})]}),c.jsx("div",{className:"relative z-10 container mx-auto px-6 text-center",children:c.jsxs(I.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:1,delay:.2},className:"max-w-4xl mx-auto",children:[c.jsx(I.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.8,delay:.4},className:"mb-6",children:c.jsx("span",{className:"inline-block px-4 py-2 border border-primary/50 text-primary text-sm font-medium tracking-widest bg-accent-foreground",children:"SOUTHERN AFRICA'S PREMIER ADVENTURE"})}),c.jsxs("h1",{className:"font-display text-5xl md:text-7xl lg:text-8xl text-foreground leading-none mb-6",children:["YOUR NEXT",c.jsx("br",{}),c.jsx("span",{className:"text-gradient",children:"ADVENTURE"}),c.jsx("br",{}),"STARTS HERE"]}),c.jsx(I.p,{initial:{opacity:0}
294,animate:{opacity:1},transition:{duration:.8,delay:.6},className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto mb-10",children:"We specialise in tours, expeditions and off-road motorcycle training through the magical African landscape and splendour."}),c.jsxs(I.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.8},className:"flex flex-col sm:flex-row gap-4 justify-center",children:[c.jsx(et,{variant:"hero",size:"lg",asChild:!0,children:c.jsx(Ko,{to:"/expeditions",children:"EXPLORE EXPEDITIONS"})}),c.jsx(et,{variant:"heroOutline",size:"lg",onClick:()=>{var e;return(e=document.getElementById("training"))==null?void 0:e.scrollIntoView({behavior:"smooth"})},children:"VIEW TRAINING"})]})]})}),c.jsx(I.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.5},className:"absolute bottom-8 left-1/2 -translate-x-1/2",children:c.jsxs(I.div,{animate:{y:[0,10,0]},transition:{duration:2,repeat:1/0},className:"flex flex-col items-center text-muted-foreground",children:[c.jsx("span",{className:"text-xs tracking-widest mb-2",children:"SCROLL"}),c.jsx(ux,{size:20})]})})]}),U8="/assets/about-image-DjWxwj4M.jpg",B8="/assets/iride_image_00022-BaA_E6yy.jpg",z8=()=>{const e=m.useRef(null),t=Oe(e,{once:!0,margin:"-100px"});return c.jsx("section",{id:"about",className:"py-24 bg-card",children:c.jsx("div",{className:"container mx-auto px-6",children:c.jsxs("div",{ref:e,className:"grid lg:grid-cols-2 gap-16 items-center",children:[c.jsxs(I.div,{initial:{opacity:0,x:-50},animate:t?{opacity:1,x:0}:{},transition:{duration:.8},children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"WHY IRIDE EXPEDITIONS"}),c.jsxs("h2",{className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mt-4 mb-6 leading-tight",children:["WE UNDERSTAND THE",c.jsx("br",{}),c.jsx("span",{className:"text-gradient",children:"ADVENTURE RIDER"})]}),c.jsx("div",{className:"section-divider mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed mb-6",children:"Adventure riders like to travel the world, visit new places, and experience other cultures. For some it is simply to leave the daily routine and enjoy the trip as much as the destination itself."}),c.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:"For others it is about the thrill of the open road, the adrenaline and excitement to explore new worlds, overcoming a fear, practice new skills, challenge the competitive nature inside yourself or simply just to enjoy riding as an artistic activity or a spiritual experience."}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:`At iRide Expeditions we put the "spoke" back into bespoke travel experiences. Let's spend time together to get to know your "why" and how we can tailor make your experience through our unique offerings.`})]}),c.jsxs(I.div,{initial:{opacity:0,x:50},animate:t?{opacity:1,x:0}:{},transition:{duration:.8,delay:.2},className:"relative",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"aspect-[4/3] rounded-lg overflow-hidden bg-muted",children:c.jsx("img",{src:U8,alt:"Adventure ride",className:"w-full h-full object-cover hover:scale-110 transition-transform duration-700"})}),c.jsx("div",{className:"aspect-[4/3] rounded-lg overflow-hidden bg-muted",children:c.jsx("img",{alt:"Expedition",className:"w-full h-full object-cover hover:scale-110 transition-transform duration-700",src:B8})})]}),c.jsxs("div",{className:"space-y-4 pt-8",children:[c.jsx("div",{className:"aspect-[4/3] rounded-lg overflow-hidden bg-muted",children:c.jsx("img",{alt:"Trail riding",className:"w-full h-full object-cover hover:scale-110 transition-transform duration-700",src:"/lovable-uploads/5b39b722-6d1e-4c6f-9299-70b78ee7aae0.jpg"})}),c.jsx("div",{className:"aspect-[4/3] rounded-lg overflow-hidden bg-muted",children:c.jsx("img",{alt:"Adventure",className:"w-full h-full object-cover hover:scale-110 transition-transform duration-700",src:"/lovable-uploads/ed12f308-814b-4c0d-a977-33916970256a.jpg"})})]})]}),c.jsx("div",{className:"absolute -bottom-6 -left-6 w-24 h-24 border-2 border-primary/30 rounded-lg -z-10"}),c.jsx("div",{className:"absolute -top-6 -right-6 w-24 h-24 border-2 border-primary/30 rounded-lg -z-10"})]})]})})})},W8=[{icon:sL,title:"Expert Training",description:"Certified and experienced instructors provide refresher training before departure on your adventure travels."},{icon:wo,title:"Bespoke Experiences",description:"We pride ourselves on delivering unique, bespoke adventure travels tailored to your preferences."},{icon:bs,title:"Southern Africa",description:"Experience and knowledge of traveling in various areas of natural beauty across the African continent."},{icon:zT,title:"Safety First",description:"Insight into confidence and skill-level of each rider ensures expectation levels and safety standards are maintained."}],H8=()=>{const e=m.useRef(null),t=Oe(e,{once:!0,margin:"-100px"});return c.jsx("section",{className:"py-24 bg-background",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:e,className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"WHAT WE OFFER"}),c.jsxs(I.h2,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mt-4",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"OFFERING"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mt-6"})]}),c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:W8.map((n,r)=>c.jsx(I.div,{initial:{opacity:0,y:40},animate:t?{opacity:1,y:0}:{},transition:{delay:.1*r},className:"group",children:c.jsxs("div",{className:"bg-card p-8 rounded-lg border border-border hover:border-primary/50 transition-all duration-500 h-full",children:[c.jsx("div",{className:"w-14 h-14 bg-primary/10 rounded-lg flex items-center justify-center mb-6 group-hover:bg-primary/20 transition-colors duration-500",children:c.jsx(n.icon,{className:"w-7 h-7 text-primary"})}),c.jsx("h3",{className:"font-display text-2xl text-foreground mb-3",children:n.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n.description})]})},n.title))}),c.jsx(I.p,{initial:{opacity:0}
294,animate:t?{opacity:1}:{},transition:{delay:.5},className:"text-center text-muted-foreground max-w-3xl mx-auto mt-12 text-lg",children:"iRide Expeditions offer each rider the unique offering of expert refresher training by certified and experienced instructors before departure on your adventure travels. This offers each rider and travel guide some insight into the confidence and skill-level of each rider to ensure that expectation levels and safety standards are maintained."})]})})},aN="/assets/expedition-bg-yeNBdqbP.jpg",q8=()=>{const e=m.useRef(null),t=Oe(e,{once:!0,margin:"-100px"});return c.jsxs("section",{id:"expeditions",className:"relative min-h-[80vh] flex items-center",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${aN})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/80"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-3xl",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"EXPLORE SOUTHERN AFRICA"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["UNFORGETTABLE",c.jsx("br",{}),c.jsx("span",{className:"text-gradient",children:"EXPEDITIONS"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mb-8"}),c.jsx(I.p,{initial:{opacity:0}
294,animate:t?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg leading-relaxed mb-8 max-w-2xl",children:"Adventure riders enjoy new journeys and we always maintain that the journey is also a destination on the move. Our expeditions take you through the most breathtaking landscapes Southern Africa has to offer, from the majestic mountains to the endless savannahs."}),c.jsx(I.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{delay:.4},children:c.jsx(et,{variant:"hero",size:"lg",onClick:()=>window.location.href="/expeditions",children:"VIEW ALL EXPEDITIONS"})})]})})]})},K8=[{title:"Adventure Training",description:"Master essential techniques for handling rough terrains and navigating obstacles with confidence.",link:"/training"},{title:"Special Courses",description:"Specialized training programs designed for specific skill development and advanced techniques.",link:"/special-courses"},{title:"The Great Escape",description:"An immersive riding experience combining training with an unforgettable adventure journey.",link:"/great-escape"}],G8=()=>{const e=m.useRef(null),t=Oe(e,{once:!0,margin:"-100px"});return c.jsx("section",{id:"training",className:"py-24 relative overflow-hidden bg-background",children:c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"grid lg:grid-cols-2 gap-16 items-start",children:[c.jsxs(I.div,{initial:{opacity:0,x:-50},animate:t?{opacity:1,x:0}:{},transition:{duration:.8},children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"ADVENTURE TRAINING | SPECIAL COURSES"}),c.jsxs("h2",{className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mt-4 mb-6 leading-tight",children:["HAVE THE CONFIDENCE TO",c.jsx("br",{}),c.jsx("span",{className:"text-gradient",children:"EXPLORE FAR & WIDE"})]}),c.jsx("div",{className:"section-divider mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed mb-6",children:"The iRide Adventure off-road motorcycle training is crucial for enhancing rider safety, skill, and confidence in challenging terrains."}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"It equips riders with essential techniques for handling rough, uneven surfaces, navigating obstacles, and maintaining control under varied conditions. Training also emphasises the importance of proper body positioning, throttle control, and braking, reducing the risk of accidents. Furthermore, it fosters a deeper understanding of the motorcycle's capabilities and limitations, ensuring riders can enjoy off-road adventures with greater assurance and proficiency."})]}),c.jsx(I.div,{initial:{opacity:0,x:50},animate:t?{opacity:1,x:0}:{},transition:{duration:.8,delay:.2},className:"space-y-6",children:K8.map((n,r)=>c.jsx(I.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{delay:.3+r*.1},className:"group bg-card/80 backdrop-blur-sm border border-border hover:border-primary/50 rounded-lg p-6 transition-all duration-500",children:c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-display text-2xl text-foreground mb-2 group-hover:text-primary transition-colors",children:n.title}),c.jsx("p",{className:"text-muted-foreground",children:n.description})]}),c.jsx(et,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground group-hover:text-primary group-hover:bg-primary/10 transition-all duration-300",onClick:()=>window.location.href=n.link,children:c.jsx(Ki,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})})]})},n.title))})]})})})},Y8="/assets/facility-hennops-7LPB97Vz.png",X8="/assets/facility-legends-SlnNC9ji.png",J8="/assets/facility-anura-DwuLzyNQ.png",Q8="/assets/facility-capedirt-DMP1z1H9.png",Z8=[{city:"Johannesburg",name:"Hennops",image:Y8,link:"/facilities#hennops-training-grounds"},{city:"Johannesburg",name:"Legends",image:X8,link:"/facilities#legends"},{city:"Cape Town",name:"Anura",image:J8,link:"/facilities#anura"},{city:"Cape Town",name:"Cape Dirt",image:Q8,link:"/facilities#cape-dirt"}],eW=()=>{const e=m.useRef(null),t=Oe(e,{once:!0,margin:"-100px"});return c.jsx("section",{id:"facilities",className:"py-24 bg-card",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:e,className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"WHERE WE TRAIN"}),c.jsxs(I.h2,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mt-4",children:["FIRST CLASS ",c.jsx("span",{className:"text-gradient",children:"FACILITIES"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mt-6"})]}),c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:Z8.map((n,r)=>c.jsxs(I.div,{initial:{opacity:0,y:40},animate:t?{opacity:1,y:0}:{},transition:{delay:.1*r},className:"group relative overflow-hidden rounded-lg aspect-[3/4] cursor-pointer",children:[c.jsx("img",{src:n.image,alt:n.name,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-110 transition-transform duration-700"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background via-background/50 to-transparent opacity-80 group-hover:opacity-90 transition-opacity duration-500"}),c.jsxs("div",{className:"absolute inset-0 p-6 flex flex-col justify-end",children:[c.jsxs("div",{className:"flex items-center gap-2 text-primary mb-2",children:[c.jsx(bs,{className:"w-4 h-4"}),c.jsx("span",{className:"text-sm font-medium",children:n.city})]}),c.jsx("h3",{className:"font-display text-3xl text-foreground mb-4",children:n.name}),c.jsxs(et,{variant:"link",className:"p-0 h-auto text-muted-foreground hover:text-primary group/btn",onClick:()=>window.location.href=n.link,children:["Discover more",c.jsx(Ki,{className:"w-4 h-4 ml-2 group-hover/btn:translate-x-1 transition-transform"})]})]})]},`${n.city}-${n.name}`))})]})})},tW="/assets/partner-rocket-nMTuXqCZ.png",nW="/assets/partner-tooandco-C4jDTkmF.png",rW="/assets/partner-motul-DayOJJtG.png",sW="/assets/partner-triumph-BYtdLAvc.png",iW="/assets/partner-trailquest-xN8on4BL.png",oW="/assets/partner-helly-hansen-DG3_RTCD.png",lN="/assets/partner-bikeshed-CKpzLU9S.png",aW=[{name:"Rocket",logo:tW,url:"https://www.rockethems.c
294o.za/"},{name:"Helly Hansen",logo:oW,url:"https://hellyhansen.co.za/"},{name:"Too & Co",logo:nW,url:"https://www.tooandco.co.za/"},{name:"Motul",logo:rW,url:"https://www.motul.com/en-ZA"},{name:"Triumph",logo:sW,url:"https://www.triumphmotorcycles.co.za/"},{name:"Trail Quest",logo:iW,url:"https://www.trailquestadventure.com/"},{name:"Bike Shed",logo:lN,url:"https://thebikeshed.cc/"}],lW=()=>{const e=m.useRef(null),t=Oe(e,{once:!0,margin:"-100px"});return c.jsx("section",{className:"py-24 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:e,className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.6},className:"text-primary text-sm font-medium tracking-widest",children:"TRUSTED COLLABORATIONS"}),c.jsxs(I.h2,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.6,delay:.1},className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mt-4 mb-6",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"PARTNERS"})]}),c.jsx(I.div,{initial:{scaleX:0},animate:t?{scaleX:1}:{},transition:{duration:.8,delay:.2},className:"section-divider mx-auto"})]}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-6",children:aW.map((n,r)=>c.jsxs(I.a,{href:n.url,target:"_blank",rel:"noopener noreferrer",initial:{opacity:0,y:40},animate:t?{opacity:1,y:0}:{},transition:{delay:.1*r},className:"group relative overflow-hidden rounded-lg aspect-[3/4] cursor-pointer",children:[c.jsx("div",{className:"absolute inset-0 w-full h-full flex items-center justify-center p-6 group-hover:scale-110 transition-transform duration-700",children:c.jsx("img",{src:n.logo,alt:n.name,className:`object-contain ${n.name==="Bike Shed"?"w-28 h-28 md:w-32 md:h-32 bg-white rounded-full p-2":"w-full h-full"}`})}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background via-background/50 to-transparent opacity-80 group-hover:opacity-90 transition-opacity duration-500"}),c.jsxs("div",{className:"absolute inset-0 p-6 flex flex-col justify-end",children:[c.jsx("h3",{className:"font-display text-xl text-foreground mb-4",children:n.name}),c.jsx(et,{variant:"link",className:"p-0 h-auto text-muted-foreground hover:text-primary group/btn justify-start",asChild:!0,children:c.jsxs("span",{children:["Visit site",c.jsx(Ki,{className:"w-4 h-4 ml-2 group-hover/btn:translate-x-1 transition-transform"})]})})]})]},n.name))})]})})},cW=()=>{const e=m.useRef(null),t=Oe(e,{once:!0,margin:"-100px"});return c.jsx("section",{id:"contact",className:"py-24 bg-card",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:e,className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"GET IN TOUCH"}),c.jsxs(I.h2,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mt-4",children:["START YOUR ",c.jsx("span",{className:"text-gradient",children:"ADVENTURE"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mt-6"})]}),c.jsx("div",{className:"max-w-2xl mx-auto",children:c.jsxs(I.div,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{duration:.8},className:"space-y-8 text-center",children:[c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed",children:"Ready to embark on your next adventure? Get in touch with us to discuss your riding goals, book training sessions, or plan your expedition."}),c.jsxs("div",{className:"grid sm:grid-cols-3 gap-8",children:[c.jsxs("div",{className:"flex flex-col items-center gap-4",children:[c.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center",children:c.jsx(WT,{className:"w-5 h-5 text-primary"})}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-display text-xl text-foreground mb-1",children:"Email Us"}),c.jsxs("p",{className:"text-muted-foreground text-sm",children:[c.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors",children:"[email protected]"}),c.jsx("br",{}),c.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors",children:"[email protected]"})]})]})]}),c.jsxs("div",{className:"flex flex-col items-center gap-4",children:[c.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center",children:c.jsx(qT,{className:"w-5 h-5 text-primary"})}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-display text-xl text-foreground mb-1",children:"Call Us"}),c.jsxs("p",{className:"text-muted-foreground text-sm",children:["+27 (0) 83 845 4787",c.jsx("br",{}),"+44 (0)7884 883 594"]})]})]}),c.jsxs("div",{className:"flex flex-col items-center gap-4",children:[c.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center",children:c.jsx(bs,{className:"w-5 h-5 text-primary"})}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-display text-xl text-foreground mb-1",children:"Location"}),c.jsxs("p",{className:"text-muted-foreground text-sm",children:["Johannesburg & Cape Town, South Africa",c.jsx("br",{}),"London, UK"]})]})]})]})]})})]})})},qn=()=>{const e=new Date().getFullYear();return c.jsx("footer",{className:"bg-background border-t border-border",children:c.jsxs("div",{className:"container mx-auto px-6 py-16",children:[c.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-12",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsx("img",{src:Vf,alt:"IRIDE Logo",className:"h-8 w-auto"}),c.jsx("p",{className:"text-muted-foreground mt-4 max-w-md leading-relaxed",children:'Born out of passion for "2 wheels travelling" through the magical African landscape and splendour. Adventure training and expeditions across Southern Africa.'}),c.jsx("div",{className:"flex gap-4 mt-6",children:[{Icon:cL,href:"https://www.facebook.com/iride.co.za"},{Icon:hL,href:"https://www.instagram.com/iride_adventure/"}].map(({Icon:t,href:n},r)=>c.jsx(I.a,{href:n,target:n.startsWith("http")?"_blank":void 0,rel:n.startsWith("http")?"noopener noreferrer":void 0,whileHover:{scale:1.1},whileTap:{scale:.95},className:"w-10 h-10 bg-card border border-border rounded-lg flex items-center justify-center text-muted-foreground hover:text-primary hover:border-primary/50 transition-colors",children:c.jsx(t,{className:"w-5 h-5"})},r))})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-display text-xl text-foreground mb-6",children:"QUICK LINKS"}),c.jsx("ul",{className:"space-y-3",children:[{label:"Home",href:"/"},{label:"Inside iRide",href:"/inside-iride"},{label:"Expeditions",href:"/expeditions"},{label:"Great Escape",href:"/great-escape"},{label:"Facilities",href:"/facilities"},{label:"Gallery",href:"/gallery"}].map(t=>c.jsx("li",{children:c.jsx("a",{href:t.href,className:"text-muted-foreground hover:text-primary transition-colors",children:t.label})},t.label))})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-display text-xl text-foreground mb-6",children:"TRAINING"}),c.jsx("ul",{className:"space-y-3",children:[{label:"Adventure Training",href:"/training"},{label:"Special Courses",href:"/special-courses"}].map(t=>c.jsx("li",{children:c.jsx("a",{href:t.href,className:"text-muted-foreground hover:text-primary transition-colors",children:t.label})},t.label))})]})]}),c.jsxs("div",{className:"border-t border-border mt-12 pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[c.jsxs("p",{className:"text-muted-foreground text-sm",children:["© ",e," iRide Adventure. All rights reserved."]}),c.jsxs("div",{className:"flex gap-6 text-sm",children:[c.jsx("a",{href:"/privacy-policy",className:"text-muted-foreground hover:text-primary transition-colors",children:"Privacy Policy"}),c.jsx("a",{href:"/terms-and-conditions",className:"text-muted-foreground hover:text-primary transition-colors",children:"Terms & Conditions"})]})]})]})})},uW={"@context":"https://schema.org","@type":"Organization",name:"iRide Adventures",alternateName:"ODYSSEY RIDERS (PTY) LTD",url:"https://iride-adventures.lovable.app",logo:"https://storage.googleapis.com/gpt-engineer-file-uploads/Uq2NiBaUOEMxwwNjdnJqGlFdJVv2/social-images/social-1770217569644-iride-logo_white_med.svg"},dW={"@context":"https://schema.org","@type":"WebSite",name:"iRide Adventures",url:"https://iride-adventures.lovable.app"},hW=()=>{const e=Po();return m.useEffect(()=>{if(e.hash){const t=document.querySelector(e.hash);t&&setTimeout(()=>{t.scrollIntoView({behavior:"smooth"})},100)}},[e]),c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"iRide Adventures â Motorcycle Tours & Off-Road Training",description:"Guided adventure motorcycle expeditions and off-road training across South Africa. Ride the Cape, Karoo and beyond with iRide Adventures.",path:"/",jsonLd:[uW,dW]}),c.jsx(Hn,{}),c.jsxs("main",{children:[c.jsx(V8,{}),c.jsx(z8,{}),c.jsx(H8,{}),c.jsx(q8,{}),c.jsx(G8,{}),c.jsx(eW,{}),c.jsx(lW,{}),c.jsx(cW,{})]}),c.jsx(qn,{})]})},cN="/assets/expeditions-bg-D5XyVHuS.jpg",fW=[{name:"Cape-Karoo-Coast Expedition 2026",dates:"3 â 8 October 2026",subtitle:"This is a unique and exclusive expedition for Bike Shed members â fully booked.",description:`CapeâKarooâCoast Expedition 2026 is an unforgettable journey through the heart and soul of South Africa, beginning and ending at the foot of iconic Table Mountain in Cape Town, one of the New 7 Wonders of Nature. From the Mother City, the route winds through the world-renowned Cape Winelands before leaving the tar behind and venturing deep into the rugged beauty of the Little Karoo. 295 296Traverse dramatic mountain passes and remote gravel roads as you journey into the legendary Gamkaskloof â known simply as âThe Hellâ â where youâll experience true African wilderness and sleep beneath star-filled skies. From there, the landscape transforms as the expedition carries you from semi-desert terrain into Eden itself: the lush forests, rolling hills, and dramatic coastline of the Garden Route. 297 298Continuing through the fynbos-rich Overberg, the route reaches the southern-most tip of Africa at Cape Agulhas before turning back toward Cape Town along breathtaking coastal roads, including the spectacular Clarence Drive. Along the way, expect exquisite local cuisine and accommodation, wine tasting, African game viewing, sweeping ocean vistas, and warm traditional hospital
298ity. 299 300This meticulously planned expedition showcases South Africaâs extraordinary diversity of landscapes, flora, and fauna â and promises memories that will last a lifetime.`},{name:"Lesotho",subtitle:"Iconic pass: Sani Pass",description:`Lesotho â is a small, mountainous, and landlocked country, surrounded by its much larger neighbour, South Africa. It has a population of about two million people. It is an enclave, surrounded by South Africa and the total length of the country's borders is 909 kilometres (565 mi). Lesotho covers an area of around 30,355 square kilometres (11,720 sq mi). Lesotho is one of only three countries in the world that are enclaved within another country; the other two are San Marino and Vatican City, both located within Italy. Apart from its status as an enclave, it is the only independent state in the world that lies entirely above 1,000 metres (3,281 ft) in elevation. Its lowest point is at 1,400 metres (4,593 ft), the "highest lowest point" of any country. Because of its elevation, the country's climate is cooler than in most other regions at the same latitude. Lesotho offers unique adventure riding experiences and most of the roads are un-paved which is very appealing to the adventure motorcycle connoisseur.`},{name:"Baviaanskloof",subtitle:"Southern Cape Experience",description:'The word Baviaanskloof, although derived from the Dutch "valley of baboons", is associated with pristine nature, narrow gorges with flowing streams, steep mountain passes, vast plains with waving grasslands and views of unspoilt wilderness. Nature has taken its course over thousands of years to create what is today universally recognised as the Baviaanskloof World Heritage Site. Few other places in the world hold evidence of the footprint of human history spanning over a million years. The narrow valley of the Baviaanskloof is just under 200 kilometers (124 mi) in length and bounded by two mountain ranges: the Baviaanskloof Mountains on the north and the Kouga mountains on the south side. The valley lies at a lower altitude than the Karoo in the north. The rainfall of the Karoo thus filters through the mountains to the Baviaanskloof river. For this reason, the valley is surprisingly lush and supports a wider variety of plant species than would have been otherwise expected.'},{name:"Swartberg Mountains & Gamkaskloof",subtitle:"World Heritage Site",description:"The Swartberg Nature Reserve is teeming with a rich history and is perhaps best known as Gamkaskloof â a small settlement established there in 1830 by farmers of European origin. Entirely self-sufficient, the community of Gamkaskloof lived in isolation for over a century. The first road into Die Hel, as it is known, was only built in 1962. The village is now a cultural heritage site that forms part of the Swartberg Nature Reserve, a World Heritage Site. Swartberg Nature Reserve lies in the district of Oudtshoorn, between the Great and Little Karoo. Itâs an area of climatic extremes where winters are characterised by vast snow-capped mountains while summer days reach high temperatures. The Swartberg Pass is a wildly popular setting for both photographers and filmmakers."},{name:"Swaziland",subtitle:"Kingdom of Eswatini",description:"Swaziland is a landlocked country in Southern Africa. It is bordered by Mozambique to its northeast and South Africa to its north, west, and south. At no more than 200 kilometres (120 mi) north to south and 130 kilometres (81 mi) east to west, Eswatini is one of the smallest countries in Africa; despite this, its climate and topography are diverse, ranging from a cool and mountainous highveld to a hot and dry lowveld. Eswatini lies across a fault which runs from the Drakensberg Mountains of Lesotho, north through the Eastern highlands of Zimbabwe, and forms the Great Rift Valley of Kenya. The country has four separate geographical regions. These run from North to South and are determined by altitude. It has a wide variety of landscapes, from the mountains along the Mozambican border to savannas in the east and rain forest in the northwest. Several rivers flow through the country, such as the Great Usutu River."},{name:"Cape Town Winelands",subtitle:"The Fairest Cape",description:"Cape Town is also called âthe Fairest Capeâ, and thereâs a reason for this. It really is a magical city, with flat-topped Table Mountain looming over it. It stretches around the mountain, and wherever you are, there are often glimpses of sea and golden beaches, not to mention that iconic mountain as its beautiful backdrop. About 40 km (25 mi) to the east of Cape Town, lying in the shadow of a continuous belt of Cape fold mountains, lies a series of generous valleys known as the Cape Winelands â a collection of historic towns, little hamlets and Cape Dutch farmsteads that provide well-regarded South African wines to the world."},{name:"Foot Of Africa",subtitle:"Southern Tip of Africa",description:'Cape Agulhas is the southernmost point of the African continent, located 176 km (109 mi) southeast of Cape Town. Its name, Portuguese for "needles," may refer to the jagged rocks and reefs there that have wrecked many ships; another explanation attributes the name to observations by early Portuguese navigators that their compass needles showed no magnetic deviation there. A lighthouse was established there in 1849. The meridian (20° E) is the official boundary between the Indian and Atlantic oceans. Come and stand at the southern most point of the African continent and watch how two big oceans meet.'},{name:"Cederberg Tankwa Karoo Area",subtitle:"Desert & Mountains",description:'Lying between the Cederberg Mountains and the Great Karoo escarpment, it incorporates three distinct ecosystems â pure desert in the west, open grasslands in the centre and the Roggeveld Mountains in the east. The true meaning of the word "Tankwa" is unknown, but it is said to be "Turbid water", "Place of the San" or "Thirst land", all of which fits this arid yet picturesque area so well. Humans have lived in the region for at least 10 000 years â first the Bushmen and then the Khoi, who moved their livestock with the migration of the wild animals. Then, in the 1700âs, the trekboer farmers started using the Tankwa to graze their sheep while moving from the summer heat of the Cederberg to the cooler temperatures on the Karoo escarpment.'},{name:"Garden Route",subtitle:"Coastal Paradise",description:"Straddling the beautiful stretches of coastlines of the Western and E
300astern Cape provinces of South Africa, the 200 km (124 mi) long stretch of Garden Route derives its name from the stunning natural beauty and unique, ecologically diverse vegetation that typify the region, including grasslands, wetlands, forests and mountainous regions, and the numerous lagoons, lakes and rivers that dot the coastline. The Cape Floral Region, recognised by UNESCO for its staggering biodiversity only spans 0.5% of the African continent, but it contains 20% of the continentâs plant species."}],pW=[{"@context":"https://schema.org","@type":"Product",name:"Cape-Karoo-Coast Expedition 2026",description:"An unforgettable guided motorcycle journey through South Africa's Cape, Karoo and Coast. Includes wine tasting, game viewing, mountain passes and warm hospitality.",brand:{"@type":"Organization",name:"iRide Adventures"},offers:{"@type":"Offer",url:"https://iride-adventures.lovable.app/booking",availability:"https://schema.org/InStock"}}],mW=[{number:"1",title:"Choose A Destination",icon:bs},{number:"2",title:"Gather Some Friends",icon:wo},{number:"3",title:"Click Enquire Now",icon:gL}],gW=({expedition:e,index:t})=>{const n=m.useRef(null),r=Oe(n,{once:!0,margin:"-50px"}),s=e.name==="Cape-Karoo-Coast Expedition 2026";return c.jsx(I.div,{ref:n,initial:{opacity:0,y:50},animate:r?{opacity:1,y:0}:{},transition:{delay:t*.1},className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-colors duration-300",children:c.jsxs("div",{className:"p-6 md:p-8",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"font-display text-2xl md:text-3xl text-foreground mb-1",children:[e.name,e.dates&&c.jsx("span",{className:"text-primary font-display text-2xl md:text-3xl ml-3",children:e.dates})]}),c.jsx("span",{className:s?"inline-block px-4 py-2 border border-primary/50 text-primary text-sm font-medium tracking-widest bg-accent-foreground mt-2 uppercase":"text-primary text-sm font-medium tracking-wider block mt-2",children:e.subt
300itle})]}),s&&c.jsx("img",{src:lN,alt:"Bike Shed Approved",className:"w-24 h-24 md:w-32 md:h-32 flex-shrink-0 bg-white rounded-full p-2"})]}),c.jsx("div",{className:"text-muted-foreground mt-4 leading-relaxed text-sm md:text-base space-y-4",children:e.description.split(` 301 302`).map((i,o)=>c.jsx("p",{children:i},o))}),s?c.jsx("div",{className:"mt-6",children:c.jsx(et,{variant:"hero",size:"default",disabled:!0,children:"Fully booked"})}):c.jsx(et,{variant:"hero",size:"default",className:"mt-6",asChild:!0,children:c.jsx("a",{href:"/#contact",children:"ENQUIRE NOW"})})]})})},yW=()=>{const e=m.useRef(null),t=Oe(e,{once:!0}),n=m.useRef(null),r=Oe(n,{once:!0,margin:"-100px"});return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Adventure Motorcycle Expeditions in Southern Africa | iRide",description:"Multi-day guided motorcycle expeditions across the Cape, Karoo and Southern Africa. Small groups, expert guides, unforgettable routes.",path:"/expeditions",jsonLd:pW}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[70vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${cN})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-4xl mx-auto text-center",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"RIDE SOUTH AFRICA AND BEYOND"}),c.jsxs(I.h1,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["IRIDE ",c.jsx("span",{className:"text-gradient",children:"EXPEDITIONS"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.h2,{initial:{opacity:0}
302,animate:t?{opacity:1}:{},transition:{delay:.3},className:"text-foreground text-xl md:text-2xl font-display mb-4",children:"We understand the adventure rider and the reasons why we ride"}),c.jsx(I.p,{initial:{opacity:0},animate:t?{opacity:1}:{},transition:{delay:.4},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Adventure riders like to travel the world, visit new places, and experience other cultures. For some it is simply to leave the daily routine and enjoy the trip as much as the destination itself. For others it is about the thrill of the open road, the adrenaline and excitement to explore new worlds, overcoming a fear, practice new skills, challenge the competitive nature inside yourself or simply just to enjoy riding as an artistic activity or a spiritual experience. Adventure riders enjoy new journeys and we always maintain that the journey is also a destination on the move."}),c.jsx(I.p,{initial:{opacity:0},animate:t?{opacity:1}:{},transition:{delay:.5},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto mt-6",children:"At iRide Expeditions we put the âspokeâ back into bespoke travel experiences. Letâs spend time together to get to know your âwhyâ and how we can tailor make your experience through our unique offerings."})]})})]}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"EXPLORE SOUTHERN AFRICA"}),c.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"OFFERING"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"iRide Expeditions offer each rider the unique offering of expert refresher training by certified and experience instructors before departure on your adventure travels. This offers each rider and travel guide some insight into the confidence and skill-level of each rider to ensure that expectation levels and safety standards are maintained."}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-3xl mx-auto mt-4",children:"We pride ourselves on delivering unique, bespoke adventure travels across Southern Africa. We have experience and knowledge of traveling in various areas of natural beauty across the foot of the African continent."})]}),c.jsx("div",{className:"grid gap-8",children:fW.map((s,i)=>c.jsx(gW,{expedition:s,index:i},s.name))})]})}),c.jsx("section",{className:"py-20 md:py-32 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:n,className:"text-center mb-16",children:[c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:r?{opacity:1,y:0}:{},className:"font-display text-3xl md:text-5xl text-foreground mb-6",children:["Plan Your Next Adventure With Us In"," ",c.jsx("span",{className:"text-gradient",children:"3 Easy Steps"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:r?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto"})]}),c.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-4xl mx-auto",children:mW.map((s,i)=>c.jsxs(I.div,{initial:{opacity:0,y:30},animate:r?{opacity:1,y:0}:{},transition:{delay:.3+i*.1},className:"text-center",children:[c.jsx("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 border-2 border-primary flex items-center justify-center",children:c.jsx(s.icon,{className:"w-8 h-8 text-primary"})}),c.jsxs("span",{className:"font-display text-5xl text-primary",children:[s.number,"."]}),c.jsx("h3",{className:"font-display text-xl text-foreground mt-2",children:s.title})]},s.number))}),c.jsxs(I.div,{initial:{opacity:0,y:30},animate:r?{opacity:1,y:0}:{},transition:{delay:.6},className:"text-center mt-12",children:[c.jsx("h3",{className:"font-display text-2xl md:text-3xl text-foreground mb-6",children:"Let us design and plan your once in a life-time adventure trip"}),c.jsx(et,{variant:"hero",size:"lg",asChild:!0,children:c.jsx("a",{href:"/#contact",children:"ENQUIRE NOW"})})]})]})}),c.jsx(qn,{})]})},vW="/assets/great-escape-bg-Dmc2yLeM.jpg",xW="/assets/great-magalies-escape-C51GHUe1.jpg",wW="/assets/great-vaal-marina-escape-DtDz2fWl.jpg",bW="/assets/great-agri-escape-T-KQwGPd.jpg",SW="/assets/great-border-escape-D5CFIIye.jpg",kW="/assets/great-canal-escape-C9AZEcT6.jpg",_W=[{title:"Out-Rides",subtitle:"Few Hours",description:"Quick escapes for a few hours to test your skills on nearby trails and scenic routes.",icon:aL},{title:"Full Day Trips",subtitle:"Dawn to Dusk",description:"Complete day adventures exploring diverse terrains and breathtaking landscapes.",icon:zT},{title:"Weekend Escapes",subtitle:"2-3 Days",description:"Extended adventures with overnight stays, combining riding with camaraderie.",icon:wo},{title:"Official Expeditions",subtitle:"Days to Weeks",description:"Full-scale expeditions lasting days or weeks, exploring the depths of Southern Africa.",icon:bs}],EW=[{name:"The Great Canal Escape",image:kW},{name:"The Great Magalies Escape",image:xW},{name:"The Great Vaal Marina Escape",image:wW},{name:"The Great Agri Escape",image:bW},{name:"The Great Border Escape",image:SW}],TW=({event:e,index:t})=>{const n=m.useRef(null),r=Oe(n,{once:!0,margin:"-50px"});return c.jsxs(I.div,{ref:n,initial:{opacity:0,y:50},animate:r?{opacity:1,y:0}:{},transition:{delay:t*.1},className:"group relative overflow-hidden rounded-lg",children:[c.jsx("div",{className:"aspect-video overflow-hidden",children:c.jsx("img",{src:e.image,alt:e.name,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"})}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/90 via-background/40 to-transparent flex items-end",children:c.jsx("h3",{className:"font-display text-xl md:text-2xl text-foreground p-4 md:p-6",children:e.name})})]})},CW=()=>{const e=m.useRef(null),t=Oe(e,{once:!0}),n=m.useRef(null),r=Oe(n,{once:!0,margin:"-100px"}),s=m.useRef(null),i=Oe(s,{once:!0,margin:"-100px"});return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"The Great Escape Weekend Rides | iRide Adventures",description:"Weekend escape rides and curated mini-adventures for adventure motorcyclists in South Africa with iRide Adventures.",path:"/great-escape"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[70vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${vW})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-4xl mx-auto text-center",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"PUT YOUR NEW SKILLS INTO PRACTICE"}),c.jsxs(I.h1,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["THE GREAT ",c.jsx("span",{className:"text-gradient",children:"ESCAPE"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:t?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:'We offer riders various options to experience what we call "The Great Escape" after acquiring new riding skills through our training days. Once you feel comfortable to venture off the beaten track, we offer exciting trips to put your new skills into practice.'}),c.jsx(I.p,{initial:{opacity:0},animate:t?{opacity:1}:{},transition:{delay:.4},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto mt-6",children:"Our aim is to guide each rider through the necessary training and to convert that into becoming a real adventure motorbike explorer â while riding within your own individual safety and comfort zone."}),c.jsx(I.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{delay:.5},className:"mt-8",children:c.jsx(et,{variant:"hero",size:"lg",asChild:!0,children:c.jsx("a",{href:"/#contact",children:"ENQUIRE ABOUT TRIPS"})})})]})})]}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:n,className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:r?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"ADVENTURE OPTIONS"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:r?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["ESCAPE ",c.jsx("span",{className:"text-gradient",children:"EXPERIENCES"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:r?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:r?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:'These "Great Escapes" could vary from an out-ride for a few hours, full day trips, weekend escapes as well as official expeditions that could last up to a few days or weeks.'})]}),c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:_W.map((o,a)=>c.jsxs(I.div,{initial:{opacity:0,y:30},animate:r?{opacity:1,y:0}:{},transition:{delay:.4+a*.1},className:"bg-card border border-border rounded-lg p-6 text-center hover:border-primary/50 transition-colors duration-300",children:[c.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-primary/10 border-2 border-primary flex items-center justify-center",children:c.jsx(o.icon,{className:"w-7 h-7 text-primary"})}),c.jsx("h3",{className:"font-display text-xl text-foreground mb-1",children:o.title}),c.jsx("span",{className:"text-primary text-sm font-medium tracking-wider",children:o.subtitle}),c.jsx("p",{className:"text-muted-foreground text-sm mt-4",children:o.description})]},o.title))})]})}),c.jsx("section",{className:"py-16 bg-primary/10 border-y border-primary/20",children:c.jsx("div",{className:"container mx-auto px-6 text-center",children:c.jsxs(I.h2,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},className:"font-display text-3xl md:text-5xl text-foreground",children:["ADVENTURE ",c.jsx("span",{className:"text-gradient",children:"LOADING..."})]})})}),c.jsx("section",{className:"py-20 md:py-32 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:s,className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:i?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"MEMORIES FROM THE ROAD"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:i?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["PAST ",c.jsx("span",{className:"text-gradient",children:"EVENTS"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:i?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto"})]}),c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:EW.map((o,a)=>c.jsx(TW,{event:o,index:a},o.name))})]})}),c.jsx(qn,{})]})},jW="/assets/training-level-up-bg-AXls1Sjr.jpg",RW=[{"@context":"https://schema.org","@type":"Course",name:"Level 1 Off-Road Motorcycle Training",description:"For riders with no off-road experience or those looking for a refresher. Covers lifting and balancing the bike, slow-speed manoeuvres, braking techniques, hill ascents and descents, trail riding on gravel and dirt roads, and momentum control.",provider:{"@type":"Organization",name:"iRide Adventures",sameAs:"https://iride-adventures.lovable.app"}},{"@context":"https://schema.org","@type":"Course",name:"Level 2 Advanced Off-Road Motorcycle Training",description:"For riders who have completed Level 1 and seek further skill development. Covers advanced riding position, downhill turns, turning without wheel spin, technical hill climbs, riding ruts, off-camber riding, and skills trials challenges.",provider:{"@type":"Organization",name:"iRide Adventures",sameAs:"https://iride-adventures.lovable.app"}}],NW=["Riders with no off-road experience","Riders with limited experience looking for refresher training"],AW=["Lifting and balancing the bike in challenging conditions","Slow-speed manoeuvres and clutch control exercises to build precision","Braking techniques for off-road conditions, improving stopping power and control","Hill ascents and descents, building your confidence to navigate steep terrain","Trail riding on gravel and dirt roads, allowing you to put your skills into practice","Momentum control to maintain stability in different terrains"],PW=["Riders who have confidently completed Level One and seek further skill development","Riders looking to tackle more challenging off-road trails","Adventure riders aiming to boost their confidence in demanding off-road conditions","Riders already confident with off-road riding but eager to learn new techniques"],OW=["Advanced riding position for improved control and comfort","Downhill turns with precision and confidence","Turning on the trail without wheel spin, mastering tight manoeuvres","Technical hill climbs, preparing you for steeper, more rugged terrain","Introduction to riding ruts and navigating difficult trail conditions","Off-camber riding, essential for traversing uneven ground","Skills and trials challenge to test and refine your abilities"],IW=[{title:"Adventure Training",description:"Master essential techniques for handling rough terrains and navigating obstacles with confidence.",icon:HT,href:"/training"},{title:"Special Courses",description:"Specialized training programs designed for specific skill development and advanced techniques.",icon:Dg,href:"/special-courses"},{title:"The Great Escape",description:"An immersive riding experience combining training with an unforgettable adventure journey.",icon:uL,href:"/#escape"}],DW=()=>{const e=m.useRef(null),t=m.useRef(null),n=m.useRef(null),r=m.useRef(null),s=m.useRef(null),i=m.useRef(null),o=Oe(e,{once:!0}),a=Oe(t,{once:!0,margin:"-100px"}),l=Oe(n,{once:!0,margin:"-100px"}),u=Oe(r,{once:!0,margin:"-100px"}),d=Oe(s,{once:!0,margin:"-100px"}),h=Oe(i,{once:!0,margin:"-100px"});return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Off-Road Motorcycle Training & Courses | iRide Adventures",description:"Build off-road and adventure riding skills with structured Level 1 and Level 2 motorcycle training courses at iRide Adventures.",path:"/training",jsonLd:RW}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[70vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${jW})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-4xl mx-auto text-center",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:o?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"ADVENTURE MOTORCYCLE TRAINING"}),c.jsxs(I.h1,{initial:{opacity:0,y:30},animate:o?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["IRIDE ",c.jsx("span",{className:"text-gradient",children:"TRAINING"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:o?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.h2,{initial:{opacity:0}
302,animate:o?{opacity:1}:{},transition:{delay:.3},className:"text-foreground text-xl md:text-2xl font-display mb-4",children:"Have the confidence to explore far and wide"}),c.jsx(I.p,{initial:{opacity:0},animate:o?{opacity:1}:{},transition:{delay:.4},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Comprehensive off-road riding training courses designed for riders of all skill levels. Whether you're new to off-road adventures or looking to enhance your current abilities, our courses provide the guidance and practice you need to ride with confidence."})]})})]}),c.jsx("section",{ref:t,className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:a?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"OUR TRAINING PROGRAMS"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:a?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["SKILL ",c.jsx("span",{className:"text-gradient",children:"DEVELOPMENT"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:a?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:a?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"Our training courses are structured to take you from beginner to advanced levels, ensuring you develop the skills and confidence needed for any off-road adventure."})]}),c.jsxs(I.div,{initial:{opacity:0,y:30},animate:a?{opacity:1,y:0}:{},transition:{delay:.4},className:"grid md:grid-cols-2 gap-8 max-w-4xl mx-auto",children:[c.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 hover:border-primary/50 transition-colors duration-300",children:[c.jsx("h3",{className:"font-display text-2xl text-foreground mb-3",children:"Level One"}),c.jsx("span",{className:"text-primary text-sm font-medium tracking-wider",children:"Introduction to Off-Road"}),c.jsx("p",{className:"text-muted-foreground mt-4 leading-relaxed",children:"Perfect for beginners, this course covers essential off-road techniques, helping you develop core skills such as balance, vision, braking, and slow-speed manoeuvres."})]}),c.jsxs("div",{className:"bg-card border border-border rounded-lg p-8 hover:border-primary/50 transition-colors duration-300",children:[c.jsx("h3",{className:"font-display text-2xl text-foreground mb-3",children:"Level Two"}),c.jsx("span",{className:"text-primary text-sm font-medium tracking-wider",children:"Intermediate Adventure"}),c.jsx("p",{className:"text-muted-foreground mt-4 leading-relaxed",children:"For those who have completed Level One or have a solid foundation in off-road riding, Level Two takes your skills to a higher level with advanced techniques."})]})]})]})}),c.jsx("section",{ref:n,className:"py-20 md:py-32 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:l?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"LEVEL ONE"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:l?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["INTRODUCTION TO ",c.jsx("span",{className:"text-gradient",children:"OFF-ROAD RIDING"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:l?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:l?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"Our Level One Adventure Motorcycle Training is designed to teach you the essential skills required for safe and confident off-road riding, regardless of your prior experience."})]}),c.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-start",children:[c.jsxs(I.div,{initial:{opacity:0,x:-50},animate:l?{opacity:1,x:0}:{},transition:{duration:.8,delay:.4},children:[c.jsx("p",{className:"text-muted-foreground leading-relaxed mb-8",children:"Whether you are a complete beginner or need a refresher, this course will help you master the fundamentals of off-road techniques while also improving your road-riding skills. You will learn vital theories and practical exercises that focus on body positioning, balance, and the effective use of motorcycle controls."}),c.jsxs("div",{className:"mb-8",children:[c.jsxs("h4",{className:"font-display text-xl text-foreground mb-4 flex items-center gap-2",children:[c.jsx(wo,{className:"w-5 h-5 text-primary"}),"Target Audience"]}),c.jsx("ul",{className:"space-y-3",children:NW.map((f,p)=>c.jsxs("li",{className:"flex items-start gap-3 text-muted-foreground",children:[c.jsx(db,{className:"w-5 h-5 text-primary shrink-0 mt-0.5"}),f]},p))})]}),c.jsx(et,{variant:"hero",size:"lg",asChild:!0,children:c.jsxs("a",{href:"/#contact",className:"inline-flex items-center",children:["BOOK LEVEL ONE",c.jsx(Ki,{className:"w-5 h-5 ml-2"})]})})]}),c.jsxs(I.div,{initial:{opacity:0,x:50},animate:l?{opacity:1,x:0}:{},transition:{duration:.8,delay:.5},children:[c.jsxs("h4",{className:"font-display text-xl text-foreground mb-6 flex items-center gap-2",children:[c.jsx(Dg,{className:"w-5 h-5 text-primary"}),"Key Lessons"]}),c.jsx("div",{className:"space-y-4",children:AW.map((f,p)=>c.jsx(I.div,{initial:{opacity:0,y:20},animate:l?{opacity:1,y:0}:{},transition:{delay:.6+p*.1},className:"bg-card border border-border rounded-lg p-4 hover:border-primary/50 transition-colors duration-300",children:c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsxs("span",{className:"text-primary font-display text-lg",children:["0",p+1]}),c.jsx("p",{className:"text-muted-foreground",children:f})]})},p))})]})]})]})}),c.jsx("section",{ref:r,className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:u?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"LEVEL TWO"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:u?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["INTERMEDIATE ",c.jsx("span",{className:"text-gradient",children:"ADVENTURE RIDING"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:u?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:u?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"The Level Two Adventure Riding Course is a faster-paced, progressive continuation of the Level One training, designed to further develop your off-road riding skills."})]}),c.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-start",children:[c.jsxs(I.div,{initial:{opacity:0,x:-50},animate:u?{opacity:1,x:0}:{},transition:{duration:.8,delay:.4},children:[c.jsxs("h4",{className:"font-display text-xl text-foreground mb-6 flex items-center gap-2",children:[c.jsx(Dg,{className:"w-5 h-5 text-primary"}),"Key Lessons"]}),c.jsx("div",{className:"space-y-4",children:OW.map((f,p)=>c.jsx(I.div,{initial:{opacity:0,y:20},animate:u?{opacity:1,y:0}:{},transition:{delay:.5+p*.1},className:"bg-card border border-border rounded-lg p-4 hover:border-primary/50 transition-colors duration-300",children:c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsxs("span",{className:"text-primary font-display text-lg",children:["0",p+1]}),c.jsx("p",{className:"text-muted-foreground",children:f})]})},p))})]}),c.jsxs(I.div,{initial:{opacity:0,x:50},animate:u?{opacity:1,x:0}:{},transition:{duration:.8,delay:.5},children:[c.jsx("p",{className:"text-muted-foreground leading-relaxed mb-8",children:"This course is ideal for riders who have successfully completed Level One and are ready to take their skills to the next level. By the end of the two-day session, you'll be prepared to decide if you're ready to tackle the Advanced Course."}),c.jsxs("div",{className:"mb-8",children:[c.jsxs("h4",{className:"font-display text-xl text-foreground mb-4 flex items-center gap-2",children:[c.jsx(wo,{className:"w-5 h-5 text-primary"}),"Target Audience"]}),c.jsx("ul",{className:"space-y-3",children:PW.map((f,p)=>c.jsxs("li",{className:"flex items-start gap-3 text-muted-foreground",children:[c.jsx(db,{className:"w-5 h-5 text-primary shrink-0 mt-0.5"}),f]},p))})]}),c.jsx(et,{variant:"hero",size:"lg",asChild:!0,children:c.jsxs("a",{href:"/#contact",className:"inline-flex items-center",children:["BOOK LEVEL TWO",c.jsx(Ki,{className:"w-5 h-5 ml-2"})]})})]})]})]})}),c.jsx("section",{ref:s,className:"py-20 md:py-32 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:d?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"MORE COURSES"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:d?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["EXPLORE OUR ",c.jsx("span",{className:"text-gradient",children:"PROGRAMS"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:d?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto"})]}),c.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:IW.map((f,p)=>c.jsxs(I.div,{initial:{opacity:0,y:30},animate:d?{opacity:1,y:0}:{},transition:{delay:.3+p*.1},className:"group bg-card border border-border rounded-lg p-8 hover:border-primary/50 transition-all duration-300",children:[c.jsx(f.icon,{className:"w-12 h-12 text-primary mb-6"}),c.jsx("h3",{className:"font-display text-2xl text-foreground mb-4 group-hover:text-primary transition-colors",children:f.title}),c.jsx("p",{className:"text-muted-foreground mb-6",children:f.description}),c.jsxs(et,{variant:"ghost",className:"text-primary hover:bg-primary/10 p-0",onClick:()=>window.location.href=f.href,children:["Learn More ",c.jsx(Ki,{className:"w-4 h-4 ml-2"})]})]},f.title))})]})}),c.jsx("section",{ref:i,className:"py-20 md:py-32",children:c.jsx("div",{className:"container mx-auto px-6",children:c.jsxs("div",{className:"text-center",children:[c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:h?{opacity:1,y:0}:{},className:"font-display text-3xl md:text-5xl text-foreground mb-6",children:["READY TO ",c.jsx("span",{className:"text-gradient",children:"LEVEL UP"}),"?"]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:h?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:h?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg max-w-2xl mx-auto mb-8",children:"Join us and elevate your off-road riding skills to new heights. Contact us today to book your training course."}),c.jsx(I.div,{initial:{opacity:0,y:20},animate:h?{opacity:1,y:0}:{},transition:{delay:.4},children:c.jsx(et,{variant:"hero",size:"lg",asChild:!0,children:c.jsxs("a",{href:"/#contact",className:"inline-flex items-center",children:["BOOK YOUR COURSE",c.jsx(Ki,{className:"w-5 h-5 ml-2"})]})})})]})})}),c.jsx(qn,{})]})},LW="/assets/special-courses-bg-CP20MkQO.jpg",MW=[{name:"Sand Course",subtitle:"INTRODUCTION TO RIDING THICK SAND",description:"Join us for our Level One Sand Course Training at Rhino Park (Legends MX), an immersive experience tailored to help you master the art of riding through soft and thick sand with confidence. This course is ideal for riders looking to enhance their off-road skills, particularly in challenging sand conditions.",intro:"Led by our team of accredited instructors, you will be guided through every step of the process, from the basics of bike setup to advanced sand-riding techniques. Whether you are new to off-road riding or simply looking to refine your abilities, this course will equip you with the knowledge and practice needed to handle sand safely and effectively.",lessons:["Bike Setup and Theory: Learn how to adjust your bike specifically for sand riding, ensuring optimal performance.","Basics of Sand â Theory: Understand the fundamentals of sand riding, including how sand affects your bike's movement.","Introduction to Sand Riding: Begin with basic sand-riding techniques to build your confidence.","Riding in Soft Sand: Discover how to maintain control and balance in softer sand.","Riding in Thick Sand: Develop techniques for navigating through deeper, more challenging sand.","Single Track Sand Riding: Gain experience riding narrow tracks through sand, honing your precision and control.","Pulling Away in Sand: Master the art of starting and stopping your bike in sandy conditions.","Bike Recovery Methods in Sand: Learn how to recover and manage your bike when it gets stuck.","Static Bike Turns: Practice turning your bike around without losing balance or momentum in the sand."],conclusion:"By the end of the course, you'll have the skills and confidence to tackle various sand conditions, making your off-road adventures safer and more enjoyable."},{name:"Emergency Braking Course",subtitle:"UNDERSTANDING YOUR BIKE IN MOTION",description:"iRide has conducted extensive research and testing to determine the optimal braking setup for emergency situations, focusing on both modern motorcycles equipped with advanced ABS systems and older, first-generation bikes without this technology. Our findings highlight the significant advancements in braking performance and safety that modern ABS systems provide, while also acknowledging the skills required for riders of non-ABS motorcycles.",intro:"This specialised braking course is designed to give riders an in-depth understanding of various braking setups, allowing them to experience firsthand how different systems function in real-world scenarios. By the end of the course, riders will be equipped with the knowledge and confidence to choose the braking setup that best suits their style, skill level, and riding conditions.",lessons:["Theory and Introduction: Gain a comprehensive understanding of braking fundamentals and how braking systems have evolved.","Braking System Overview: A detailed explanation of different braking systems, including ABS and non-ABS.","ABS Braking: Learn how to fully utilize modern ABS technology, optimizing your stopping power in emergency situations.","Non-ABS Braking: Develop critical braking skills for motorcycles without ABS, focusing on manual control and technique.","Reaction Time: Improve your reaction time to unexpected obstacles or hazards on the road, enhancing overall safety.","Braking and Target Fixation: Understand the importance of avoiding target fixation during braking and how to maintain focus.","Evasive Manoeuvres: Practice evasive manoeuvres under various braking conditions, learning to avoid accidents with confidence."],conclusion:"This course is ideal for riders of all skill levels, providing essential training that could save lives on the road. Through hands-on practice and professional instruction, you will learn how to make split-second decisions, manage your braking system efficiently, and perform evasive maneuvers with precision."}],FW=({course:e,index:t})=>{const n=m.useRef(null),r=Oe(n,{once:!0,margin:"-50px"});return c.jsx(I.div,{ref:n,initial:{opacity:0,y:50},animate:r?{opacity:1,y:0}:{},transition:{delay:t*.1},className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-colors duration-300",children:c.jsxs("div",{className:"p-6 md:p-8",children:[c.jsx("h3",{className:"font-display text-2xl md:text-3xl text-foreground mb-2",children:e.name}),c.jsx("span",{className:"text-primary text-sm font-medium tracking-wider",children:e.subt
302itle}),c.jsx("p",{className:"text-muted-foreground mt-4 leading-relaxed text-sm md:text-base",children:e.description}),c.jsx("p",{className:"text-muted-foreground mt-4 leading-relaxed text-sm md:text-base",children:e.intro}),c.jsxs("div",{className:"mt-6",children:[c.jsx("h4",{className:"font-display text-lg text-foreground mb-4",children:"Key Lessons:"}),c.jsx("ul",{className:"space-y-2",children:e.lessons.map((s,i)=>c.jsxs("li",{className:"text-muted-foreground text-sm flex items-start gap-2",children:[c.jsx("span",{className:"text-primary mt-1",children:"â¢"}),c.jsx("span",{children:s})]},i))})]}),c.jsx("p",{className:"text-muted-foreground mt-6 leading-relaxed text-sm md:text-base italic",children:e.conclusion}),c.jsx(et,{variant:"hero",size:"default",className:"mt-6",asChild:!0,children:c.jsx("a",{href:"/#contact",children:"ENQUIRE NOW"})})]})})},$W=()=>{const e=m.useRef(null),t=Oe(e,{once:!0});return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Special Motorcycle Courses & Skills Clinics | iRide",description:"Targeted motorcycle skills clinics covering slow riding, gravel, sand and recovery techniques with iRide Adventures.",path:"/special-courses"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[70vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${LW})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-4xl mx-auto text-center",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"ADVANCED RIDER DEVELOPMENT"}),c.jsxs(I.h1,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["SPECIAL ",c.jsx("span",{className:"text-gradient",children:"COURSES"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:t?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Many riders have experience of riding on paved roads for many years but feel uncertain once they transition into adventure riding and having to negotiate gravel roads, sand roads and other off-road surfaces."}),c.jsx(I.p,{initial:{opacity:0},animate:t?{opacity:1}:{},transition:{delay:.4},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto mt-6",children:"Not many riders know how far it would take their motorbike to come to a standstill in an emergency braking situation. There are many variables when it comes to emergency braking â type of tyres, tyre pressure, road surface, motorbike settings and electronic aids to name but a few."}),c.jsx(I.p,{initial:{opacity:0},animate:t?{opacity:1}:{},transition:{delay:.5},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto mt-6",children:"In our special courses we go to great lengths to assist each rider to understand all these variables and to become more accomplished riders in all road surfaces and emergency braking situations."})]})})]}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"MASTER NEW SKILLS"}),c.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"COURSES"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"Our specialized courses are designed to help you master specific skills that will make you a safer and more confident rider in challenging conditions."})]}),c.jsx("div",{className:"grid gap-8",children:MW.map((n,r)=>c.jsx(FW,{course:n,index:r},n.name))})]})}),c.jsx(qn,{})]})},VW="/assets/iride-facilities-D4odc_u7.jpg",UW=[{name:"Hennops Training Grounds",location:"Johannesburg",description:"Located about 30km from Pretoria/Fourways on the R511, Hennops Training Grounds offers a perfect blend of open fields for beginners and technical terrain for advanced riders. The diverse landscape allows riders to progress through various skill levels while experiencing real-world riding conditions.",mapUrl:"https://maps.google.com/?q=Hennops+Training+Grounds+Johannesburg"},{name:"Legends Adventure Farm",location:"Rayton, Gauteng",description:"Situated on the same grounds as the famous Legends MX track, this facility offers open fields and thick sand sections perfect for advanced training. The varied terrain challenges riders to improve their technique while building confidence in demanding conditions.",mapUrl:"https://maps.google.com/?q=Legends+MX+Track+Rayton"},{name:"Anura Training Grounds",location:"Cape Town",description:"Nestled at the picturesque Anura Wine Estate in the foothills of the Simonsberg Mountains, this facility is located 45 minutes from Cape Town and 20 minutes from Stellenbosch. The stunning backdrop combined with quality training terrain makes this a unique riding experience.",mapUrl:"https://maps.google.com/?q=Anura+Wine+Estate+Stellenbosch"},{name:"Cape Dirt Training Grounds",location:"Cape Town",description:"Located on Suid-Agter-Paarl Road, approximately 45 minutes from Cape Town near Paarl. This facility caters to riders from beginner to advanced levels, offering a comprehensive training environment with diverse terrain options.",mapUrl:"https://maps.google.com/?q=Suid-Agter-Paarl+Road+Paarl"}],BW=[{title:"Diverse Training Grounds",description:"From open fields perfect for beginners to challenging technical and sandy terrains for advanced riders.",icon:HT},{title:"Incline Training",description:"Tackle mounds of sand to perfect your incline and decline techniques, ensuring you are prepared for any adventure.",icon:yL},{title:"Trail Riding",description:"Navigate through our intricate small trails, designed to enhance your control and precision in tight and tricky spots.",icon:bs},{title:"Expert Instructors",description:"Learn from the best with our team of experienced riders and certified instructors, dedicated to helping you achieve your riding goals.",icon:wo}],zW=({facility:e,index:t})=>{const n=m.useRef(null),r=Oe(n,{once:!0,margin:"-50px"}),s=e.name.toLowerCase().replace(/\s+/g,"-");return c.jsx(I.div,{ref:n,id:s,initial:{opacity:0,y:50},animate:r?{opacity:1,y:0}:{},transition:{delay:t*.1},className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-colors duration-300",children:c.jsxs("div",{className:"p-6 md:p-8",children:[c.jsxs("div",{className:"flex items-center gap-2 text-primary mb-2",children:[c.jsx(bs,{className:"w-4 h-4"}),c.jsx("span",{className:"text-sm font-medium tracking-wider",children:e.location})]}),c.jsx("h3",{className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:e.name}),c.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm md:text-base",children:e.description}),c.jsx(et,{variant:"hero",size:"default",className:"mt-6",onClick:()=>window.open(e.mapUrl,"_blank"),children:"VIEW MAP"})]})})},WW=()=>{const e=m.useRef(null),t=Oe(e,{once:!0}),n=m.useRef(null),r=Oe(n,{once:!0,margin:"-100px"});return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Training Grounds & Facilities | iRide Adventures",description:"Purpose-built off-road training grounds and facilities for adventure motorcycle riders at iRide Adventures.",path:"/facilities"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[70vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${VW})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-4xl mx-auto text-center",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"WHERE WE TRAIN"}),c.jsxs(I.h1,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["TRAINING ",c.jsx("span",{className:"text-gradient",children:"FACILITIES"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.h2,{initial:{opacity:0}
302,animate:t?{opacity:1}:{},transition:{delay:.3},className:"text-foreground text-xl md:text-2xl font-display mb-4",children:"Elevate your riding skills at our top-notch motorcycle training facilities"}),c.jsx(I.p,{initial:{opacity:0},animate:t?{opacity:1}:{},transition:{delay:.4},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Are you ready to take your motorcycle skills to the next level? Our training facilities are designed for riders of all levels, offering everything you need to master the art of riding. From beginner-friendly open fields to challenging technical terrain, we have facilities across South Africa to serve you."})]})})]}),c.jsx("section",{className:"py-20 md:py-32 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{ref:n,className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:r?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"WHAT WE OFFER"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:r?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["FACILITY ",c.jsx("span",{className:"text-gradient",children:"FEATURES"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:r?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto"})]}),c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:BW.map((s,i)=>c.jsxs(I.div,{initial:{opacity:0,y:30},animate:r?{opacity:1,y:0}:{},transition:{delay:.3+i*.1},className:"text-center p-6",children:[c.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-primary/10 border-2 border-primary flex items-center justify-center",children:c.jsx(s.icon,{className:"w-7 h-7 text-primary"})}),c.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:s.title}),c.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.description})]},s.title))})]})}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"OUR LOCATIONS"}),c.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["TRAINING ",c.jsx("span",{className:"text-gradient",children:"GROUNDS"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"We have strategically located training facilities across South Africa to ensure riders from all regions have access to quality motorcycle training."})]}),c.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:UW.map((s,i)=>c.jsx(zW,{facility:s,index:i},s.name))})]})}),c.jsx("section",{className:"py-20 md:py-32 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6 text-center",children:[c.jsxs("h2",{className:"font-display text-3xl md:text-4xl text-foreground mb-6",children:["Ready to Start ",c.jsx("span",{className:"text-gradient",children:"Training?"})]}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto mb-8",children:"Book your training session at any of our facilities and take the first step towards becoming a more confident and skilled rider."}),c.jsx(et,{variant:"hero",size:"lg",onClick:()=>window.location.href="/training",children:"VIEW TRAINING COURSES"})]})}),c.jsx(qn,{})]})},HW="/assets/inside-iride-bg-C3A3Huo5.jpg",qW="/assets/andre-visser-8RWCGzNd.jpg",KW="/assets/jaco-strydom-BSpIY96A.jpg",GW=[{icon:dL,title:"Passion",description:"Born from a deep love for two-wheel adventures through Africa's magical landscapes."},{icon:wo,title:"Experience",description:"Over 20 years of enduro and adventure motorcycle expertise."},{icon:bs,title:"Local Knowledge",description:"Guides with unsurpassed knowledge of routes, areas, people and culture."},{icon:vL,title:"Safety First",description:"Meticulous planning and precision in execution for every adventure."}],YW=[{name:"Andre Visser",role:"Adventure Instructor",description:"An internationally qualified adventure motorcycle instructor with more than 20 years' experience in enduro and adventure motorcycle riding who has successfully completed the gruelling Roof of Africa enduro race.",image:qW},{name:"Jaco Strydom",role:"Sales & Marketing",description:"A sales & marketing executive with a passion for people and new travel experiences across the globe.",image:KW}],XW=()=>{const e=m.useRef(null),t=m.useRef(null),n=m.useRef(null),r=m.useRef(null),s=Oe(e,{once:!0}),i=Oe(t,{once:!0,margin:"-100px"}),o=Oe(n,{once:!0,margin:"-100px"}),a=Oe(r,{once:!0,margin:"-100px"});return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Inside iRide â Our Story, Team & Values",description:"Meet the founders, instructors and team behind iRide Adventures and the values that drive every expedition and training course.",path:"/inside-iride"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[70vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${HW})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-4xl mx-auto text-center",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:s?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"ABOUT US"}),c.jsxs(I.h1,{initial:{opacity:0,y:30},animate:s?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["INSIDE ",c.jsx("span",{className:"text-gradient",children:"IRIDE"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:s?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.h2,{initial:{opacity:0}
302,animate:s?{opacity:1}:{},transition:{delay:.3},className:"text-foreground text-xl md:text-2xl font-display mb-4",children:"Our business was born out of passion for two-wheels"}),c.jsx(I.p,{initial:{opacity:0},animate:s?{opacity:1}:{},transition:{delay:.4},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"What started out as adventure motorcycle training and skills transfer to like-minded adventurers soon expanded into travels to exciting destinations across the magical African landscape and splendour."})]})})]}),c.jsx("section",{ref:t,className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:i?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"WHAT DRIVES US"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:i?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"VALUES"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:i?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:i?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"Over the last few years, the iRide Adventure training facilities around South Africa have been upgraded to become premium training facilities in their respective regions."})]}),c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:GW.map((l,u)=>c.jsxs(I.div,{initial:{opacity:0,y:30},animate:i?{opacity:1,y:0}:{},transition:{delay:.4+u*.1},className:"bg-card border border-border rounded-lg p-6 hover:border-primary/50 transition-colors duration-300 text-center",children:[c.jsx("div",{className:"w-16 h-16 mx-auto mb-6 rounded-full bg-primary/10 border-2 border-primary flex items-center justify-center",children:c.jsx(l.icon,{className:"w-7 h-7 text-primary"})}),c.jsx("h3",{className:"font-display text-xl text-foreground mb-2",children:l.title}),c.jsx("p",{className:"text-muted-foreground text-sm",children:l.description})]},l.title))})]})}),c.jsx("section",{ref:n,className:"py-20 md:py-32 bg-muted/30",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:o?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"OUR JOURNEY"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:o?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["FUELLED BY ",c.jsx("span",{className:"text-gradient",children:"PASSION"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:o?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"})]}),c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsx(I.p,{initial:{opacity:0,y:20},animate:o?{opacity:1,y:0}:{},transition:{delay:.3},className:"text-muted-foreground text-lg leading-relaxed mb-8 text-center",children:"iRide Expeditions is a focussed and dedicated adventure motorcycle tour operator. The tour company was a long-term dream of 2 friends with a passion for adventure motorcycles and travelling."}),c.jsx(I.p,{initial:{opacity:0,y:20},animate:o?{opacity:1,y:0}:{},transition:{delay:.4},className:"text-muted-foreground text-lg leading-relaxed mb-12 text-center",children:"The profile of the modern adventure rider has changed significantly over the last decade and at iRide Expeditions we have adapted our product offering to attract the modern adventure rider and their individual needs."}),c.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:YW.map((l,u)=>c.jsxs(I.div,{initial:{opacity:0,y:30},animate:o?{opacity:1,y:0}:{},transition:{delay:.5+u*.1},className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-colors duration-300",children:[l.image&&c.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:c.jsx("img",{src:l.image,alt:l.name,className:"w-full h-full object-cover object-top"})}),c.jsxs("div",{className:"p-6 md:p-8",children:[c.jsx("h3",{className:"font-display text-2xl text-foreground mb-1",children:l.name}),c.jsx("span",{className:"text-primary text-sm font-medium tracking-wider",children:l.role}),c.jsx("p",{className:"text-muted-foreground mt-4 leading-relaxed text-sm",children:l.description})]})]},l.name))})]})]})}),c.jsx("section",{ref:r,className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:a?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"OUR VISION"}),c.jsxs(I.h2,{initial:{opacity:0,y:30},animate:a?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["SOUTHERN AFRICA IS IN OUR ",c.jsx("span",{className:"text-gradient",children:"BLOOD & DNA"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:a?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"})]}),c.jsxs(I.div,{initial:{opacity:0,y:30},animate:a?{opacity:1,y:0}:{},transition:{delay:.3},className:"max-w-4xl mx-auto text-center",children:[c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed mb-8",children:'We believe that this is an iconic and storied continent â filled with adventure, unrivalled natural beauty, mysticism and true to its fabled description as the "Cradle of Humankind".'}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed mb-10",children:'Join us in exploring "big sky country" with diverse natural wonders ranging from rain forests, mountain regions, deserts, breath-taking beaches and unexplored areas with wildlife second to none. Whether you are a novice or a seasoned traveller, let us take you on a once in a lifetime experience through a region that will make you yearn for the freedom of the open road forever.'}),c.jsx(et,{variant:"hero",size:"lg",asChild:!0,children:c.jsx("a",{href:"/#contact",children:"CONTACT US"})})]})]})}),c.jsx(qn,{})]})},xm=[{src:"/lovable-uploads/5b39b722-6d1e-4c6f-9299-70b78ee7aae0.jpg",alt:"Mountain adventure group with bikes"},{src:"/lovable-uploads/ed12f308-814b-4c0d-a977-33916970256a.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/9b2ac8b9-8e2d-4291-9285-00fcaa6cbd1a.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00002.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00003.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00005.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00006.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00007.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00008.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00009.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/image00011.jpg",alt:"Riders celebrating on expedition"},{src:"/lovable-uploads/wa-2026-05-20.jpeg",alt:"Riders pausing on a dirt road with sandstone hills"},{src:"/lovable-uploads/wa-2026-05-20-2.jpeg",alt:"Two riders crossing a muddy puddle on the trail"},{src:"/lovable-uploads/wa-2026-05-20-4.jpeg",alt:"Winding mountain pass through lush green valley"},{src:"/lovable-uploads/wa-2026-05-20-6.jpeg",alt:"Giraffe walking at sunset on the African plains"},{src:"/lovable-uploads/wa-2026-05-20-7.jpeg",alt:"Rhino resting beside a waterhole at dusk"},{src:"/lovable-uploads/wa-2026-05-20-8.jpeg",alt:"Riders descending a misty mountain trail"},{src:"/lovable-uploads/wa-2026-05-20-1.jpeg",alt:"Group briefing with bikes and mountain backdrop"}],JW=({image:e,index:t,onOpen:n})=>{const r=m.useRef(null),s=Oe(r,{once:!0,margin:"-50px"});return c.jsxs(I.div,{ref:r,initial:{opacity:0,y:50},animate:s?{opacity:1,y:0}:{},transition:{delay:t*.1},className:"relative aspect-[4/3] overflow-hidden rounded-lg cursor-pointer group",onClick:()=>n(t),children:[c.jsx("img",{src:e.src,alt:e.alt,loading:"lazy",decoding:"async",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"}),c.jsx("div",{className:"absolute inset-0 bg-background/0 group-hover:bg-background/20 transition-colors duration-300"})]})},QW=()=>{const e=m.useRef(null),t=Oe(e,{once:!0}),[n,r]=m.useState(!1),[s,i]=m.useState(0),o=l=>{i(l),r(!0)},a=()=>{r(!1)};return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Gallery â Adventures, Riders & Landscapes | iRide",description:"Photos from iRide Adventures expeditions, training days and the Southern African landscapes that define every ride.",path:"/gallery"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[70vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${cN})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{ref:e,className:"max-w-4xl mx-auto text-center",children:[c.jsx(I.span,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},className:"text-primary text-sm font-medium tracking-widest",children:"MOMENTS FROM OUR ADVENTURES"}),c.jsxs(I.h1,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{delay:.1},className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["IRIDE ",c.jsx("span",{className:"text-gradient",children:"GALLERY"})]}),c.jsx(I.div,{initial:{opacity:0,scaleX:0},animate:t?{opacity:1,scaleX:1}:{},transition:{delay:.2},className:"section-divider mx-auto mb-8"}),c.jsx(I.p,{initial:{opacity:0}
302,animate:t?{opacity:1}:{},transition:{delay:.3},className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Explore the highlights from our expeditions, training sessions, and adventures across Southern Africa. Every image tells a story of passion, camaraderie, and the thrill of the open road."})]})})]}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"CAPTURED MEMORIES"}),c.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"ADVENTURES"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"})]}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:xm.map((l,u)=>c.jsx(JW,{image:l,index:u,onOpen:o},u))})]})}),n&&c.jsxs(I.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-background/95 flex items-center justify-center p-4",onClick:a,children:[c.jsx("button",{onClick:a,className:"absolute top-6 right-6 text-foreground hover:text-primary transition-colors",children:c.jsx(Sf,{size:32})}),c.jsx("img",{src:xm[s].src,alt:xm[s].alt,className:"max-w-full max-h-[90vh] object-contain rounded-lg",onClick:l=>l.stopPropagation()})]}),c.jsx(qn,{})]})},ZW=[{number:"1",title:"Introduction",content:"This Privacy Policy explains how the Company collects, uses, and protects personal data in accordance with the South African Protection of Personal Information Act (POPIA) and, where applicable, the UK General Data Protection Regulation (UK GDPR)."},{number:"2",title:"Information We Collect",content:"We may collect personal information including but not limited to:",list:["Name, contact details, and address","Passport and licence details","Medical and emergency contact information","Payment and booking information"]},{number:"3",title:"Purpose of Processing",content:"Personal data is collected for:",list:["Processing bookings and payments","Administering tours","Safety, emergency, and insurance purposes","Legal and regulatory compliance"]},{number:"4",title:"Data Sharing",content:"We may share personal data with third parties such as accommodation providers, guides, insurers, or authorities where necessary for tour delivery or legal compliance."},{number:"5",title:"Data Security",content:"We implement reasonable technical and organisational measures to protect personal data from unauthorised access, loss, or misuse."},{number:"6",title:"Data Retention",content:"Personal data is retained only for as long as necessary to fulfil the purposes for which it was collected or as required by law."},{number:"7",title:"Your Rights",content:"Depending on your jurisdiction, you may have the right to access, correct, or request deletion of your personal data, subject to legal limitations."},{number:"8",title:"International Data Transfers",content:"Personal data may be transferred and processed outside your country of residence, including in South Africa, where appropriate safeguards are in place."},{number:"9",title:"Contact",content:"For privacy-related enquiries, please contact the Company using the details provided on the website."}],eH=({section:e})=>c.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-colors duration-300",children:c.jsx("div",{className:"p-6 md:p-8",children:c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsxs("span",{className:"font-display text-4xl text-primary",children:[e.number,"."]}),c.jsxs("div",{className:"flex-1",children:[c.jsx("h3",{className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:e.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm md:text-base",children:e.content}),e.list&&c.jsx("ul",{className:"mt-4 space-y-2",children:e.list.map((t,n)=>c.jsxs("li",{className:"text-muted-foreground text-sm md:text-base flex items-start gap-2",children:[c.jsx("span",{className:"text-primary mt-1",children:"â¢"}),c.jsx("span",{children:t})]},n))})]})]})})}),tH=()=>c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Privacy Policy | iRide Adventures",description:"How iRide Adventures collects, uses and protects personal information from riders and visitors to our website.",path:"/privacy-policy"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[50vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/10 via-background to-background"}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"IRIDE ADVENTURE"}),c.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["PRIVACY ",c.jsx("span",{className:"text-gradient",children:"POLICY"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Training & Expeditions - Your privacy matters to us. This policy explains how we
302collect, use, and protect your personal information."})]})})]}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"YOUR DATA PROTECTION"}),c.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"COMMITMENT"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"We are committed to protecting your personal information and being transparent about how we use it."})]}),c.jsx("div",{className:"grid gap-6 max-w-4xl mx-auto",children:ZW.map(e=>c.jsx(eH,{section:e},e.number))})]})}),c.jsx(qn,{})]}),nH=[{number:"1",title:"Definitions",content:null,list:['"Company", "we", "us", or "our" refers to the tour operator, ODYSSEY RIDERS (PTY) LTD, trading as iRide Adventure, a company registered in South Africa.','"Participant", "you", or "rider" refers to any person booking or participating in a tour.','"Tour" refers to any adventure motorcycle expedition organised by the Company.']},{number:"2",title:"Booking & Payment",content:null,list:["2.1 A booking is considered provisional until the required deposit has been received and confirmed in writing.","2.2 Full payment must be received by the date specified at the time of booking. Failure to do so may result in cancellation without refund.","2.3 Prices are quoted in the currency stated on the website and may be subject to exchange rate fluctuations."]},{number:"3",title:"Eligibility & Participation",content:null,list:["3.1 Participants must hold a valid motorcycle licence for the class of motorcycle being ridden.","3.2 Participants must declare all relevant medical conditions and confirm they are physically and mentally fit to participate.","3.3 The Company reserves the right to refuse participation or remove a participant from a tour if their conduct, ability, or health is deemed unsafe."]},{number:"4",title:"Insurance",content:null,list:["4.1 Participants are required to hold comprehensive travel insurance covering adventure motorcycling, medical treatment, emergency evacuation, and repatriation.","4.2 Proof of insurance may be requested prior to departure. Failure to provide proof may result in exclusion from the tour without refund."]},{number:"5",title:"Cancellations & Refunds",content:null,list:["5.1 Cancellation by the Participant must be made in writing.","5.2 A 20% deposit is required at the time of booking to secure your place on the expedition.","5.3 Full balance is due 60 days before the expedition start date.","5.4 Cancellations more than 60 days before departure receive a full deposit refund, minus a £100 administration fee.","5.5 Cancellations between 30 and 60 days before departure will incur a 50% charge of the total invoiced amount.","5.6 Cancellations within 30 days of departure, after final payment, are subject to a 100% cancellation fee.","5.7 The Company reserves the right to cancel or alter a tour due to circumstances beyond its control, including but not limited to weather, political instability, or safety concerns."]},{number:"6",title:"Changes to Itinerary",content:null,list:["6.1 Adventure travel involves uncertainty. Routes, accommodation, and schedules may change without notice for safety or logistical reasons.","6.2 No refunds will be provided for itinerary changes that do not materially affect the tour."]},{number:"7",title:"Responsibility & Risk",content:null,list:["7.1 Adventure motorcycling is inherently hazardous. Participation is entirely at the Participant's own risk.","7.2 The Company is not responsible for loss, damage, or theft of personal property."]},{number:"8",title:"Governing Law & Jurisdiction",content:null,list:["8.1 These Terms & Conditions are governed by the laws of the Republic of South Africa.","8.2 Any disputes shall be subject to the exclusive jurisdiction of South African courts, unless otherwise required by applicable consumer protection law."]}],rH=({section:e})=>c.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-colors duration-300",children:c.jsx("div",{className:"p-6 md:p-8",children:c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsxs("span",{className:"font-display text-4xl text-primary",children:[e.number,"."]}),c.jsxs("div",{className:"flex-1",children:[c.jsx("h3",{className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:e.title}),e.content&&c.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm md:text-base",children:e.content}),e.list&&c.jsx("ul",{className:"space-y-3",children:e.list.map((t,n)=>c.jsxs("li",{className:"text-muted-foreground text-sm md:text-base flex items-start gap-2",children:[c.jsx("span",{className:"text-primary mt-1",children:"â¢"}),c.jsx("span",{children:t})]},n))})]})]})})}),sH=()=>c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Terms & Conditions | iRide Adventures",description:"Terms and conditions governing the use of iRide Adventures' services, training courses and motorcycle expeditions.",path:"/terms-and-conditions"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[50vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/10 via-background to-background"}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"IRIDE ADVENTURE"}),c.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["TERMS & ",c.jsx("span",{className:"text-gradient",children:"CONDITIONS"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Training & Expeditions - Please read these terms carefully before booking. By participating in our tours, you agree to be bound by these conditions."})]})})]}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"BOOKING AGREEMENT"}),c.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["OUR ",c.jsx("span",{className:"text-gradient",children:"TERMS"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"These terms and conditions govern your participation in our adventure motorcycle expeditions and training programs."})]}),c.jsx("div",{className:"grid gap-6 max-w-4xl mx-auto",children:nH.map(e=>c.jsx(rH,{section:e},e.number))})]})}),c.jsx(qn,{})]});var yu=e=>e.type==="checkbox",Ji=e=>e instanceof Date,Jt=e=>e==null;const uN=e=>typeof e=="object";var ht=e=>!Jt(e)&&!Array.isArray(e)&&uN(e)&&!Ji(e),dN=e=>ht(e)&&e.target?yu(e.target)?e.target.checked:e.target.value:e,iH=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,hN=(e,t)=>e.has(iH(t)),oH=e=>{const t=e.constructor&&e.constructor.prototype;return ht(t)&&t.hasOwnProperty("isPrototypeOf")},l0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function St(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(l0&&(e instanceof Blob||r))&&(n||ht(e)))if(t=n?[]:{},!n&&!oH(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=St(e[s]));else return e;return t}var Uf=e=>/^\w*$/.test(e),ct=e=>e===void 0,c0=e=>Array.isArray(e)?e.filter(Boolean):[],u0=e=>
302c0(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Y=(e,t,n)=>{if(!t||!ht(e))return n;const r=(Uf(t)?[t]:u0(t)).reduce((s,i)=>Jt(s)?s:s[i],e);return ct(r)||r===e?ct(e[t])?n:e[t]:r},xn=e=>typeof e=="boolean",Le=(e,t,n)=>{let r=-1;const s=Uf(t)?[t]:u0(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const u=e[a];l=ht(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}};const Fh={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},hr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ns={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},d0=O.createContext(null);d0.displayName="HookFormContext";const Bf=()=>O.useContext(d0),aH=e=>{const{children:t,...n}=e;return O.createElement(d0.Provider,{value:n},t)};var fN=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==hr.all&&(t._proxyFormState[o]=!r||hr.all),n&&(n[o]=!0),e[o]}});return s};const h0=typeof window<"u"?O.useLayoutEffect:O.useEffect;function lH(e){const t=Bf(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=O.useState(n._formState),l=O.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return h0(()=>n._subscribe({name:s,formState:l.current,exact:i,callback:u=>{!r&&a({...n._formState,...u})}}),[s,r,i]),O.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),O.useMemo(()=>fN(o,n,l.current,!1),[o,n])}var Vr=e=>typeof e=="string",pN=(e,t,n,r,s)=>Vr(e)?(r&&t.watch.add(e),Y(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Y(n,i))):(r&&(t.watchAll=!0),n),By=e=>Jt(e)||!uN(e);function cs(e,t,n=new WeakSet){if(By(e)||By(t))return e===t;if(Ji(e)&&Ji(t))return e.getTime()===t.getTime();const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const o=e[i];if(!s.includes(i))return!1;if(i!=="ref"){const a=t[i];if(Ji(o)&&Ji(a)||ht(o)&&ht(a)||Array.isArray(o)&&Array.isArray(a)?!cs(o,a,n):o!==a)return!1}}return!0}function cH(e){const t=Bf(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o,compute:a}=e||{},l=O.useRef(s),u=O.useRef(a),d=O.useRef(void 0);u.current=a;const h=O.useMemo(()=>n._getWatch(r,l.current),[n,r]),[f,p]=O.useState(u.current?u.current(h):h);return h0(()=>n._subscribe({name:r,formState:{values:!0},exact:o,callback:y=>{if(!i){const g=pN(r,n._names,y.values||n._formValues,!1,l.current);if(u.current){const b=u.current(g);cs(b,d.current)||(p(b),d.current=b)}else p(g)}}}),[n,i,r,o]),O.useEffect(()=>n._removeUnmounted()),f}function uH(e){const t=Bf(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i,defaultValue:o}=e,a=hN(s._names.array,n),l=O.useMemo(()=>Y(s._formValues,n,Y(s._defaultValues,n,o)),[s,n,o]),u=cH({control:s,name:n,defaultValue:l,exact:!0}),d=lH({control:s,name:n,exact:!0}),h=O.useRef(e),f=O.useRef(s.register(n,{...e.rules,value:u,...xn(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const p=O.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Y(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Y(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Y(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Y(d.validatingFields,n)},error:{enumerable:!0,get:()=>Y(d.errors,n)}}),[d,n]),y=O.useCallback(v=>f.current.onChange({target:{value:dN(v),name:n},type:Fh.CHANGE}),[n]),g=O.useCallback(()=>f.current.onBlur({target:{value:Y(s._formValues,n),name:n},type:Fh.BLUR}),[n,s._formValues]),b=O.useCallback(v=>{const w=Y(s._fields,n);w&&v&&(w._f.ref={focus:()=>v.focus&&v.focus(),select:()=>v.select&&v.select(),setCustomValidity:S=>v.setCustomValidity(S),reportValidity:()=>v.reportValidity()})},[s._fields,n]),x=O.useMemo(()=>({name:n,value:u,...xn(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:y,onBlur:g,ref:b}),[n,r,d.disabled,y,g,b,u]);return O.useEffect(()=>{const v=s._options.shouldUnregister||i;s.register(n,{...h.current.rules,...xn(h.current.disabled)?{disabled:h.current.disabled}:{}});const w=(S,k)=>{const _=Y(s._fields,S);_&&_._f&&(_._f.mount=k)};if(w(n,!0),v){const S=St(Y(s._options.defaultValues,n));Le(s._defaultValues,n,S),ct(Y(s._formValues,n))&&Le(s._formValues,n,S)}return!a&&s.register(n),()=>{(a?v&&!s._state.action:v)?s.unregister(n):w(n,!1)}},[n,s,a,i]),O.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),O.useMemo(()=>({field:x,formState:d,fieldState:p}),[x,d,p])}const dH=e=>e.render(uH(e));
vendor: 10,312 bytes, line 302
302var mN=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},dc=e=>Array.isArray(e)?e:[e],V1=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},ln=e=>ht(e)&&!Object.keys(e).length,f0=e=>e.type==="file",fr=e=>typeof e=="function",$h=e=>{if(!l0)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},gN=e=>e.type==="select-multiple",p0=e=>e.type==="radio",hH=e=>p0(e)||yu(e),wm=e=>$h(e)&&e.isConnected;function fH(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ct(e)?r++:e[t[r++]];return e}function pH(e){for(const t in e)if(e.hasOwnProperty(t)&&!ct(e[t]))return!1;return!0}function gt(e,t){const n=Array.isArray(t)?t:Uf(t)?[t]:u0(t),r=n.length===1?e:fH(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(ht(r)&&ln(r)||Array.isArray(r)&&pH(r))&>(e,n.slice(0,-1)),e}var yN=e=>{for(const t in e)if(fr(e[t]))return!0;return!1};function Vh(e,t={}){const n=Array.isArray(e);if(ht(e)||n)for(const r in e)Array.isArray(e[r])||ht(e[r])&&!yN(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Vh(e[r],t[r])):Jt(e[r])||(t[r]=!0);return t}function vN(e,t,n){const r=Array.isArray(e);if(ht(e)||r)for(const s in e)Array.isArray(e[s])||ht(e[s])&&!yN(e[s])?ct(t)||By(n[s])?n[s]=Array.isArray(e[s])?Vh(e[s],[]):{...Vh(e[s])}:vN(e[s],Jt(t)?{}:t[s],n[s]):n[s]=!cs(e[s],t[s]);return n}var Al=(e,t)=>vN(e,t,Vh(t));const U1={value:!1,isValid:!1},B1={value:!0,isValid:!0};var xN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ct(e[0].attributes.value)?ct(e[0].value)||e[0].value===""?B1:{value:e[0].value,isValid:!0}:B1:U1}return U1},wN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ct(e)?e:t?e===""?NaN:e&&+e:n&&Vr(e)?new Date(e):r?r(e):e;const z1={isValid:!1,value:null};var bN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,z1):z1;function W1(e){const t=e.ref;return f0(t)?t.files:p0(t)?bN(e.refs).value:gN(t)?[...t.selectedOptions].map(({value:n})=>n):yu(t)?xN(e.refs).value:wN(ct(t.value)?e.ref.value:t.value,e)}var mH=(e,t,n,r)=>{const s={};for(const i of e){const o=Y(t,i);o&&Le(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Uh=e=>e instanceof RegExp,Pl=e=>ct(e)?e:Uh(e)?e.source:ht(e)?Uh(e.value)?e.value.source:e.value:e,H1=e=>({isOnSubmit:!e||e===hr.onSubmit,isOnBlur:e===hr.onBlur,isOnChange:e===hr.onChange,isOnAll:e===hr.all,isOnTouch:e===hr.onTouched});const q1="AsyncFunction";var gH=e=>!!e&&!!e.validate&&!!(fr(e.validate)&&e.validate.constructor.name===q1||ht(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===q1)),yH=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),K1=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const hc=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=Y(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(hc(a,t))break}else if(ht(a)&&hc(a,t))break}}};function G1(e,t,n){const r=Y(e,n);if(r||Uf(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=Y(t,i),a=Y(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};if(a&&a.root&&a.root.type)return{name:`${i}.root`,error:a.root};s.pop()}return{name:n}}var vH=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return ln(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||hr.all))},xH=(e,t,n)=>!e||!t||e===t||dc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),wH=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,bH=(e,t)=>!c0(Y(e,t)).length&>(e,t),SH=(e,t,n)=>{const r=dc(Y(e,n));return Le(r,"root",t[n]),Le(e,n,r),e},Ud=e=>Vr(e);function Y1(e,t,n="validate"){if(Ud(e)||Array.isArray(e)&&e.every(Ud)||xn(e)&&!e)return{type:n,message:Ud(e)?e:"",ref:t}}var Bo=e=>ht(e)&&!Uh(e)?e:{value:e,message:""},X1=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:d,min:h,max:f,pattern:p,validate:y,name:g,valueAsNumber:b,mount:x}=e._f,v=Y(n,g);if(!x||t.has(g))return{};const w=a?a[0]:o,S=D=>{s&&w.reportValidity&&(w.setCustomValidity(xn(D)?"":D||""),w.reportValidity())},k={},_=p0(o),E=yu(o),C=_||E,N=(b||f0(o))&&ct(o.value)&&ct(v)||$h(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,R=mN.bind(null,g,r,k),$=(D,U,F,J=ns.maxLength,V=ns.minLength)=>{const ne=D?U:F;k[g]={type:D?J:V,message:ne,ref:o,...R(D?J:V,ne)}};if(i?!Array.isArray(v)||!v.length:l&&(!C&&(N||Jt(v))||xn(v)&&!v||E&&!xN(a).isValid||_&&!bN(a).isValid)){const{value:D,message:U}=Ud(l)?{value:!!l,message:l}:Bo(l);if(D&&(k[g]={type:ns.required,message:U,ref:w,...R(ns.required,U)},!r))return S(U),k}if(!N&&(!Jt(h)||!Jt(f))){let D,U;const F=Bo(f),J=Bo(h);if(!Jt(v)&&!isNaN(v)){const V=o.valueAsNumber||v&&+v;Jt(F.value)||(D=V>F.value),Jt(J.value)||(U=V<J.value)}else{const V=o.valueAsDate||new Date(v),ne=W=>new Date(new Date().toDateString()+" "+W),P=o.type=="time",L=o.type=="week";Vr(F.value)&&v&&(D=P?ne(v)>ne(F.value):L?v>F.value:V>new Date(F.value)),Vr(J.value)&&v&&(U=P?ne(v)<ne(J.value):L?v<J.value:V<new Date(J.value))}if((D||U)&&($(!!D,F.message,J.message,ns.max,ns.min),!r))return S(k[g].message),k}if((u||d)&&!N&&(Vr(v)||i&&Array.isArray(v))){const D=Bo(u),U=Bo(d),F=!Jt(D.value)&&v.length>+D.value,J=!Jt(U.value)&&v.length<+U.value;if((F||J)&&($(F,D.message,U.message),!r))return S(k[g].message),k}if(p&&!N&&Vr(v)){const{value:D,message:U}=Bo(p);if(Uh(D)&&!v.match(D)&&(k[g]={type:ns.pattern,message:U,ref:o,...R(ns.pattern,U)},!r))return S(U),k}if(y){if(fr(y)){const D=await y(v,n),U=Y1(D,w);if(U&&(k[g]={...U,...R(ns.validate,U.message)},!r))return S(U.message),k}else if(ht(y)){let D={};for(const U in y){if(!ln(D)&&!r)break;const F=Y1(await y[U](v,n),w,U);F&&(D={...F,...R(U,F.message)},S(F.message),r&&(k[g]=D))}if(!ln(D)&&(k[g]={ref:w,...D},!r))return k}}return S(!0),k};const kH={mode:hr.onSubmit,reValidateMode:hr.onChange,shouldFocusError:!0};function _H(e={}){let t={...kH,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:fr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=ht(t.defaultValues)||ht(t.values)?St(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:St(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...d};const f={array:V1(),state:V1()},p=t.criteriaMode===hr.all,y=T=>A=>{clearTimeout(u),u=setTimeout(T,A)},g=async T=>{if(!t.disabled&&(d.isValid||h.isValid||T)){const A=t.resolver?ln((await E()).errors):await N(r,!0);A!==n.isValid&&f.state.next({isValid:A})}},b=(T,A)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((T||Array.from(a.mount)).forEach(M=>{M&&(A?Le(n.validatingFields,M,A):gt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!ln(n.validatingFields)}))},x=(T,A=[],M,K,q=!0,H=!0)=>{if(K&&M&&!t.disabled){if(o.action=!0,H&&Array.isArray(Y(r,T))){const Z=M(Y(r,T),K.argA,K.argB);q&&Le(r,T,Z)}if(H&&Array.isArray(Y(n.errors,T))){const Z=M(Y(n.errors,T),K.argA,K.argB);q&&Le(n.errors,T,Z),bH(n.errors,T)}if((d.touchedFields||h.touchedFields)&&H&&Array.isArray(Y(n.touchedFields,T))){const Z=M(Y(n.touchedFields,T),K.argA,K.argB);q&&Le(n.touchedFields,T,Z)}(d.dirtyFields||h.dirtyFields)&&(n.dirtyFields=Al(s,i)),f.state.next({name:T,isDirty:$(T,A),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Le(i,T,A)},v=(T,A)=>{Le(n.errors,T,A),f.state.next({errors:n.errors})},w=T=>{n.errors=T,f.state.next({errors:n.errors,isValid:!1})},S=(T,A,M,K)=>{const q=Y(r,T);if(q){const H=Y(i,T,ct(M)?Y(s,T):M);ct(H)||K&&K.defaultChecked||A?Le(i,T,A?H:W1(q._f)):F(T,H),o.mount&&g()}},k=(T,A,M,K,q)=>{let H=!1,Z=!1;const _e={name:T};if(!t.disabled){if(!M||K){(d.isDirty||h.isDirty)&&(Z=n.isDirty,n.isDirty=_e.isDirty=$(),H=Z!==_e.isDirty);const Ue=cs(Y(s,T),A);Z=!!Y(n.dirtyFields,T),Ue?gt(n.dirtyFields,T):Le(n.dirtyFields,T,!0),_e.dirtyFields=n.dirtyFields,H=H||(d.dirtyFields||h.dirtyFields)&&Z!==!Ue}if(M){const Ue=Y(n.touchedFields,T);Ue||(Le(n.touchedFields,T,M),_e.touchedFields=n.touchedFields,H=H||(d.touchedFields||h.touchedFields)&&Ue!==M)}H&&q&&f.state.next(_e)}return H?_e:{}},_=(T,A,M,K)=>{const q=Y(n.errors,T),H=(d.isValid||h.isValid)&&xn(A)&&n.isValid!==A;if(t.delayError&&M?(l=y(()=>v(T,M)),l(t.delayError)):(clearTimeout(u),l=null,M?Le(n.errors,T,M):gt(n.errors,T)),(M?!cs(q,M):q)||!ln(K)||H){const Z={...K,...H&&xn(A)?{isValid:A}:{},errors:n.errors,name:T};n={...n,...Z},f.state.next(Z)}},E=async T=>{b(T,!0);const A=await t.resolver(i,t.context,mH(T||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(T),A},C=async T=>{const{errors:A}=await E(T);if(T)for(const M of T){const K=Y(A,M);K?Le(n.errors,M,K):gt(n.errors,M)}else n.errors=A;return A},N=async(T,A,M={valid:!0})=>{for(const K in T){const q=T[K];if(q){const{_f:H,...Z}=q;if(H){const _e=a.array.has(H.name),Ue=q._f&&gH(q._f);Ue&&d.validatingFields&&b([K],!0);const rn=await X1(q,a.disabled,i,p,t.shouldUseNativeValidation&&!A,_e);if(Ue&&d.validatingFields&&b([K]),rn[H.name]&&(M.valid=!1,A))break;!A&&(Y(rn,H.name)?_e?SH(n.errors,rn,H.name):Le(n.errors,H.name,rn[H.name]):gt(n.errors,H.name))}!ln(Z)&&await N(Z,A,M)}}return M.valid},R=()=>{for(const T of a.unMount){const A=Y(r,T);A&&(A._f.refs?A._f.refs.every(M=>!wm(M)):!wm(A._f.ref))&&G(T)}a.unMount=new Set},$=(T,A)=>!t.disabled&&(T&&A&&Le(i,T,A),!cs(W(),s)),D=(T,A,M)=>pN(T,a,{...o.mount?i:ct(A)?s:Vr(T)?{[T]:A}:A},M,A),U=T=>c0(Y(o.mount?i:s,T,t.shouldUnregister?Y(s,T,[]):[])),F=(T,A,M={})=>{const K=Y(r,T);let q=A;if(K){const H=K._f;H&&(!H.disabled&&Le(i,T,wN(A,H)),q=$h(H.ref)&&Jt(A)?"":A,gN(H.ref)?[...H.ref.options].forEac
vendor: 10,286 bytes, line 302
302h(Z=>Z.selected=q.includes(Z.value)):H.refs?yu(H.ref)?H.refs.forEach(Z=>{(!Z.defaultChecked||!Z.disabled)&&(Array.isArray(q)?Z.checked=!!q.find(_e=>_e===Z.value):Z.checked=q===Z.value||!!q)}):H.refs.forEach(Z=>Z.checked=Z.value===q):f0(H.ref)?H.ref.value="":(H.ref.value=q,H.ref.type||f.state.next({name:T,values:St(i)})))}(M.shouldDirty||M.shouldTouch)&&k(T,q,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&L(T)},J=(T,A,M)=>{for(const K in A){if(!A.hasOwnProperty(K))return;const q=A[K],H=T+"."+K,Z=Y(r,H);(a.array.has(T)||ht(q)||Z&&!Z._f)&&!Ji(q)?J(H,q,M):F(H,q,M)}},V=(T,A,M={})=>{const K=Y(r,T),q=a.array.has(T),H=St(A);Le(i,T,H),q?(f.array.next({name:T,values:St(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&M.shouldDirty&&f.state.next({name:T,dirtyFields:Al(s,i),isDirty:$(T,H)})):K&&!K._f&&!Jt(H)?J(T,H,M):F(T,H,M),K1(T,a)&&f.state.next({...n,name:T}),f.state.next({name:o.mount?T:void 0,values:St(i)})},ne=async T=>{o.mount=!0;const A=T.target;let M=A.name,K=!0;const q=Y(r,M),H=Ue=>{K=Number.isNaN(Ue)||Ji(Ue)&&isNaN(Ue.getTime())||cs(Ue,Y(i,M,Ue))},Z=H1(t.mode),_e=H1(t.reValidateMode);if(q){let Ue,rn;const Jr=A.type?W1(q._f):dN(T),Tr=T.type===Fh.BLUR||T.type===Fh.FOCUS_OUT,xu=!yH(q._f)&&!t.resolver&&!Y(n.errors,M)&&!q._f.deps||wH(Tr,Y(n.touchedFields,M),n.isSubmitted,_e,Z),Ai=K1(M,a,Tr);Le(i,M,Jr),Tr?(q._f.onBlur&&q._f.onBlur(T),l&&l(0)):q._f.onChange&&q._f.onChange(T);const Cr=k(M,Jr,Tr),wu=!ln(Cr)||Ai;if(!Tr&&f.state.next({name:M,type:T.type,values:St(i)}),xu)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?Tr&&g():Tr||g()),wu&&f.state.next({name:M,...Ai?{}:Cr});if(!Tr&&Ai&&f.state.next({...n}),t.resolver){const{errors:Qr}=await E([M]);if(H(Jr),K){const hp=G1(n.errors,r,M),bu=G1(Qr,r,hp.name||M);Ue=bu.error,M=bu.name,rn=ln(Qr)}}else b([M],!0),Ue=(await X1(q,a.disabled,i,p,t.shouldUseNativeValidation))[M],b([M]),H(Jr),K&&(Ue?rn=!1:(d.isValid||h.isValid)&&(rn=await N(r,!0)));K&&(q._f.deps&&L(q._f.deps),_(M,rn,Ue,Cr))}},P=(T,A)=>{if(Y(n.errors,A)&&T.focus)return T.focus(),1},L=async(T,A={})=>{let M,K;const q=dc(T);if(t.resolver){const H=await C(ct(T)?T:q);M=ln(H),K=T?!q.some(Z=>Y(H,Z)):M}else T?(K=(await Promise.all(q.map(async H=>{const Z=Y(r,H);return await N(Z&&Z._f?{[H]:Z}:Z)}))).every(Boolean),!(!K&&!n.isValid)&&g()):K=M=await N(r);return f.state.next({...!Vr(T)||(d.isValid||h.isValid)&&M!==n.isValid?{}:{name:T},...t.resolver||!T?{isValid:M}:{},errors:n.errors}),A.shouldFocus&&!K&&hc(r,P,T?q:a.mount),K},W=T=>{const A={...o.mount?i:s};return ct(T)?A:Vr(T)?Y(A,T):T.map(M=>Y(A,M))},ce=(T,A)=>({invalid:!!Y((A||n).errors,T),isDirty:!!Y((A||n).dirtyFields,T),error:Y((A||n).errors,T),isValidating:!!Y(n.validatingFields,T),isTouched:!!Y((A||n).touchedFields,T)}),oe=T=>{T&&dc(T).forEach(A=>gt(n.errors,A)),f.state.next({errors:T?n.errors:{}})},me=(T,A,M)=>{const K=(Y(r,T,{_f:{}})._f||{}).ref,q=Y(n.errors,T)||{},{ref:H,message:Z,type:_e,...Ue}=q;Le(n.errors,T,{...Ue,...A,ref:K}),f.state.next({name:T,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&K&&K.focus&&K.focus()},pe=(T,A)=>fr(T)?f.state.subscribe({next:M=>"values"in M&&T(D(void 0,A),M)}):D(T,A,!0),Ve=T=>f.state.subscribe({next:A=>{xH(T.name,A.name,T.exact)&&vH(A,T.formState||d,Yr,T.reRenderRoot)&&T.callback({values:{...i},...n,...A,defaultValues:s})}}).unsubscribe,Je=T=>(o.mount=!0,h={...h,...T.formState},Ve({...T,formState:h})),G=(T,A={})=>{for(const M of T?dc(T):a.mount)a.mount.delete(M),a.array.delete(M),A.keepValue||(gt(r,M),gt(i,M)),!A.keepError&>(n.errors,M),!A.keepDirty&>(n.dirtyFields,M),!A.keepTouched&>(n.touchedFields,M),!A.keepIsValidating&>(n.validatingFields,M),!t.shouldUnregister&&!A.keepDefaultValue&>(s,M);f.state.next({values:St(i)}),f.state.next({...n,...A.keepDirty?{isDirty:$()}:{}}),!A.keepIsValid&&g()},Ae=({disabled:T,name:A})=>{(xn(T)&&o.mount||T||a.disabled.has(A))&&(T?a.disabled.add(A):a.disabled.delete(A))},We=(T,A={})=>{let M=Y(r,T);const K=xn(A.disabled)||xn(t.disabled);return Le(r,T,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:T}},name:T,mount:!0,...A}}),a.mount.add(T),M?Ae({disabled:xn(A.disabled)?A.disabled:t.disabled,name:T}):S(T,!0,A.value),{...K?{disabled:A.disabled||t.disabled}:{},...t.progressive?{required:!!A.required,min:Pl(A.min),max:Pl(A.max),minLength:Pl(A.minLength),maxLength:Pl(A.maxLength),pattern:Pl(A.pattern)}:{},name:T,onChange:ne,onBlur:ne,ref:q=>{if(q){We(T,A),M=Y(r,T);const H=ct(q.value)&&q.querySelectorAll&&q.querySelectorAll("input,select,textarea")[0]||q,Z=hH(H),_e=M._f.refs||[];if(Z?_e.find(Ue=>Ue===H):H===M._f.ref)return;Le(r,T,{_f:{...M._f,...Z?{refs:[..._e.filter(wm),H,...Array.isArray(Y(s,T))?[{}]:[]],ref:{type:H.type,name:T}}:{ref:H}}}),S(T,!1,void 0,H)}else M=Y(r,T,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||A.shouldUnregister)&&!(hN(a.array,T)&&o.action)&&a.unMount.add(T)}}},Ee=()=>t.shouldFocusError&&hc(r,P,a.mount),ke=T=>{xn(T)&&(f.state.next({disabled:T}),hc(r,(A,M)=>{const K=Y(r,M);K&&(A.disabled=K._f.disabled||T,Array.isArray(K._f.refs)&&K._f.refs.forEach(q=>{q.disabled=K._f.disabled||T}))},0,!1))},Te=(T,A)=>async M=>{let K;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let q=St(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:Z}=await E();n.errors=H,q=St(Z)}else await N(r);if(a.disabled.size)for(const H of a.disabled)gt(q,H);if(gt(n.errors,"root"),ln(n.errors)){f.state.next({errors:{}});try{await T(q,M)}catch(H){K=H}}else A&&await A({...n.errors},M),Ee(),setTimeout(Ee);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ln(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},Ct=(T,A={})=>{Y(r,T)&&(ct(A.defaultValue)?V(T,St(Y(s,T))):(V(T,A.defaultValue),Le(s,T,St(A.defaultValue))),A.keepTouched||gt(n.touchedFields,T),A.keepDirty||(gt(n.dirtyFields,T),n.isDirty=A.defaultValue?$(T,St(Y(s,T))):$()),A.keepError||(gt(n.errors,T),d.isValid&&g()),f.state.next({...n}))},Kt=(T,A={})=>{const M=T?St(T):s,K=St(M),q=ln(T),H=q?s:K;if(A.keepDefaultValues||(s=M),!A.keepValues){if(A.keepDirtyValues){const Z=new Set([...a.mount,...Object.keys(Al(s,i))]);for(const _e of Array.from(Z))Y(n.dirtyFields,_e)?Le(H,_e,Y(i,_e)):V(_e,Y(H,_e))}else{if(l0&&ct(T))for(const Z of a.mount){const _e=Y(r,Z);if(_e&&_e._f){const Ue=Array.isArray(_e._f.refs)?_e._f.refs[0]:_e._f.ref;if($h(Ue)){const rn=Ue.closest("form");if(rn){rn.reset();break}}}}if(A.keepFieldsRef)for(const Z of a.mount)V(Z,Y(H,Z));else r={}}i=t.shouldUnregister?A.keepDefaultValues?St(s):{}:St(H),f.array.next({values:{...H}}),f.state.next({values:{...H}})}a={mount:A.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!A.keepIsValid||!!A.keepDirtyValues,o.watch=!!t.shouldUnregister,f.state.next({submitCount:A.keepSubmitCount?n.submitCount:0,isDirty:q?!1:A.keepDirty?n.isDirty:!!(A.keepDefaultValues&&!cs(T,s)),isSubmitted:A.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:q?{}:A.keepDirtyValues?A.keepDefaultValues&&i?Al(s,i):n.dirtyFields:A.keepDefaultValues&&T?Al(s,T):A.keepDirty?n.dirtyFields:{},touchedFields:A.keepTouched?n.touchedFields:{},errors:A.keepErrors?n.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},_r=(T,A)=>Kt(fr(T)?T(i):T,A),Er=(T,A={})=>{const M=Y(r,T),K=M&&M._f;if(K){const q=K.refs?K.refs[0]:K.ref;q.focus&&(q.focus(),A.shouldSelect&&fr(q.select)&&q.select())}},Yr=T=>{n={...n,...T}},Xr={control:{register:We,unregister:G,getFieldState:ce,handleSubmit:Te,setError:me,_subscribe:Ve,_runSchema:E,_focusError:Ee,_getWatch:D,_getDirty:$,_setValid:g,_setFieldArray:x,_setDisabledField:Ae,_setErrors:w,_getFieldArray:U,_reset:Kt,_resetDefaultValues:()=>fr(t.defaultValues)&&t.defaultValues().then(T=>{_r(T,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:R,_disableForm:ke,_subjects:f,_proxyFormState:d,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(T){o=T},get _defaultValues(){return s},get _names(){return a},set _names(T){a=T},get _formState(){return n},get _options(){return t},set _options(T){t={...t,...T}}},subscribe:Je,trigger:L,register:We,handleSubmit:Te,watch:pe,setValue:V,getValues:W,reset:_r,resetField:Ct,clearErrors:oe,unregister:G,setError:me,setFocus:Er,getFieldState:ce};return{...Xr,formControl:Xr}}function EH(e={}){const t=O.useRef(void 0),n=O.useRef(void 0),[r,s]=O.useState({isDirty:!1,isValidating:!1,isLoading:fr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:fr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!fr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...a}=_H(e);t.current={...a,formState:r}}const i=t.current.control;return i._options=e,h0(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0});return s(a=>({...a,isReady:!0})),i._formState.isReady=!0,o},[i]),O.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),O.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),O.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),O.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),O.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),O.useEffect(()=>{e.values&&!cs(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[i,e.values]),O.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=fN(r,i),t.current}const J1=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Y(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},SN=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?J1(r.ref,n,e):r.refs&&r.refs.forEac
vendor: 3,044 bytes, line 302
302h(s=>J1(s,n,e))}},TH=(e,t)=>{t.shouldUseNativeValidation&&SN(e,t);const n={};for(const r in e){const s=Y(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(CH(t.names||Object.keys(e),r)){const o=Object.assign({},Y(n,r));Le(o,"root",i),Le(n,r,o)}else Le(n,r,i)}return n},CH=(e,t)=>e.some(n=>n.startsWith(t+"."));var jH=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(h){return e.push(h)})}),t){var l=n[o].types,u=l&&l[r.code];n[o]=mN(o,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},RH=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&SN({},i),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:TH(jH(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},Pe;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Pe||(Pe={}));var Q1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Q1||(Q1={}));const ie=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ms=e=>{switch(typeof e){case"undefined":return ie.undefined;case"string":return ie.string;case"number":return Number.isNaN(e)?ie.nan:ie.number;case"boolean":return ie.boolean;case"function":return ie.function;case"bigint":return ie.bigint;case"symbol":return ie.symbol;case"object":return Array.isArray(e)?ie.array:e===null?ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ie.promise:typeof Map<"u"&&e instanceof Map?ie.map:typeof Set<"u"&&e instanceof Set?ie.set:typeof Date<"u"&&e instanceof Date?ie.date:ie.object;default:return ie.unknown}}
vendor: 4,686 bytes, line 302
302,z=Pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class xs extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),r}static assert(t){if(!(t instanceof xs))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}xs.create=e=>new xs(e);const zy=(e,t)=>{let n;switch(e.code){case z.invalid_type:e.received===ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Pe.jsonStringifyReplacer)}`;break;case z.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case z.invalid_union:n="Invalid input";break;case z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case z.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.joinValues(e.options)}, received '${e.received}'`;break;case z.invalid_arguments:n="Invalid function arguments";break;case z.invalid_return_type:n="Invalid function return type";break;case z.invalid_date:n="Invalid date";break;case z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case z.custom:n="Invalid input";break;case z.invalid_intersection_types:n="Intersection results could not be merged";break;case z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case z.not_finite:n="Number must be finite";break;default:n=t.defaultError,Pe.assertNever(e)}return{message:n}};let NH=zy;function AH(){return NH}const PH=e=>
vendor: 7,208 bytes, line 302
302{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}};function Q(e,t){const n=AH(),r=PH({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===zy?void 0:zy].filter(s=>!!s)});e.common.issues.push(r)}class Tn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return ge;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Tn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const ge=Object.freeze({status:"aborted"}),zl=e=>({status:"dirty",value:e}),Kn=e=>({status:"valid",value:e}),Z1=e=>e.status==="aborted",ek=e=>e.status==="dirty",Za=e=>e.status==="valid",Bh=e=>typeof Promise<"u"&&e instanceof Promise;var ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ae||(ae={}));class bi{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const tk=(e,t)=>{if(Za(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new xs(e.common.issues);return this._error=n,this._error}}};function we(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{const{message:l}=e;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:s}}class Ne{get description(){return this._def.description}_getType(t){return Ms(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ms(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Tn,ctx:{common:t.parent.common,data:t.data,parsedType:Ms(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Bh(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ms(t)},s=this._parseSync({data:t,path:r.path,parent:r});return tk(r,s)}"~validate"(t){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ms(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return Za(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>Za(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ms(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Bh(s)?s:Promise.resolve(s));return tk(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:z.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new tl({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return di.create(this,this._def)}nullable(){return nl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wr.create(this)}promise(){return qh.create(this,this._def)}or(t){return Wh.create([this,t],this._def)}and(t){return Hh.create(this,t,this._def)}transform(t){return new tl({...we(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new qy({...we(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new t9({typeName:ye.ZodBranded,type:this,...we(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ky({...we(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return m0.create(this,t)}readonly(){return Gy.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const OH=/^c[^\s-]{8,}
vendor: 4,606 bytes, line 302
302$/i,IH=/^[0-9a-z]+$/,DH=/^[0-9A-HJKMNP-TV-Z]{26}$/i,LH=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,MH=/^[a-z0-9_-]{21}$/i,FH=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$H=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,VH=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,UH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let bm;const BH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,WH=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,HH=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qH=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,KH=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,kN="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",GH=new RegExp(`^${kN}$`);function _N(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function YH(e){return new RegExp(`^${_N(e)}$`)}function XH(e){let t=`${kN}T${_N(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function JH(e,t){return!!((t==="v4"||!t)&&BH.test(e)||(t==="v6"||!t)&&WH.test(e))}function QH(e,t){if(!FH.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function ZH(e,t){return!!((t==="v4"||!t)&&zH.test(e)||(t==="v6"||!t)&&HH.test(e))}class ei extends Ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ie.string){const i=this._getOrReturnCtx(t);return Q(i,{code:z.invalid_type,expected:ie.string,received:i.parsedType}),ge}const r=new Tn;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),Q(s,{code:z.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),Q(s,{code:z.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?Q(s,{code:z.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Q(s,{code:z.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")VH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"email",code:z.invali
vendor: 5,987 bytes, line 302
302d_string,message:i.message}),r.dirty());else if(i.kind==="emoji")bm||(bm=new RegExp(UH,"u")),bm.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"emoji",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")LH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"uuid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")MH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"nanoid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")OH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"cuid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")IH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"cuid2",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")DH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"ulid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),Q(s,{validation:"url",code:z.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"regex",code:z.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),Q(s,{code:z.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),Q(s,{code:z.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),Q(s,{code:z.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?XH(i).test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{code:z.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?GH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{code:z.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?YH(i).test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{code:z.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?$H.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"duration",code:z.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?JH(t.data,i.version)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"ip",code:z.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?QH(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"jwt",code:z.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?ZH(t.data,i.version)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"cidr",code:z.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?qH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"base64",code:z.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?KH.test(t.data)||(s=this._getOrReturnCtx(t,s),Q(s,{validation:"base64url",code:z.invalid_string,message:i.message}),r.dirty()):Pe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:z.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new ei({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ae.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ae.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ae.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ae.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ae.errToObj(n)})}nonempty(t){return this.min(1,ae.errToObj(t))}trim(){return new ei({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ei({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ei({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,658 bytes, line 302
302get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ei.create=e=>new ei({checks:[],typeName:ye.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...we(e)});function e9(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}class Kc extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ie.number){const i=this._getOrReturnCtx(t);return Q(i,{code:z.invalid_type,expected:ie.number,received:i.parsedType}),ge}let r;const s=new Tn;for(const i of this._def.checks)i.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Q(r,{code:z.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?e9(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Q(r,{code:z.not_finite,message:i.message}),s.dirty()):Pe.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,s){return new Kc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(s)}]})}_addCheck(t){return new Kc({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Pe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}
vendor: 4,116 bytes, line 302
302}Kc.create=e=>new Kc({checks:[],typeName:ye.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class Gc extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ie.bigint)return this._getInvalidInput(t);let r;const s=new Tn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Pe.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Q(n,{code:z.invalid_type,expected:ie.bigint,received:n.parsedType}),ge}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,s){return new Gc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(s)}]})}_addCheck(t){return new Gc({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Gc.create=e=>new Gc({checks:[],typeName:ye.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...we(e)});class nk extends Ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ie.boolean){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:ie.boolean,received:r.parsedType}),ge}return Kn(t.data)}}nk.create=e=>new nk({typeName:ye.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class zh extends Ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ie.date){const i=this._getOrReturnCtx(t);return Q(i,{code:z.invalid_type,expected:ie.date,received:i.parsedType}),ge}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Q(i,{code:z.invalid_date}),ge}const r=new Tn;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),Q(s,{code:z.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),Q(s,{code:z.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Pe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new zh({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}zh.create=e=>new zh({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ye.ZodD
vendor: 8,516 bytes, line 302
302ate,...we(e)});class rk extends Ne{_parse(t){if(this._getType(t)!==ie.symbol){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:ie.symbol,received:r.parsedType}),ge}return Kn(t.data)}}rk.create=e=>new rk({typeName:ye.ZodSymbol,...we(e)});class sk extends Ne{_parse(t){if(this._getType(t)!==ie.undefined){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:ie.undefined,received:r.parsedType}),ge}return Kn(t.data)}}sk.create=e=>new sk({typeName:ye.ZodUndefined,...we(e)});class ik extends Ne{_parse(t){if(this._getType(t)!==ie.null){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:ie.null,received:r.parsedType}),ge}return Kn(t.data)}}ik.create=e=>new ik({typeName:ye.ZodNull,...we(e)});class ok extends Ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Kn(t.data)}}ok.create=e=>new ok({typeName:ye.ZodAny,...we(e)});class ak extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Kn(t.data)}}ak.create=e=>new ak({typeName:ye.ZodUnknown,...we(e)});class Si extends Ne{_parse(t){const n=this._getOrReturnCtx(t);return Q(n,{code:z.invalid_type,expected:ie.never,received:n.parsedType}),ge}}Si.create=e=>new Si({typeName:ye.ZodNever,...we(e)});class lk extends Ne{_parse(t){if(this._getType(t)!==ie.undefined){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:ie.void,received:r.parsedType}),ge}return Kn(t.data)}}lk.create=e=>new lk({typeName:ye.ZodVoid,...we(e)});class Wr extends Ne{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==ie.array)return Q(n,{code:z.invalid_type,expected:ie.array,received:n.parsedType}),ge;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(Q(n,{code:o?z.too_big:z.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(Q(n,{code:z.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(Q(n,{code:z.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new bi(n,o,n.path,a)))).then(o=>Tn.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new bi(n,o,n.path,a)));return Tn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Wr({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new Wr({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new Wr({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}Wr.create=(e,t)=>new Wr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...we(t)});function Zo(e){if(e instanceof at){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=di.create(Zo(r))}return new at({...e._def,shape:()=>t})}else return e instanceof Wr?new Wr({...e._def,type:Zo(e.element)}):e instanceof di?di.create(Zo(e.unwrap())):e instanceof nl?nl.create(Zo(e.unwrap())):e instanceof ko?ko.create(e.items.map(t=>Zo(t))):e}class at extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Pe.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ie.object){const u=this._getOrReturnCtx(t);return Q(u,{code:z.invalid_type,expected:ie.object,received:u.parsedType}),ge}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Si&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const d=i[u],h=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new bi(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Si){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(Q(s,{code:z.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const h=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new bi(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const h=await d.key,f=await d.value;u.push({key:h,value:f,alwaysSet:d.alwaysSet})}return u}).then(u=>Tn.mergeObjectSync(r,u)):Tn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ae.errToObj,new at({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:ae.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new at({...this._def,unknownKeys:"strip"})}passthrough(){return new at({...this._def,unknownKeys:"passthrough"})}extend(t){return new at({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new at({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ye.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new at({...this._def,catchall:t})}pick(t){const n={};for(const r of Pe.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new at({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Pe.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new at({...this._def,shape:()=>n})}deepPartial(){return Zo(this)}partial(t){const n={};for(const r of Pe.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new at({...this._def,shape:()=>n})}required(t){const n={};for(const r of Pe.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof di;)i=i._def.innerType;n[r]=i}return new at({...this._def,shape:()=>n})}keyof(){return EN(Pe.objectKeys(this.shape))}}at.create=(e,t)=>new at({shape:()=>e,unknownKeys:"strip",catchall:Si.create(),typeName:ye.ZodObject,...we(t)});at.strictCreate=(e,t)=>new at({shape:()=>e,unknownKeys:"strict",catchall:Si.create(),typeName:ye.ZodObject,...we(t)});at.lazycreate=(e,t)=>new at({shape:e,unknownKeys:"strip",catchall:Si.create(),typeName:ye.ZodObject,...we(t)});class Wh extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new xs(a.ctx.common.issues));return Q(n,{code:z.invalid_union,unionErrors:o}),ge}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new xs(l));return Q(n,{code:z.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}}Wh.create=(e,t)=>new Wh({options:e,typeName:ye.ZodUnion,...we(t)});function Wy(e,t){const n=Ms(e),r=Ms(t);if(e===t)return{valid:!0,data:e};if(n===ie.object&&r===ie.object){const s=Pe.objectKeys(t),i=Pe.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=Wy(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===ie.array&&r===ie.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],a=t[i],l=Wy(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===ie.date&&r===ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Hh extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>
vendor: 4,082 bytes, line 302
302{if(Z1(i)||Z1(o))return ge;const a=Wy(i.value,o.value);return a.valid?((ek(i)||ek(o))&&n.dirty(),{status:n.value,value:a.data}):(Q(r,{code:z.invalid_intersection_types}),ge)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Hh.create=(e,t,n)=>new Hh({left:e,right:t,typeName:ye.ZodIntersection,...we(n)});class ko extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.array)return Q(r,{code:z.invalid_type,expected:ie.array,received:r.parsedType}),ge;if(r.data.length<this._def.items.length)return Q(r,{code:z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&r.data.length>this._def.items.length&&(Q(r,{code:z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new bi(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Tn.mergeArray(n,o)):Tn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ko({...this._def,rest:t})}}ko.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ko({items:e,typeName:ye.ZodTuple,rest:null,...we(t)})};class ck extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.map)return Q(r,{code:z.invalid_type,expected:ie.map,received:r.parsedType}),ge;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new bi(r,a,r.path,[u,"key"])),value:i._parse(new bi(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return ge;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return ge;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}ck.create=(e,t,n)=>new ck({valueType:t,keyType:e,typeName:ye.ZodMap,...we(n)});class Yc extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.set)return Q(r,{code:z.invalid_type,expected:ie.set,received:r.parsedType}),ge;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(Q(r,{code:z.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(Q(r,{code:z.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const d of l){if(d.status==="aborted")return ge;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>i._parse(new bi(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new Yc({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new Yc({...this._def,maxSize:{value:t,message:ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Yc.create=(e,t)=>new Yc({valueType:e,minSize:null,maxSize:null,typeName:ye.ZodSet,...we(t)});class uk extends Ne{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}uk.create=(e,t)=>new uk({getter:e,typeName:ye.ZodLazy,...we(t)});class Hy extends Ne{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);
vendor: 4,230 bytes, line 302
302return Q(n,{received:n.data,code:z.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}Hy.create=(e,t)=>new Hy({value:e,typeName:ye.ZodLiteral,...we(t)});function EN(e,t){return new el({values:e,typeName:ye.ZodEnum,...we(t)})}class el extends Ne{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Q(n,{expected:Pe.joinValues(r),received:n.parsedType,code:z.invalid_type}),ge}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Q(n,{received:n.data,code:z.invalid_enum_value,options:r}),ge}return Kn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return el.create(t,{...this._def,...n})}exclude(t,n=this._def){return el.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}el.create=EN;class dk extends Ne{_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ie.string&&r.parsedType!==ie.number){const s=Pe.objectValues(n);return Q(r,{expected:Pe.joinValues(s),received:r.parsedType,code:z.invalid_type}),ge}if(this._cache||(this._cache=new Set(Pe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Pe.objectValues(n);return Q(r,{received:r.data,code:z.invalid_enum_value,options:s}),ge}return Kn(t.data)}get enum(){return this._def.values}}dk.create=(e,t)=>new dk({values:e,typeName:ye.ZodNativeEnum,...we(t)});class qh extends Ne{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.promise&&n.common.async===!1)return Q(n,{code:z.invalid_type,expected:ie.promise,received:n.parsedType}),ge;const r=n.parsedType===ie.promise?n.data:Promise.resolve(n.data);return Kn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}qh.create=(e,t)=>new qh({type:e,typeName:ye.ZodPromise,...we(t)});class tl extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{Q(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return ge;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ge:l.status==="dirty"||n.value==="dirty"?zl(l.value):l});{if(n.value==="aborted")return ge;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?ge:a.status==="dirty"||n.value==="dirty"?zl(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ge:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ge:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Za(o))return ge;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Za(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):ge);Pe.assertNever(s)}}
vendor: 4,613 bytes, line 302
302tl.create=(e,t,n)=>new tl({schema:e,typeName:ye.ZodEffects,effect:t,...we(n)});tl.createWithPreprocess=(e,t,n)=>new tl({schema:t,effect:{type:"preprocess",transform:e},typeName:ye.ZodEffects,...we(n)});class di extends Ne{_parse(t){return this._getType(t)===ie.undefined?Kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}di.create=(e,t)=>new di({innerType:e,typeName:ye.ZodOptional,...we(t)});class nl extends Ne{_parse(t){return this._getType(t)===ie.null?Kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}nl.create=(e,t)=>new nl({innerType:e,typeName:ye.ZodNullable,...we(t)});class qy extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ie.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}qy.create=(e,t)=>new qy({innerType:e,typeName:ye.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...we(t)});class Ky extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Bh(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new xs(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new xs(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ky.create=(e,t)=>new Ky({innerType:e,typeName:ye.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...we(t)});class hk extends Ne{_parse(t){if(this._getType(t)!==ie.nan){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:ie.nan,received:r.parsedType}),ge}return{status:"valid",value:t.data}}}hk.create=e=>new hk({typeName:ye.ZodNaN,...we(e)});class t9 extends Ne{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class m0 extends Ne{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ge:i.status==="dirty"?(n.dirty(),zl(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ge:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new m0({in:t,out:n,typeName:ye.ZodPipeline})}}class Gy extends Ne{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Za(s)&&(s.value=Object.freeze(s.value)),s);return Bh(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Gy.create=(e,t)=>new Gy({innerType:e,typeName:ye.ZodReadonly,...we(t)});at.lazycreate;var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ye||(ye={}));const yn=ei.create;Si.create;Wr.create;const n9=at.create;at.strictCreate;Wh.create;Hh.create;ko.create;const Sm=Hy.create,km=el.create;qh.create;di.create;nl.create;var TN={exports:{}},r9="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",s9=r9,i9=s9;function CN(){}function jN(){}jN.resetWarningCache=CN;var o9=function(){function e(r,s,i,o,a,l){if(l!==i9){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
302:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jN,resetWarningCache:CN};return n.PropTypes=n,n};TN.exports=o9();var a9=TN.exports;const on=jo(a9);var l9=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Yy(){return Yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yy.apply(this,arguments)}function c9(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function ad(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xy(e,t)}function Xy(e,t){return Xy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},Xy(e,t)}var zf=function(e){u9(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(ad(r)),r.handleErrored=r.handleErrored.bind(ad(r)),r.handleChange=r.handleChange.bind(ad(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(ad(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(s){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[s]:this.props.grecaptcha[s]:null},n.getValue=function(){var s=this.getCaptchaFunction("getResponse");return s&&this._widgetId!==void 0?s(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var s=this.getCaptchaFunction("execute");if(s&&this._widgetId!==void 0)return s(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var s=this;return new Promise(function(i,o){s.executionResolve=i,s.executionReject=o,s.execute()})},n.reset=function(){var s=this.getCaptchaFunction("reset");s&&this._widgetId!==void 0&&s(this._widgetId)},n.forceReset=function(){var s=this.getCaptchaFunction("reset");s&&s()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(s){this.props.onChange&&this.props.onChange(s),this.executionResolve&&(this.executionResolve(s),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var s=this.getCaptchaFunction("render");if(s&&this._widgetId===void 0){var i=document.createElement("div");this._widgetId=s(i,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(i)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(s){this.captcha=s},n.render=function(){var s=this.props;s.sitekey,s.onChange,s.theme,s.type,s.tabindex,s.onExpired,s.onErrored,s.size,s.stoken,s.grecaptcha,s.badge,s.hl,s.isolated;var i=c9(s,l9);return m.createElement("div",Yy({},i,{ref:this.handleRecaptchaRef}))},t}(m.Component);zf.displayName="ReCAPTCHA";zf.propTypes={sitekey:on.string.isRequired,onChange:on.func,grecaptcha:on.object,theme:on.oneOf(["dark","light"]),type:on.oneOf(["image","audio"]),tabindex:on.number,onExpired:on.func,onErrored:on.func,size:on.oneOf(["compact","normal","invisible"]),stoken:on.string,hl:on.string,badge:on.oneOf(["bottomright","bottomleft","inline"]),isolated:on.bool};zf.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var RN={exports:{}},$e={};
302/** @license React v16.13.1 303 * react-is.production.min.js 304 * 305 * Copyright (c) Facebook, Inc. and its affiliates. 306 * 307 * This source code is licensed under the MIT license found in the 308 * LICENSE file in the root directory of this source tree. 309 */var Pt=typeof Symbol=="function"&&Symbol.for,g0=Pt?Symbol.for("react.element"):60103,y0=Pt?Symbol.for("react.portal"):60106,Wf=Pt?Symbol.for("react.fragment"):60107,Hf=Pt?Symbol.for("react.strict_mode"):60108,qf=Pt?Symbol.for("react.profiler"):60114,Kf=Pt?Symbol.for("react.provider"):60109,Gf=Pt?Symbol.for("react.context"):60110,v0=Pt?Symbol.for("react.async_mode"):60111,Yf=Pt?Symbol.for("react.concurrent_mode"):60111,Xf=Pt?Symbol.for("react.forward_ref"):60112,Jf=Pt?Symbol.for("react.suspense"):60113,d9=Pt?Symbol.for("react.suspense_list"):60120,Qf=Pt?Symbol.for("react.memo"):60115,Zf=Pt?Symbol.for("react.lazy"):60116,h9=Pt?Symbol.for("react.block"):60121,f9=Pt?Symbol.for("react.fundamental"):60117,p9=Pt?Symbol.for("react.responder"):60118,m9=Pt?Symbol.for("react.scope"):60119;function Nn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case g0:switch(e=e.type,e){case v0:case Yf:case Wf:case qf:case Hf:case Jf:return e;default:switch(e=e&&e.$$typeof,e){case Gf:case Xf:case Zf:case Qf:case Kf:return e;default:return t}}case y0:return t}}}function NN(e){return Nn(e)===Yf}$e.AsyncMode=v0;$e.ConcurrentMode=Yf;$e.ContextConsumer=Gf;$e.ContextProvider=Kf;$e.Element=g0;$e.ForwardRef=Xf;$e.Fragment=Wf;$e.Lazy=Zf;$e.Memo=Qf;$e.Portal=y0;$e.Profiler=qf;$e.StrictMode=Hf;$e.Suspense=Jf;$e.isAsyncMode=function(e){return NN(e)||Nn(e)===v0};$e.isConcurrentMode=NN;$e.isContextConsumer=function(e){return Nn(e)===Gf};$e.isContextProvider=function(e){return Nn(e)===Kf};$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===g0};$e.isForwardRef=function(e){return Nn(e)===Xf};$e.isFragment=function(e){return Nn(e)===Wf};$e.isLazy=function(e){return Nn(e)===Zf};$e.isMemo=function(e){return Nn(e)===Qf};$e.isPortal=function(e){return Nn(e)===y0};$e.isProfiler=function(e){return Nn(e)===qf};$e.isStrictMode=function(e){return Nn(e)===Hf};$e.isSuspense=function(e){return Nn(e)===Jf};$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Wf||e===Yf||e===qf||e===Hf||e===Jf||e===d9||typeof e=="object"&&e!==null&&(e.$$typeof===Zf||e.$$typeof===Qf||e.$$typeof===Kf||e.$$typeof===Gf||e.$$typeof===Xf||e.$$typeof===f9||e.$$typeof===p9||e.$$typeof===m9||e.$$typeof===h9)};$e.typeOf=Nn;RN.exports=$e;var g9=RN.exports,x0=g9,y9={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},v9={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},x9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},AN={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},w0={};w0[x0.ForwardRef]=x9;w0[x0.Memo]=AN;function fk(e){return x0.isMemo(e)?AN:w0[e.$$typeof]||y9}var w9=Object.defineProperty,b9=Object.getOwnPropertyNames,pk=Object.getOwnPropertySymbols,S9=Object.getOwnPropertyDescriptor,k9=Object.getPrototypeOf,mk=Object.prototype;function PN(e,t,n){if(typeof t!="string"){if(mk){var r=k9(t);r&&r!==mk&&PN(e,r,n)}var s=b9(t);pk&&(s=s.concat(pk(t)));for(var i=fk(e),o=fk(t),a=0;a<s.length;++a){var l=s[a];if(!v9[l]&&!(n&&n[l])&&!(o&&o[l])&&!(i&&i[l])){var u=S9(t,l);try{w9(e,l,u)}catch{}}}}return e}var _9=PN;const E9=jo(_9);function Jy(){return Jy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jy.apply(this,arguments)}function T9(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function C9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var tr={},j9=0;function R9(e,t){return t=t||{},function(r){var s=r.displayName||r.name||"Component",i=function(a){C9(l,a);function l(d,h){var f;return f=a.call(this,d,h)||this,f.state={},f.__scriptURL="",f}var u=l.prototype;return u.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+j9++),this.__scriptLoaderID},u.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},u.asyncScriptLoaderHandleLoad=function(h){var f=this;this.setState(h,function(){return f.props.asyncScriptOnLoad&&f.props.asyncScriptOnLoad(f.state)})},u.asyncScriptLoaderTriggerOnScriptLoaded=function(){var h=tr[this.__scriptURL];if(!h||!h.loaded)throw new Error("Script is not loaded.");for(var f in h.observers)h.observers[f](h);delete window[t.callbackName]},u.componentDidMount=function(){var h=this,f=this.setupScriptURL(),p=this.asyncScriptLoaderGetScriptLoaderID(),y=t,g=y.globalName,b=y.callbackName,x=y.scriptId;if(g&&typeof window[g]<"u"&&(tr[f]={loaded:!0,observers:{}}),tr[f]){var v=tr[f];if(v&&(v.loaded||v.errored)){this.asyncScriptLoaderHandleLoad(v);return}v.observers[p]=function(E){return h.asyncScriptLoaderHandleLoad(E)};return}var w={};w[p]=function(E){return h.asyncScriptLoaderHandleLoad(E)},tr[f]={loaded:!1,observers:w};var S=document.createElement("script");S.src=f,S.async=!0;for(var k in t.attributes)S.setAttribute(k,t.attributes[k]);x&&(S.id=x);var _=function(C){if(tr[f]){var N=tr[f],R=N.observers;for(var $ in R)C(R[$])&&delete R[$]}};b&&typeof window<"u"&&(window[b]=function(){return h.asyncScriptLoaderTriggerOnScriptLoaded()}),S.onload=function(){var E=tr[f];E&&(E.loaded=!0,_(function(C){return b?!1:(C(E),!0)}))},S.onerror=function(){var E=tr[f];E&&(E.errored=!0,_(function(C){return C(E),!0}))},document.body.appendChild(S)},u.componentWillUnmount=function(){var h=this.__scriptURL;if(t.removeOnUnmount===!0)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p+=1)f[p].src.indexOf(h)>-1&&f[p].parentNode&&f[p].parentNode.removeChild(f[p]);var y=tr[h];
309y&&(delete y.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete tr[h])},u.render=function(){var h=t.globalName,f=this.props;f.asyncScriptOnLoad;var p=f.forwardedRef,y=T9(f,["asyncScriptOnLoad","forwardedRef"]);return h&&typeof window<"u"&&(y[h]=typeof window[h]<"u"?window[h]:void 0),y.ref=p,m.createElement(r,y)},l}(m.Component),o=m.forwardRef(function(a,l){return m.createElement(i,Jy({},a,{forwardedRef:l}))});return o.displayName="AsyncScriptLoader("+s+")",o.propTypes={asyncScriptOnLoad:on.func},E9(o,r)}}var Qy="onloadcallback",N9="grecaptcha";function Zy(){return typeof window<"u"&&window.recaptchaOptions||{}}function A9(){var e=Zy(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Qy+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Qy+"&render=explicit"}const P9=R9(A9,{callbackName:Qy,globalName:N9,attributes:Zy().nonce?{nonce:Zy().nonce}:{}})(zf),On=m.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:ue("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));On.displayName="Input";const ON=m.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:ue("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
309ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));ON.displayName="Textarea";function b0(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ep="Checkbox",[O9,VG]=br(ep),[I9,S0]=O9(ep);function D9(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:h}=e,[f,p]=xo({prop:n,defaultProp:s??!1,onChange:l,caller:ep}),[y,g]=m.useState(null),[b,x]=m.useState(null),v=m.useRef(!1),w=y?!!o||!!y.closest("form"):!0,S={checked:f,disabled:i,setChecked:p,control:y,setControl:g,name:a,form:o,value:d,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:hi(s)?!1:s,isFormControl:w,bubbleInput:b,setBubbleInput:x};return c.jsx(I9,{scope:t,...S,children:L9(h)?h(S):r})}var IN="CheckboxTrigger",DN=m.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:i,value:o,disabled:a,checked:l,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:y}=S0(IN,e),g=be(s,d),b=m.useRef(l);return m.useEffect(()=>{const x=i==null?void 0:i.form;if(x){const v=()=>h(b.current);return x.addEventListener("reset",v),()=>x.removeEventListener("reset",v)}},[i,h]),c.jsx(fe.button,{type:"button",role:"checkbox","aria-checked":hi(l)?"mixed":l,"aria-required":u,"data-state":VN(l),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:g,onKeyDown:le(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:le(n,x=>{h(v=>hi(v)?!0:!v),y&&p&&(f.current=x.isPropagationStopped(),f.current||x.stopPropagation())})})});DN.displayName=IN;var k0=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:u,form:d,...h}=e;return c.jsx(D9,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:f})=>c.jsxs(c.Fragment,{children:[c.jsx(DN,{...h,ref:t,__scopeCheckbox:n}),f&&c.jsx($N,{__scopeCheckbox:n})]})})});k0.displayName=ep;var LN="CheckboxIndicator",MN=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,i=S0(LN,n);return c.jsx(Wn,{present:r||hi(i.checked)||i.checked===!0,children:c.jsx(fe.span,{"data-state":VN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});MN.displayName=LN;var FN="CheckboxBubbleInput",$N=m.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:l,name:u,value:d,form:h,bubbleInput:f,setBubbleInput:p}=S0(FN,e),y=be(n,p),g=b0(i),b=vx(r);m.useEffect(()=>{const v=f;if(!v)return;const w=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(w,"checked").set,_=!s.current;if(g!==i&&k){const E=new Event("click",{bubbles:_});v.indeterminate=hi(i),k.call(v,hi(i)?!1:i),v.dispatchEvent(E)}},[f,g,i,s]);const x=m.useRef(hi(i)?!1:i);return c.jsx(fe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??x.current,required:a,disabled:l,name:u,value:d,form:h,...t,tabIndex:-1,ref:y,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});$N.displayName=FN;function L9(e){return typeof e=="function"}function hi(e){return e==="indeterminate"}function VN(e){return hi(e)?"indeterminate":e?"checked":"unchecked"}const Bd=m.forwardRef(({className:e,...t},n)=>c.jsx(k0,{ref:n,className:ue("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(MN,{className:ue("flex items-center justify-center text-current"),children:c.jsx(BT,{className:"h-4 w-4"})})}));Bd.displayName=k0.displayName;var M9=m.createContext(void 0);function tp(e){const t=m.useContext(M9);return e||t||"ltr"}var _m="rovingFocusGroup.onEntryFocus",F9={bubbles:!1,cancelable:!0},vu="RovingFocusGroup",[ev,UN,$9]=ox(vu),[V9,BN]=br(vu,[$9]),[U9,B9]=V9(vu),zN=m.forwardRef((e,t)=>
vendor: 6,025 bytes, line 309
309c.jsx(ev.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(ev.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(z9,{...e,ref:t})})}));zN.displayName=vu;var z9=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=m.useRef(null),p=be(t,f),y=tp(i),[g,b]=xo({prop:o,defaultProp:a??null,onChange:l,caller:vu}),[x,v]=m.useState(!1),w=Et(u),S=UN(n),k=m.useRef(!1),[_,E]=m.useState(0);return m.useEffect(()=>{const C=f.current;if(C)return C.addEventListener(_m,w),()=>C.removeEventListener(_m,w)},[w]),c.jsx(U9,{scope:n,orientation:r,dir:y,loop:s,currentTabStopId:g,onItemFocus:m.useCallback(C=>b(C),[b]),onItemShiftTab:m.useCallback(()=>v(!0),[]),onFocusableItemAdd:m.useCallback(()=>E(C=>C+1),[]),onFocusableItemRemove:m.useCallback(()=>E(C=>C-1),[]),children:c.jsx(fe.div,{tabIndex:x||_===0?-1:0,"data-orientation":r,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:le(e.onMouseDown,()=>{k.current=!0}),onFocus:le(e.onFocus,C=>{const N=!k.current;if(C.target===C.currentTarget&&N&&!x){const R=new CustomEvent(_m,F9);if(C.currentTarget.dispatchEvent(R),!R.defaultPrevented){const $=S().filter(V=>V.focusable),D=$.find(V=>V.active),U=$.find(V=>V.id===g),J=[D,U,...$].filter(Boolean).map(V=>V.ref.current);qN(J,d)}}k.current=!1}),onBlur:le(e.onBlur,()=>v(!1))})})}),WN="RovingFocusGroupItem",HN=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...a}=e,l=uo(),u=i||l,d=B9(WN,n),h=d.currentTabStopId===u,f=UN(n),{onFocusableItemAdd:p,onFocusableItemRemove:y,currentTabStopId:g}=d;return m.useEffect(()=>{if(r)return p(),()=>y()},[r,p,y]),c.jsx(ev.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:c.jsx(fe.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:le(e.onMouseDown,b=>{r?d.onItemFocus(u):b.preventDefault()}),onFocus:le(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:le(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=q9(b,d.orientation,d.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=f().filter(S=>S.focusable).map(S=>S.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const S=w.indexOf(b.currentTarget);w=d.loop?K9(w,S+1):w.slice(S+1)}setTimeout(()=>qN(w))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:g!=null}):o})})});HN.displayName=WN;var W9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function H9(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function q9(e,t,n){const r=H9(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return W9[r]}function qN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function K9(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var G9=zN,Y9=HN,_0="Radio",[X9,KN]=br(_0),[J9,Q9]=X9(_0),GN=m.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,form:u,...d}=e,[h,f]=m.useState(null),p=be(t,b=>f(b)),y=m.useRef(!1),g=h?u||!!h.closest("form"):!0;return c.jsxs(J9,{scope:n,checked:s,disabled:o,children:[c.jsx(fe.button,{type:"button",role:"radio","aria-checked":s,"data-state":QN(s),"data-disabled":o?"":void 0,disabled:o,value:a,...d,ref:p,onClick:le(e.onClick,b=>{s||l==null||l(),g&&(y.current=b.isPropagationStopped(),y.current||b.stopPropagation())})}),g&&c.jsx(JN,{control:h,bubbles:!y.current,name:r,value:a,checked:s,required:i,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});GN.displayName=_0;var YN="RadioIndicator",XN=m.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,i=Q9(YN,n);return c.jsx(Wn,{present:r||i.checked,children:c.jsx(fe.span,{"data-state":QN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})})});XN.displayName=YN;var Z9="RadioBubbleInput",JN=m.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...s},i)=>{const o=m.useRef(null),a=be(o,i),l=b0(n),u=vx(t);return m.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(l!==n&&p){const y=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(y)}},[l,n,r]),c.jsx(fe.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:a,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});JN.displayName=Z9;function QN(e){return e?"checked":"unchecked"}var e7=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],np="RadioGroup",[t7,UG]=br(np,[BN,KN]),ZN=BN(),eA=KN(),[n7,r7]=t7(np),tA=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:u,loop:d=!0,onValueChange:h,...f}=e,p=ZN(n),y=tp(u),[g,b]=xo({prop:i,defaultProp:s??null,onChange:h,caller:np});return c.jsx(n7,{scope:n,name:r,required:o,disabled:a,value:g,onValueChange:b,children:c.jsx(G9,{asChild:!0,...p,orientation:l,dir:y,loop:d,children:c.jsx(fe.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:y,...f,ref:t})})})});tA.displayName=np;var nA="RadioGroupItem",rA=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,i=r7(nA,n),o=i.disabled||r,a=ZN(n),l=eA(n),u=m.useRef(null),d=be(t,u),h=i.value===s.value,f=m.useRef(!1);return m.useEffect(()=>{const p=g=>{e7.includes(g.key)&&(f.current=!0)},y=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",y)}},[]),c.jsx(Y9,{asChild:!0,...a,focusable:!o,active:h,children:c.jsx(GN,{disabled:o,required:i.required,
309checked:h,...l,...s,name:i.name,ref:d,onCheck:()=>i.onValueChange(s.value),onKeyDown:le(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:le(s.onFocus,()=>{var p;f.current&&((p=u.current)==null||p.click())})})})});rA.displayName=nA;var s7="RadioGroupIndicator",sA=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=eA(n);return c.jsx(XN,{...s,...r,ref:t})});sA.displayName=s7;var iA=tA,oA=rA,i7=sA;const tv=m.forwardRef(({className:e,...t},n)=>c.jsx(iA,{className:ue("grid gap-2",e),...t,ref:n}));tv.displayName=iA.displayName;const Wl=m.forwardRef(({className:e,...t},n)=>c.jsx(oA,{ref:n,className:ue("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(i7,{className:"flex items-center justify-center",children:c.jsx(oL,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Wl.displayName=oA.displayName;var o7="Label",aA=m.forwardRef((e,t)=>c.jsx(fe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));aA.displayName=o7;var lA=aA;const a7=lu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Kh=m.forwardRef(({className:e,...t},n)=>c.jsx(lA,{ref:n,className:ue(a7(),e),...t}));Kh.displayName=lA.displayName;const l7=aH,cA=m.createContext({}),wt=({...e})=>c.jsx(cA.Provider,{value:{name:e.name},children:c.jsx(dH,{...e})}),rp=()=>{const e=m.useContext(cA),t=m.useContext(uA),{getFieldState:n,formState:r}=Bf(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},uA=m.createContext({}),ft=m.forwardRef(({className:e,...t},n)=>{const r=m.useId();return c.jsx(uA.Provider,{value:{id:r},children:c.jsx("div",{ref:n,className:ue("space-y-2",e),...t})})});ft.displayName="FormItem";const pt=m.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=rp();return c.jsx(Kh,{ref:n,className:ue(r&&"text-destructive",e),htmlFor:s,...t})});pt.displayName="FormLabel";const mt=m.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s,formDescriptionId:i,formMessageId:o}=rp();return c.jsx(fT,{ref:n,id:s,"aria-describedby":r?`${i} ${o}`:`${i}`,"aria-invalid":!!r,className:ue(r&&"[&>*]:border-destructive [&>*]:ring-2 [&>*]:ring-destructive/30",e),...t})});mt.displayName="FormControl";const c7=m.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=rp();return c.jsx("p",{ref:n,id:r,className:ue("text-sm text-muted-foreground",e),...t})});c7.displayName="FormDescription";const bt=m.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=rp(),o=s?String(s==null?void 0:s.message):t;return o?c.jsxs("p",{ref:r,id:i,className:ue("flex items-center gap-2 text-sm font-medium text-destructive bg-destructive/10 border-l-4 border-destructive rounded-r-md px-3 py-2 mt-2",e),...n,children:[c.jsx(xL,{className:"h-4 w-4 flex-shrink-0"}),o]}):null});bt.displayName="FormMessage";function nv(e,[t,n]){return Math.min(n,Math.max(t,e))}var Em=0;function dA(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gk()),document.body.insertAdjacentElement("beforeend",e[1]??gk()),Em++,()=>{Em===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Em--}},[])}function gk(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tm="focusScope.autoFocusOnMount",Cm="focusScope.autoFocusOnUnmount",yk={bubbles:!1,cancelable:!0},u7="FocusScope",E0=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=m.useState(null),u=Et(s),d=Et(i),h=m.useRef(null),f=be(t,g=>l(g)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let g=function(w){if(p.paused||!a)return;const S=w.target;a.contains(S)?h.current=S:Os(h.current,{select:!0})},b=function(w){if(p.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||Os(h.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const k of w)k.removedNodes.length>0&&Os(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const v=new MutationObserver(x);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),v.disconnect()}}},[r,a,p.paused]),m.useEffect(()=>{if(a){xk.add(p);const g=document.activeElement;if(!a.contains(g)){const x=new CustomEvent(Tm,yk);a.addEventListener(Tm,u),a.dispatchEvent(x),x.defaultPrevented||(d7(g7(hA(a)),{select:!0}),document.activeElement===g&&Os(a))}return()=>{a.removeEventListener(Tm,u),setTimeout(()=>{const x=new CustomEvent(Cm,yk);a.addEventListener(Cm,d),a.dispatchEvent(x),x.defaultPrevented||Os(g??document.body,{select:!0}),a.removeEventListener(Cm,d),xk.remove(p)}
vendor: 4,594 bytes, line 309
309,0)}}},[a,u,d,p]);const y=m.useCallback(g=>{if(!n&&!r||p.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(b&&x){const v=g.currentTarget,[w,S]=h7(v);w&&S?!g.shiftKey&&x===S?(g.preventDefault(),n&&Os(w,{select:!0})):g.shiftKey&&x===w&&(g.preventDefault(),n&&Os(S,{select:!0})):x===v&&g.preventDefault()}},[n,r,p.paused]);return c.jsx(fe.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});E0.displayName=u7;function d7(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Os(r,{select:t}),document.activeElement!==n)return}function h7(e){const t=hA(e),n=vk(t,e),r=vk(t.reverse(),e);return[n,r]}function hA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vk(e,t){for(const n of e)if(!f7(n,{upTo:t}))return n}function f7(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function p7(e){return e instanceof HTMLInputElement&&"select"in e}function Os(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&p7(e)&&t&&e.select()}}var xk=m7();function m7(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=wk(e,t),e.unshift(t)},remove(t){var n;e=wk(e,t),(n=e[0])==null||n.resume()}}}function wk(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function g7(e){return e.filter(t=>t.tagName!=="A")}var y7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zo=new WeakMap,ld=new WeakMap,cd={},jm=0,fA=function(e){return e&&(e.host||fA(e.parentNode))},v7=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fA(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},x7=function(e,t,n,r){var s=v7(t,Array.isArray(e)?e:[e]);cd[n]||(cd[n]=new WeakMap);var i=cd[n],o=[],a=new Set,l=new Set(s),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(f){if(a.has(f))d(f);else try{var p=f.getAttribute(r),y=p!==null&&p!=="false",g=(zo.get(f)||0)+1,b=(i.get(f)||0)+1;zo.set(f,g),i.set(f,b),o.push(f),g===1&&y&&ld.set(f,!0),b===1&&f.setAttribute(n,"true"),y||f.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return d(t),a.clear(),jm++,function(){o.forEach(function(h){var f=zo.get(h)-1,p=i.get(h)-1;zo.set(h,f),i.set(h,p),f||(ld.has(h)||h.removeAttribute(r),ld.delete(h)),p||h.removeAttribute(n)}),jm--,jm||(zo=new WeakMap,zo=new WeakMap,ld=new WeakMap,cd={})}},pA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=y7(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),x7(r,s,n,"aria-hidden")):function(){return null}},$r=function(){return $r=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$r.apply(this,arguments)};function mA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function w7(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var zd="right-scroll-bar-position",Wd="width-before-scroll-bar",b7="with-scroll-bars-hidden",S7="--removed-body-scroll-bar-size";function Rm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function k7(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var _7=typeof window<"u"?m.useLayoutEffect:m.useEffect,bk=new WeakMap;function E7(e,t){var n=k7(null,function(r){return e.forEach(function(s){return Rm(s,r)})});return _7(function(){var r=bk.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;
vendor: 4,196 bytes, lines 309-324
309s.forEach(function(a){i.has(a)||Rm(a,null)}),i.forEach(function(a){s.has(a)||Rm(a,o)})}bk.set(n,e)},[e]),n}function T7(e){return e}function C7(e,t){t===void 0&&(t=T7);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function j7(e){e===void 0&&(e={});var t=C7(null);return t.options=$r({async:!0,ssr:!1},e),t}var gA=function(e){var t=e.sideCar,n=mA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,$r({},n))};gA.isSideCarExport=!0;function R7(e,t){return e.useMedium(t),gA}var yA=j7(),Nm=function(){},sp=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Nm,onWheelCapture:Nm,onTouchMoveCapture:Nm}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noRelative,y=e.noIsolation,g=e.inert,b=e.allowPinchZoom,x=e.as,v=x===void 0?"div":x,w=e.gapMode,S=mA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,_=E7([n,t]),E=$r($r({},S),s);return m.createElement(m.Fragment,null,d&&m.createElement(k,{sideCar:yA,removeScrollBar:u,shards:h,noRelative:p,noIsolation:y,inert:g,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:w}),o?m.cloneElement(m.Children.only(a),$r($r({},E),{ref:_})):m.createElement(v,$r({},E,{className:l,ref:_}),a))});sp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};sp.classNames={fullWidth:Wd,zeroRight:zd};var N7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function A7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=N7();return t&&e.setAttribute("nonce",t),e}function P7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function O7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var I7=function(){var e=0,t=null;return{add:function(n){e==0&&(t=A7())&&(P7(t,n),O7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},D7=function(){var e=I7();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vA=function(){var e=D7(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},L7={left:0,top:0,right:0,gap:0},Am=function(e){return parseInt(e||"",10)||0},M7=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Am(n),Am(r),Am(s)]},F7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return L7;var t=M7(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$7=vA(),Ca="data-scroll-locked",V7=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` 310 .`.concat(b7,` { 311 overflow: hidden `).concat(r,`; 312 padding-right: `).concat(a,"px ").concat(r,`; 313 } 314 body[`).concat(Ca,`] { 315 overflow: hidden `).concat(r,`; 316 overscroll-behavior: contain; 317 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 318 padding-left: `.concat(s,`px; 319 padding-top: `).concat(i,`px; 320 padding-right: `).concat(o,`px; 321 margin-left:0; 322 margin-top:0; 323 margin-right: `).concat(a,"px ").concat(r,`; 324 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
324")].filter(Boolean).join(""),` 325 } 326 327 .`).concat(zd,` { 328 right: `).concat(a,"px ").concat(r,`; 329 } 330 331 .`).concat(Wd,` { 332 margin-right: `).concat(a,"px ").concat(r,`; 333 } 334 335 .`).concat(zd," .").concat(zd,` { 336 right: 0 `).concat(r,`; 337 } 338 339 .`).concat(Wd," .").concat(Wd,` { 340 margin-right: 0 `).concat(r,`; 341 } 342 343 body[`).concat(Ca,`] { 344 `).concat(S7,": ").concat(a,`px; 345 } 346`)},Sk=function(){var e=parseInt(document.body.getAttribute(Ca)||"0",10);return isFinite(e)?e:0},U7=function(){m.useEffect(function(){return document.body.setAttribute(Ca,(Sk()+1).toString()),function(){var e=Sk()-1;e<=0?document.body.removeAttribute(Ca):document.body.setAttribute(Ca,e.toString())}},[])},B7=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;U7();var i=m.useMemo(function(){return F7(s)},[s]);return m.createElement($7,{styles:V7(i,!t,s,n?"":"!important")})},rv=!1;if(typeof window<"u")try{var ud=Object.defineProperty({},"passive",{get:function(){return rv=!0,!0}});window.addEventListener("test",ud,ud),window.removeEventListener("test",ud,ud)}catch{rv=!1}var Wo=rv?{passive:!1}:!1,z7=function(e){return e.tagName==="TEXTAREA"},xA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!z7(e)&&n[t]==="visible")},W7=function(e){return xA(e,"overflowY")},H7=function(e){return xA(e,"overflowX")},kk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=wA(e,r);if(s){var i=bA(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},q7=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},K7=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wA=function(e,t){return e==="v"?W7(t):H7(t)},bA=function(e,t){return e==="v"?q7(t):K7(t)},G7=function(e,t){return e==="h"&&t==="rtl"?-1:1},Y7=function(e,t,n,r,s){var i=G7(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),u=!1,d=o>0,h=0,f=0;do{if(!a)break;var p=bA(e,a),y=p[0],g=p[1],b=p[2],x=g-b-i*y;(y||x)&&wA(e,a)&&(h+=x,f+=y);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},dd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_k=function(e){return[e.deltaX,e.deltaY]},Ek=function(e){return e&&"current"in e?e.current:e},X7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},J7=function(e){return` 347 .block-interactivity-`.concat(e,` {pointer-events: none;} 348 .allow-interactivity-`).concat(e,` {pointer-events: all;} 349`)},Q7=0,Ho=[];function Z7(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(Q7++)[0],i=m.useState(vA)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=w7([e.lockRef.current],(e.shards||[]).map(Ek),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=m.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var x=dd(g),v=n.current,w="deltaX"in g?g.deltaX:v[0]-x[0],S="deltaY"in g?g.deltaY:v[1]-x[1],k,_=g.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&_.type==="range")return!1;var C=kk(E,_);if(!C)return!0;if(C?k=E:(k=E==="v"?"h":"v",C=kk(E,_)),!C)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=k),!k)return!0;var N=r.current||k;return Y7(N,b,g,N==="h"?w:S,!0)},[]),l=m.useCallback(function(g){var b=g;if(!(!Ho.length||Ho[Ho.length-1]!==i)){var x="deltaY"in b?_k(b):dd(b),v=t.current.filter(function(k){return k.name===b.type&&(k.target===b.target||b.target===k.shadowParent)&&X7(k.delta,x)})[0];if(v&&v.should){b.cancelable&&b.preventDefault();return}
vendor: 4,224 bytes, line 349
349if(!v){var w=(o.current.shards||[]).map(Ek).filter(Boolean).filter(function(k){return k.contains(b.target)}),S=w.length>0?a(b,w[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=m.useCallback(function(g,b,x,v){var w={name:g,delta:b,target:x,should:v,shadowParent:eq(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=m.useCallback(function(g){n.current=dd(g),r.current=void 0},[]),h=m.useCallback(function(g){u(g.type,_k(g),g.target,a(g,e.lockRef.current))},[]),f=m.useCallback(function(g){u(g.type,dd(g),g.target,a(g,e.lockRef.current))},[]);m.useEffect(function(){return Ho.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Wo),document.addEventListener("touchmove",l,Wo),document.addEventListener("touchstart",d,Wo),function(){Ho=Ho.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Wo),document.removeEventListener("touchmove",l,Wo),document.removeEventListener("touchstart",d,Wo)}},[]);var p=e.removeScrollBar,y=e.inert;return m.createElement(m.Fragment,null,y?m.createElement(i,{styles:J7(s)}):null,p?m.createElement(B7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tq=R7(yA,Z7);var T0=m.forwardRef(function(e,t){return m.createElement(sp,$r({},e,{ref:t,sideCar:tq}))});T0.classNames=sp.classNames;var nq=[" ","Enter","ArrowUp","ArrowDown"],rq=[" ","Enter"],_o="Select",[ip,op,sq]=ox(_o),[gl,BG]=br(_o,[sq,Tf]),ap=Tf(),[iq,Ri]=gl(_o),[oq,aq]=gl(_o),SA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:h,disabled:f,required:p,form:y}=e,g=ap(t),[b,x]=m.useState(null),[v,w]=m.useState(null),[S,k]=m.useState(!1),_=tp(u),[E,C]=xo({prop:r,defaultProp:s??!1,onChange:i,caller:_o}),[N,R]=xo({prop:o,defaultProp:a,onChange:l,caller:_o}),$=m.useRef(null),D=b?y||!!b.closest("form"):!0,[U,F]=m.useState(new Set),J=Array.from(U).map(V=>V.props.value).join(";");return c.jsx(B4,{...g,children:c.jsxs(iq,{required:p,scope:t,trigger:b,onTriggerChange:x,valueNode:v,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:uo(),value:N,onValueChange:R,open:E,onOpenChange:C,dir:_,triggerPointerDownPosRef:$,disabled:f,children:[c.jsx(ip.Provider,{scope:t,children:c.jsx(oq,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(V=>{F(ne=>new Set(ne).add(V))},[]),onNativeOptionRemove:m.useCallback(V=>{F(ne=>{const P=new Set(ne);return P.delete(V),P})},[]),children:n})}),D?c.jsxs(qA,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:h,value:N,onChange:V=>R(V.target.value),disabled:f,form:y,children:[N===void 0?c.jsx("option",{value:""}):null,Array.from(U)]},J):null]})})};SA.displayName=_o;var kA="SelectTrigger",_A=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=ap(n),o=Ri(kA,n),a=o.disabled||r,l=be(t,o.onTriggerChange),u=op(n),d=m.useRef("touch"),[h,f,p]=GA(g=>{const b=u().filter(w=>!w.disabled),x=b.find(w=>w.value===o.value),v=YA(b,g,x);v!==void 0&&o.onValueChange(v.value)}),y=g=>{a||(o.onOpenChange(!0),p()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return c.jsx(bC,{asChild:!0,...i,children:c.jsx(fe.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":KA(o.value)?"":void 0,...s,ref:l,onClick:le(s.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&y(g)}),onPointerDown:le(s.onPointerDown,g=>{d.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:le(s.onKeyDown,g=>{const b=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(b&&g.key===" ")&&nq.includes(g.key)&&(y(),g.preventDefault())})})})});_A.displayName=kA;var EA="SelectValue",TA=m.forwardRef((e,t)=>
vendor: 15,564 bytes, line 349
349{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,l=Ri(EA,n),{onValueNodeHasChildrenChange:u}=l,d=i!==void 0,h=be(t,l.onValueNodeChange);return At(()=>{u(d)},[u,d]),c.jsx(fe.span,{...a,ref:h,style:{pointerEvents:"none"},children:KA(l.value)?c.jsx(c.Fragment,{children:o}):i})});TA.displayName=EA;var lq="SelectIcon",CA=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return c.jsx(fe.span,{"aria-hidden":!0,...s,ref:t,children:r||"â¼"})});CA.displayName=lq;var cq="SelectPortal",jA=e=>c.jsx(xf,{asChild:!0,...e});jA.displayName=cq;var Eo="SelectContent",RA=m.forwardRef((e,t)=>{const n=Ri(Eo,e.__scopeSelect),[r,s]=m.useState();if(At(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Ao.createPortal(c.jsx(NA,{scope:e.__scopeSelect,children:c.jsx(ip.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(AA,{...e,ref:t})});RA.displayName=Eo;var sr=10,[NA,Ni]=gl(Eo),uq="SelectContentImpl",dq=Ka("SelectContent.RemoveScroll"),AA=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:y,hideWhenDetached:g,avoidCollisions:b,...x}=e,v=Ri(Eo,n),[w,S]=m.useState(null),[k,_]=m.useState(null),E=be(t,G=>S(G)),[C,N]=m.useState(null),[R,$]=m.useState(null),D=op(n),[U,F]=m.useState(!1),J=m.useRef(!1);m.useEffect(()=>{if(w)return pA(w)},[w]),dA();const V=m.useCallback(G=>{const[Ae,...We]=D().map(Te=>Te.ref.current),[Ee]=We.slice(-1),ke=document.activeElement;for(const Te of G)if(Te===ke||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===Ae&&k&&(k.scrollTop=0),Te===Ee&&k&&(k.scrollTop=k.scrollHeight),Te==null||Te.focus(),document.activeElement!==ke))return},[D,k]),ne=m.useCallback(()=>V([C,w]),[V,C,w]);m.useEffect(()=>{U&&ne()},[U,ne]);const{onOpenChange:P,triggerPointerDownPosRef:L}=v;m.useEffect(()=>{if(w){let G={x:0,y:0};const Ae=Ee=>{var ke,Te;G={x:Math.abs(Math.round(Ee.pageX)-(((ke=L.current)==null?void 0:ke.x)??0)),y:Math.abs(Math.round(Ee.pageY)-(((Te=L.current)==null?void 0:Te.y)??0))}},We=Ee=>{G.x<=10&&G.y<=10?Ee.preventDefault():w.contains(Ee.target)||P(!1),document.removeEventListener("pointermove",Ae),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",Ae),document.addEventListener("pointerup",We,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ae),document.removeEventListener("pointerup",We,{capture:!0})}}},[w,P,L]),m.useEffect(()=>{const G=()=>P(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[P]);const[W,ce]=GA(G=>{const Ae=D().filter(ke=>!ke.disabled),We=Ae.find(ke=>ke.ref.current===document.activeElement),Ee=YA(Ae,G,We);Ee&&setTimeout(()=>Ee.ref.current.focus())}),oe=m.useCallback((G,Ae,We)=>{const Ee=!J.current&&!We;(v.value!==void 0&&v.value===Ae||Ee)&&(N(G),Ee&&(J.current=!0))},[v.value]),me=m.useCallback(()=>w==null?void 0:w.focus(),[w]),pe=m.useCallback((G,Ae,We)=>{const Ee=!J.current&&!We;(v.value!==void 0&&v.value===Ae||Ee)&&$(G)},[v.value]),Ve=r==="popper"?sv:PA,Je=Ve===sv?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:y,hideWhenDetached:g,avoidCollisions:b}:{};return c.jsx(NA,{scope:n,content:w,viewport:k,onViewportChange:_,itemRefCallback:oe,selectedItem:C,onItemLeave:me,itemTextRefCallback:pe,focusSelectedItem:ne,selectedItemText:R,position:r,isPositioned:U,searchRef:W,children:c.jsx(T0,{as:dq,allowPinchZoom:!0,children:c.jsx(E0,{asChild:!0,trapped:v.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:le(s,G=>{var Ae;(Ae=v.trigger)==null||Ae.focus({preventScroll:!0}),G.preventDefault()}),children:c.jsx(ou,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(Ve,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:G=>G.preventDefault(),...x,...Je,onPlaced:()=>F(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:le(x.onKeyDown,G=>{const Ae=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!Ae&&G.key.length===1&&ce(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let Ee=D().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);if(["ArrowUp","End"].includes(G.key)&&(Ee=Ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const ke=G.target,Te=Ee.indexOf(ke);Ee=Ee.slice(Te+1)}setTimeout(()=>V(Ee)),G.preventDefault()}})})})})})})});AA.displayName=uq;var hq="SelectItemAlignedPosition",PA=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=Ri(Eo,n),o=Ni(Eo,n),[a,l]=m.useState(null),[u,d]=m.useState(null),h=be(t,E=>d(E)),f=op(n),p=m.useRef(!1),y=m.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:x,focusSelectedItem:v}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&g&&b&&x){const E=i.trigger.getBoundingClientRect(),C=u.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),R=x.getBoundingClientRect();if(i.dir!=="rtl"){const ke=R.left-C.left,Te=N.left-ke,Ct=E.left-Te,Kt=E.width+Ct,_r=Math.max(Kt,C.width),Er=window.innerWidth-sr,Yr=nv(Te,[sr,Math.max(sr,Er-_r)]);a.style.minWidth=Kt+"px",a.style.left=Yr+"px"}else{const ke=C.right-R.right,Te=window.innerWidth-N.right-ke,Ct=window.innerWidth-E.right-Te,Kt=E.width+Ct,_r=Math.max(Kt,C.width),Er=window.innerWidth-sr,Yr=nv(Te,[sr,Math.max(sr,Er-_r)]);a.style.minWidth=Kt+"px",a.style.right=Yr+"px"}const $=f(),D=window.innerHeight-sr*2,U=g.scrollHeight,F=window.getComputedStyle(u),J=parseInt(F.borderTopWidth,10),V=parseInt(F.paddingTop,10),ne=parseInt(F.borderBottomWidth,10),P=parseInt(F.paddingBottom,10),L=J+V+U+P+ne,W=Math.min(b.offsetHeight*5,L),ce=window.getComputedStyle(g),oe=parseInt(ce.paddingTop,10),me=parseInt(ce.paddingBottom,10),pe=E.top+E.height/2-sr,Ve=D-pe,Je=b.offsetHeight/2,G=b.offsetTop+Je,Ae=J+V+G,We=L-Ae;if(Ae<=pe){const ke=$.length>0&&b===$[$.length-1].ref.current;a.style.bottom="0px";const Te=u.clientHeight-g.offsetTop-g.offsetHeight,Ct=Math.max(Ve,Je+(ke?me:0)+Te+ne),Kt=Ae+Ct;a.style.height=Kt+"px"}else{const ke=$.length>0&&b===$[0].ref.current;a.style.top="0px";const Ct=Math.max(pe,J+g.offsetTop+(ke?oe:0)+Je)+We;a.style.height=Ct+"px",g.scrollTop=Ae-pe+g.offsetTop}a.style.margin=`${sr}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,a,u,g,b,x,i.dir,r]);At(()=>w(),[w]);const[S,k]=m.useState();At(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const _=m.useCallback(E=>{E&&y.current===!0&&(w(),v==null||v(),y.current=!1)},[w,v]);return c.jsx(pq,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:_,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(fe.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});PA.displayName=hq;var fq="SelectPopperPosition",sv=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=sr,...i}=e,o=ap(n);return c.jsx(SC,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});sv.displayName=fq;var[pq,C0]=gl(Eo,{}),iv="SelectViewport",OA=m.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=Ni(iv,n),o=C0(iv,n),a=be(t,i.onViewportChange),l=m.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(ip.Slot,{scope:n,children:c.jsx(fe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:le(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&h){const p=Math.abs(l.current-d.scrollTop);if(p>0){const y=window.innerHeight-sr*2,g=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),x=Math.max(g,b);if(x<y){const v=x+p,w=Math.min(y,v),S=v-w;h.style.height=w+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});OA.displayName=iv;var IA="SelectGroup",[mq,gq]=gl(IA),yq=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=uo();return c.jsx(mq,{scope:n,id:s,children:c.jsx(fe.div,{role:"group","aria-labelledby":s,...r,ref:t})})});yq.displayName=IA;var DA="SelectLabel",LA=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=gq(DA,n);return c.jsx(fe.div,{id:s.id,...r,ref:t})});LA.displayName=DA;var Gh="SelectItem",[vq,MA]=gl(Gh),FA=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=Ri(Gh,n),l=Ni(Gh,n),u=a.value===r,[d,h]=m.useState(i??""),[f,p]=m.useState(!1),y=be(t,v=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,v,r,s)}),g=uo(),b=m.useRef("touch"),x=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(vq,{scope:n,value:r,disabled:s,textId:g,isSelected:u,onItemTextChange:m.useCallback(v=>{h(w=>w||((v==null?void 0:v.textContent)??"").trim())},[]),children:c.jsx(ip.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:c.jsx(fe.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:y,onFocus:le(o.onFocus,()=>p(!0)),onBlur:le(o.onBlur,()=>p(!1)),onClick:le(o.onClick,()=>{b.current!=="mouse"&&x()}),onPointerUp:le(o.onPointerUp,()=>{b.current==="mouse"&&x()}),onPointerDown:le(o.onPointerDown,v=>{b.current=v.pointerType}),onPointerMove:le(o.onPointerMove,v=>{var w;b.current=v.pointerType,s?(w=l.onItemLeave)==null||w.call(l):b.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(o.onPointerLeave,v=>{var w;v.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:le(o.onKeyDown,v=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&v.key===" "||(rq.includes(v.key)&&x(),v.key===" "&&v.preventDefault())})})})})});FA.displayName=Gh;var Hl="SelectItemText",$A=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=Ri(Hl,n),a=Ni(Hl,n),l=MA(Hl,n),u=aq(Hl,n),[d,h]=m.useState(null),f=be(t,x=>h(x),l.onItemTextChange,x=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,x,l.value,l.disabled)}),p=d==null?void 0:d.textContent,y=m.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=u;return At(()=>(g(y),()=>b(y)),[g,b,y]),c.jsxs(c.Fragment,{children:[c.jsx(fe.span,{id:l.textId,...i,ref:f}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ao.createPortal(i.children,o.valueNode):null]})});$A.displayName=Hl;var VA="SelectItemIndicator",UA=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return MA(VA,n).isSelected?c.jsx(fe.span,{"aria-hidden":!0,...r,ref:t}):null});UA.displayName=VA;var ov="SelectScrollUpButton",BA=m.forwardRef((e,t)=>{const n=Ni(ov,e.__scopeSelect),r=C0(ov,e.__scopeSelect),[s,i]=m.useState(!1),o=be(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?c.jsx(WA,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});BA.displayName=ov;var av="SelectScrollDownButton",zA=m.forwardRef((e,t)=>{const n=Ni(av,e.__scopeSelect),r=C0(av,e.__scopeSelect),[s,i]=m.useState(!1),o=be(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;i(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?c.jsx(WA,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});zA.displayName=av;var WA=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=Ni("SelectScrollButton",n),o=m.useRef(null),a=op(n),l=m.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return m.useEffect(()=>()=>l(),[l]),At(()=>{var d;const u=a().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(fe.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:le(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:le(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:le(s.onPointerLeave,()=>{l()})})}),xq="SelectSeparator",HA=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(fe.div,{"aria-hidden":!0,...r,ref:t})});HA.displayName=xq;var lv="SelectArrow",wq=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ap(n),i=Ri(lv,n),o=Ni(lv,n);return i.open&&o.position==="popper"?c.jsx(kC,{...s,...r,ref:t}):null});wq.displayName=lv;var bq="SelectBubbleInput",qA=m.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=m.useRef(null),i=be(r,s),o=b0(t);return m.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const h=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(h)}},[o,t]),c.jsx(fe.select,{...n,style:{...xT,...n.style},ref:i,defaultValue:t})});qA.displayName=bq;function KA(e){return e===""||e===void 0}function GA(e){const t=Et(e),n=m.useRef(""),r=m.useRef(0),s=m.useCallback(o=>{const a=n.current+o;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function YA(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=Sq(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function Sq(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kq=SA,XA=_A,_q=TA,Eq=CA,Tq=jA,JA=RA,Cq=OA,QA=LA,ZA=FA,jq=$A,Rq=UA,eP=BA,tP=zA,nP=HA;const hd=kq,fd=_q,ql=m.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(XA,{ref:r,className:ue("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
349ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsx(Eq,{asChild:!0,children:c.jsx(ux,{className:"h-4 w-4 opacity-50"})})]}));ql.displayName=XA.displayName;const rP=m.forwardRef(({className:e,...t},n)=>c.jsx(eP,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(iL,{className:"h-4 w-4"})}));rP.displayName=eP.displayName;const sP=m.forwardRef(({className:e,...t},n)=>c.jsx(tP,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(ux,{className:"h-4 w-4"})}));sP.displayName=tP.displayName;const Kl=m.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>c.jsx(Tq,{children:c.jsxs(JA,{ref:s,className:ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsx(rP,{}),c.jsx(Cq,{className:ue("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(sP,{})]})}));Kl.displayName=JA.displayName;const Nq=m.forwardRef(({className:e,...t},n)=>c.jsx(QA,{ref:n,className:ue("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Nq.displayName=QA.displayName;const Is=m.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(ZA,{ref:r,className:ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Rq,{children:c.jsx(BT,{className:"h-4 w-4"})})}),c.jsx(jq,{children:t})]}));Is.displayName=ZA.displayName;const Aq=m.forwardRef(({className:e,...t},n)=>c.jsx(nP,{ref:n,className:ue("-mx-1 my-1 h-px bg-muted",e),...t}));Aq.displayName=nP.displayName;const Pq="6Lfhl18sAAAAAKbzY-T-I5Cfjiaw8p_VdlXrggTM",Oq=!0;function Iq(){return"https://ussdotrdzglbfisttrmp.supabase.co"}function Dq(){return"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVzc2RvdHJkemdsYmZpc3R0cm1wIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzAyMDE5NTksImV4cCI6MjA4NTc3Nzk1OX0.sSb88SZEARSS4h0ngAdJ2l4tWMIRa53gf-2r_TkjLtM"}function Lq(){const e=Iq(),t=Dq();return xj(e,t,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}})}const Mq=["Cape-Karoo-Coast Expedition 2026","Lesotho","Baviaanskloof","Swartberg Mountains & Gamkaskloof","Swaziland","Cape Town Winelands","Foot Of Africa","Cederberg Tankwa Karoo Area","Garden Route"],Tk=["Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo","Costa Rica","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Ivory Coast","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","North Korea","North Macedonia","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines","S
349amoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"],Fq=n9({website:yn().max(0,"Invalid submission").optional(),fullName:yn().trim().min(1,"Full name is required").max(100),dateOfBirth:yn().min(1,"Date of birth is required"),nationality:yn().trim().min(1,"Nationality is required").max(100),residentialAddress:yn().trim().min(1,"Residential address is required").max(500),countryOfResidence:yn().trim().min(1,"Country of residence is required").max(100),email:yn().trim().email("Invalid email address").max(255),phone:yn().trim().min(1,"Phone number is required").max(30),tourName:yn().trim().min(1,"Tour name is required").max(200),bikeOption:km(["own","rental"],{required_error:"Please select a bike option"}),hasPillion:km(["yes","no"],{required_error:"Please indicate if you have a passenger"}),yearsExperience:yn().trim().min(1,"Years of experience is required").max(10),offRoadExperience:km(["none","limited","moderate","extensive"],{required_error:"Please select your off-road experience level"}),agreeTerms:Sm(!0,{errorMap:()=>({message:"You must agree to the Terms & Conditions"})}),agreeLiability:Sm(!0,{errorMap:()=>({message:"You must accept the liability waiver"})}),agreePrivacy:Sm(!0,{errorMap:()=>({message:"You must consent to data processing"})}),declarationName:yn().trim().min(1,"Full name is required for declaration").max(100),declarationDate:yn().min(1,"Date is required"),electronicSignature:yn().trim().min(1,"Electronic signature is required").max(100)}),$q=()=>{const e=du(),[t,n]=m.useState(!1),[r,s]=m.useState(null),i=m.useRef(null);m.useEffect(()=>{window.scrollTo(0,0)},[]);const o=EH({resolver:RH(Fq),mode:"onChange",defaultValues:{website:"",fullName:"",dateOfBirth:"",nationality:"",residentialAddress:"",countryOfResidence:"",email:"",phone:"",tourName:"Cape-Karoo-Coast Expedition 2026",yearsExperience:"",agreeTerms:!1,agreeLiability:!1,agreePrivacy:!1,declarationName:"",declarationDate:new Date().toISOString().split("T")[0],electronicSignature:""}}),a=async h=>{if(!r){zu.error("Please complete the CAPTCHA verification");return}n(!0),console.log("Booking form submitted");try{const f=Lq(),{data:p,error:y}=await f.functions.invoke("submit-booking",{body:{...h,captchaToken:r}});if(y)throw console.error("Submission error:",y),new Error(y.message||"Failed to submit booking");console.log("Booking response:",p),p!=null&&p.success&&!(p!=null&&p.emailSent)?zu.success("Booking submitted successfully! Our team will c
349ontact you directly with confirmation details."):zu.success("Booking submitted successfully! Check your email for confirmation."),o.reset(),s(null),Promise.resolve().then(()=>{var g;return(g=i.current)==null?void 0:g.reset()}).catch(()=>{}),sessionStorage.removeItem("bookingFormData"),e("/expeditions")}catch(f){console.error(f),zu.error("Failed to submit booking form. Please try again."),s(null),Promise.resolve().then(()=>{var p;return(p=i.current)==null?void 0:p.reset()}).catch(()=>{})}finally{n(!1)}},l=h=>{const f=Object.keys(h)[0];f&&setTimeout(()=>{const p=document.querySelector(`[name="${f}"]`)||document.querySelector('[aria-invalid="true"]');p&&p.scrollIntoView({behavior:"smooth",block:"center"})},0)},u=h=>{s(h)},d="w-full px-4 py-3 bg-muted/50 border border-border rounded-lg focus:outline-none focus:border-primary transition-colors";return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Book a Motorcycle Expedition | iRide Adventures",description:"Reserve your place on a guided iRide Adventures motorcycle expedition. Complete the booking form to secure your spot.",path:"/booking"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[40vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${aN})`},children:c.jsx("div",{className:"absolute inset-0 bg-background/85"})}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"SECURE YOUR ADVENTURE"}),c.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mt-4 mb-6 leading-tight",children:["EXPEDITION ",c.jsx("span",{className:"text-gradient",children:"BOOKING"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Complete this form to book your adventure expedition. Please ensure all information is accurate."})]})})]}),c.jsx("section",{className:"py-10 md:py-16",children:c.jsx("div",{className:"container mx-auto px-6",children:c.jsx("div",{className:"max-w-4xl mx-auto",children:c.jsx(l7,{...o,children:c.jsxs("form",{onSubmit:o.handleSubmit(a,l),className:"space-y-12",children:[c.jsx("div",{"aria-hidden":"true",style:{position:"absolute",left:"-9999px",top:"-9999px",height:0,width:0,overflow:"hidden"},children:c.jsx(wt,{control:o.control,name:"website",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Website"}),c.jsx(mt,{children:c.jsx(On,{...h,tabIndex:-1,autoComplete:"off",placeholder:"Leave this field empty"})})]})})}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"border-b border-border pb-4",children:c.jsxs("h2",{className:"font-display text-2xl text-foreground",children:["1. ",c.jsx("span",{className:"text-gradient",children:"Rider Details"})]})}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(wt,{control:o.control,name:"fullName",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Full Name (as per passport) *"}),c.jsx(mt,{children:c.jsx(On,{className:d,placeholder:"James Wilson",...h})}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"dateOfBirth",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Date of Birth *"}),c.jsx(mt,{children:c.jsx(On,{type:"date",className:d,...h})}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"nationality",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Nationality *"}),c.jsxs(hd,{onValueChange:h.onChange,defaultValue:h.value,children:[c.jsx(mt,{children:c.jsx(ql,{className:d,children:c.jsx(fd,{placeholder:"Select nationality"})})}),c.jsx(Kl,{className:"bg-background border border-border z-50 max-h-[300px]",children:Tk.map(f=>c.jsx(Is,{value:f,children:f},f))})]}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"countryOfResidence",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Country of Residence *"}),c.jsxs(hd,{onValueChange:h.onChange,defaultValue:h.value,children:[c.jsx(mt,{children:c.jsx(ql,{className:d,children:c.jsx(fd,{placeholder:"Select country"})})}),c.jsx(Kl,{className:"bg-background border border-border z-50 max-h-[300px]",children:Tk.map(f=>c.jsx(Is,{value:f,children:f},f))})]}),c.jsx(bt,{})]})})]}),c.jsx(wt,{control:o.control,name:"residentialAddress",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Residential Address *"}),c.jsx(mt,{children:c.jsx(ON,{className:`${d} resize-none`,placeholder:"10 Downing Street, London, SW1A 2AA",rows:3,...h})}),c.jsx(bt,{})]})}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(wt,{control:o.control,name:"email",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Email Address *"}),c.jsx(mt,{children:c.jsx(On,{type:"email",className:d,placeholder:"[email protected]",...h})}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"phone",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Mobile / WhatsApp Number *"}),c.jsx(mt,{children:c.jsx(On,{type:"tel",className:d,placeholder:"+44 7700 900123",...h})}),c.jsx(bt,{})]})})]})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"border-b border-border pb-4",children:c.jsxs("h2",{className:"font-display text-2xl text-foreground",children:["2. ",c.jsx("span",{className:"text-gradient",children:"Tour Selection"})]})}),c.jsx(wt,{control:o.control,name:"tourName",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Expedition Interest *"}),c.jsxs(hd,{onValueChange:h.onChange,defaultValue:h.value,disabled:!0,children:[c.jsx(mt,{children:c.jsx(ql,{className:`${d} disabled:opacity-70 disabled:cursor-not-allowed`,children:c.jsx(fd,{placeholder:"Select an expedition"})})}),c.jsx(Kl,{className:"bg-background border border-border z-50 max-h-[300px]",children:Mq.map(f=>c.jsx(Is,{value:f,children:f},f))})]}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"bikeOption",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Preferred Bike Option *"}),c.jsx(mt,{children:c.jsxs(tv,{onValueChange:h.onChange,defaultValue:h.value,className:"flex flex-col space-y-3 mt-2",children:[c.jsxs("div",{className:"flex items-center space-x-3",children:[c.jsx(Wl,{value:"own",id:"bike-own"}
349),c.jsx("label",{htmlFor:"bike-own",className:"text-foreground cursor-pointer",children:"Own Motorcycle (not for international riders outside RSA)"})]}),c.jsxs("div",{className:"flex items-center space-x-3",children:[c.jsx(Wl,{value:"rental",id:"bike-rental"}),c.jsx("label",{htmlFor:"bike-rental",className:"text-foreground cursor-pointer",children:"Rental Motorcycle (subject to availability)"})]})]})}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"hasPillion",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Passenger (Pillion)? *"}),c.jsx(mt,{children:c.jsxs(tv,{onValueChange:h.onChange,defaultValue:h.value,className:"flex space-x-6 mt-2",children:[c.jsxs("div",{className:"flex items-center space-x-3",children:[c.jsx(Wl,{value:"no",id:"pillion-no"}),c.jsx("label",{htmlFor:"pillion-no",className:"text-foreground cursor-pointer",children:"No"})]}),c.jsxs("div",{className:"flex items-center space-x-3",children:[c.jsx(Wl,{value:"yes",id:"pillion-yes"}),c.jsx("label",{htmlFor:"pillion-yes",className:"text-foreground cursor-pointer",children:"Yes (additional details required)"})]})]})}),c.jsx(bt,{})]})})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"border-b border-border pb-4",children:c.jsxs("h2",{className:"font-display text-2xl text-foreground",children:["3. ",c.jsx("span",{className:"text-gradient",children:"Riding Experience"})]})}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(wt,{control:o.control,name:"yearsExperience",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Years of Motorcycle Riding Experience *"}),c.jsx(mt,{children:c.jsx(On,{className:d,placeholder:"e.g., 5",...h})}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"offRoadExperience",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Adventure / Off-Road Experience *"}),c.jsxs(hd,{onValueChange:h.onChange,defaultValue:h.value,children:[c.jsx(mt,{children:c.jsx(ql,{className:d,children:c.jsx(fd,{placeholder:"Select experience level"})})}),c.jsxs(Kl,{children:[c.jsx(Is,{value:"none",children:"None"}),c.jsx(Is,{value:"limited",children:"Limited"}),c.jsx(Is,{value:"moderate",children:"Moderate"}),c.jsx(Is,{value:"extensive",children:"Extensive"})]})]}),c.jsx(bt,{})]})})]})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"border-b border-border pb-4",children:c.jsxs("h2",{className:"font-display text-2xl text-foreground",children:["4. ",c.jsx("span",{className:"text-gradient",children:"Terms & Conditions Acknowledgement"})]})}),c.jsxs("div",{className:"bg-muted/30 border border-border rounded-lg p-6 space-y-4",children:[c.jsx("p",{className:"text-muted-foreground text-sm",children:"By submitting this booking form, I confirm that:"}),c.jsxs("ul",{className:"text-muted-foreground text-sm space-y-2 list-disc pl-6",children:[c.jsxs("li",{children:["I have read, understood, and agree to the"," ",c.jsx(Ko,{to:"/terms-and-conditions",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Terms & Conditions"})," ","of participation."]}),c.jsx("li",{children:"I understand that adventure motorcycle expeditions involve inherent risks, including injury, illness, accident, or loss."}),c.jsx("li",{children:"I accept that I participate entirely at my own risk."}),c.jsx("li",{children:"I confirm that I hold a valid motorcycle licence and appropriate insurance."}),c.jsx("li",{children:"I understand that the tour operator is registered in South Africa, and South African law will apply unless otherwise stated."}),c.jsx("li",{children:"I understand that marketing and bookings may be conducted internationally, including within the United Kingdom."})]}),c.jsx(wt,{control:o.control,name:"agreeTerms",render:({field:h})=>c.jsxs(ft,{className:"flex items-start space-x-3 pt-4",children:[c.jsx(mt,{children:c.jsx(Bd,{className:"mt-0.5",checked:h.value,onCheckedChange:h.onChange})}),c.jsxs("div",{className:"space-y-1 leading-none",children:[c.jsxs(pt,{className:"cursor-pointer",children:["I agree to the"," ",c.jsx(Ko,{to:"/terms-and-conditions",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Terms & Conditions"})," ","and"," ",c.jsx(Ko,{to:"/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Privacy Policy"})," ","*"]}),c.jsx(bt,{})]})]})})]})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"border-b border-border pb-4",children:c.jsxs("h2",{className:"font-display text-2xl text-foreground",children:["5. ",c.jsx("span",{className:"text-gradient",children:"Liability Waiver & Assumption of Risk"})]})}),c.jsxs("div",{className:"bg-muted/30 border border-border rounded-lg p-6 space-y-4",children:[c.jsxs("p",{className:"text-muted-foreground text-sm",children:["I acknowledge that adventure motorcycling is a hazardous activity. I voluntarily assume all risks associated with participation in the tour and release the tour operator, its directors, employees, guides, agents, and partners from liability to the fullest extent permitted by law. Please read our full"," ",c.jsx(Ko,{to:"/liability-waiver",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Liability Waiver"})," ","for complete details."]}),c.jsx(wt,{control:o.control,name:"agreeLiability",render:({field:h})=>c.jsxs(ft,{className:"flex items-start space-x-3 pt-4",children:[c.jsx(mt,{children:c.jsx(Bd,{className:"mt-0.5",checked:h.value,onCheckedChange:h.onChange})}),c.jsxs("div",{className:"space-y-1 leading-none",children:[c.jsx(pt,{className:"cursor-pointer",children:"I confirm and accept the liability waiver *"}),c.jsx(bt,{})]})]})})]})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"border-b border-border pb-4",children:c.jsxs("h2",{className:"font-display text-2xl text-foreground",children:["6. ",c.jsx("span",{className:"text-gradient",children:"Privacy & Data Protection"})]})}),c.jsxs("div",{className:"bg-muted/30 border border-border rounded-lg p-6 space-y-4",children:[c.jsxs("p",{className:"text-muted-foreground text-sm",children:["I consent to the collection, storage, and processing of my personal data for the purpose of administering my booking, in accordance with the company's"," ",c.jsx(Ko,{to:"/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Privacy Policy"}),", the South African POPIA, and, where applicable, the UK GDPR."]}),c.jsx(wt,{control:o.control,name:"agreePrivacy",render:({field:h})=>c.jsxs(ft,{className:"flex items-start space-x-3 pt-4",children:[c.jsx(mt,{children:c.jsx(Bd,{className:"mt-0.5",checked:h.value,onCheckedChange:h.onChange})}),c.jsxs("div",{className:"space-y-1 leading-none",children:[c.jsx(pt,{className:"cursor-pointer",children:"I consent to data processing as de
349scribed *"}),c.jsx(bt,{})]})]})})]})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"border-b border-border pb-4",children:c.jsxs("h2",{className:"font-display text-2xl text-foreground",children:["7. ",c.jsx("span",{className:"text-gradient",children:"Declaration & Submission"})]})}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[c.jsx(wt,{control:o.control,name:"declarationName",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Full Name *"}),c.jsx(mt,{children:c.jsx(On,{className:d,placeholder:"Your full name",...h})}),c.jsx(bt,{})]})}),c.jsx(wt,{control:o.control,name:"declarationDate",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Date *"}),c.jsx(mt,{children:c.jsx(On,{type:"date",className:d,...h})}),c.jsx(bt,{})]})})]}),c.jsx(wt,{control:o.control,name:"electronicSignature",render:({field:h})=>c.jsxs(ft,{children:[c.jsx(pt,{children:"Electronic Signature / Typed Name *"}),c.jsx(mt,{children:c.jsx(On,{className:d,placeholder:"Type your full name as signature",...h})}),c.jsx(bt,{})]})}),c.jsx("div",{className:"flex justify-center",children:c.jsx(P9,{ref:i,sitekey:Pq,onChange:u,theme:"dark"})}),c.jsx(et,{type:"submit",variant:"hero",size:"lg",className:"w-full disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground",disabled:t||!r||!Oq,children:t?"SUBMITTING...":"SUBMIT BOOKING"})]})]})})})})}),c.jsx(qn,{})]})},Vq=[{number:"1",title:"Acknowledgement of Risk",content:"I acknowledge that adventure motorcycle expeditions involve significant risks, including but not limited to accidents, injury, illness, permanent disability, or death, as well as damage to property."},{number:"2",title:"Assumption of Risk",content:"I voluntarily assume all risks associated with participation, whether foreseen or unforeseen, and accept full responsibility for my actions."},{number:"3",title:"Release of Liability",content:"To the fullest extent permitted by law, I release and hold harmless iRide Adventure (further referred to as the Company), its directors, employees, guides, contractors, and agents from any claims, liabilities, or damages arising from my participation."},{number:"4",title:"Indemnity",content:"I agree to indemnify and defend the Company against any claims brought by third parties arising from my actions during the tour."},{number:"5",title:"Medical Treatment",content:"I authorise the Company to arrange emergency medical treatment on my behalf if required. I accept responsibility for all associated costs. I confirm that I have my own personal comprehensive travel insurance covering adventure motorcycling, medical evacuation, and repatriation."},{number:"6",title:"Fitness to Participate",content:"I confirm that I am physically and mentally fit, competent to ride a motorcycle in challenging conditions, and not under the influence of drugs or alcohol."},{number:"7",title:"Binding Agreement",content:"I confirm that I have read and understood this waiver and that it is binding upon me, my heirs, executors, and assigns."}],Uq=({section:e})=>c.jsx("div",{className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/50 transition-colors duration-300",children:c.jsx("div",{className:"p-6 md:p-8",children:c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsxs("span",{className:"font-display text-4xl text-primary",children:[e.number,"."]}),c.jsxs("div",{className:"flex-1",children:[c.jsx("h3",{className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:e.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm md:text-base",children:e.content})]})]})})}),Bq=()=>c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx(Rn,{title:"Liability Waiver | iRide Adventures",description:"Review the iRide Adventures liability waiver required for all motorcycle training courses and guided expeditions.",path:"/liability-waiver"}),c.jsx(Hn,{}),c.jsxs("section",{className:"relative min-h-[50vh] flex items-center pt-20",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/10 via-background to-background"}),c.jsx("div",{className:"container mx-auto px-6 relative z-10",children:c.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"IRIDE ADVENTURE"}),c.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-7xl text-foreground mt-4 mb-6 leading-tight",children:["LIABILITY ",c.jsx("span",{className:"text-gradient",children:"WAIVER"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed max-w-3xl mx-auto",children:"Training & Expeditions - Assumption of Risk. Please read this waiver carefully before participating in any adventure motorcycle expedition."})]})})]}),c.jsx("section",{className:"py-20 md:py-32",children:c.jsxs("div",{className:"container mx-auto px-6",children:[c.jsxs("div",{className:"text-center mb-16",children:[c.jsx("span",{className:"text-primary text-sm font-medium tracking-widest",children:"YOUR ACKNOWLEDGEMENT"}),c.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground mt-4 mb-6",children:["ASSUMPTION OF ",c.jsx("span",{className:"text-gradient",children:"RISK"})]}),c.jsx("div",{className:"section-divider mx-auto mb-8"}),c.jsx("p",{className:"text-muted-foreground text-lg max-w-3xl mx-auto",children:"By participating in our expeditions, you acknowledge and accept the inherent risks associated with adventure motorcycling."})]}),c.jsx("div",{className:"grid gap-6 max-w-4xl mx-auto",children:Vq.map(e=>c.jsx(Uq,{section:e},e.number))})]})}),c.jsx(qn,{})]}),Yh=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ue("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
349Yh.displayName="Card";const j0=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ue("flex flex-col space-y-1.5 p-6",e),...t}));j0.displayName="CardHeader";const R0=m.forwardRef(({className:e,...t},n)=>c.jsx("h3",{ref:n,className:ue("text-2xl font-semibold leading-none tracking-tight",e),...t}));R0.displayName="CardTitle";const N0=m.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));N0.displayName="CardDescription";const Xh=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ue("p-6 pt-0",e),...t}));Xh.displayName="CardContent";const zq=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ue("flex items-center p-6 pt-0",e),...t}));zq.displayName="CardFooter";const Wq=lu("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),iP=m.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("div",{ref:r,role:"alert",className:ue(Wq({variant:t}),e),...n}));iP.displayName="Alert";const Hq=m.forwardRef(({className:e,...t},n)=>c.jsx("h5",{ref:n,className:ue("mb-1 font-medium leading-none tracking-tight",e),...t}));Hq.displayName="AlertTitle";const oP=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:ue("text-sm [&_p]:leading-relaxed",e),...t}));oP.displayName="AlertDescription";const qq=()=>{const[e,t]=m.useState(""),[n,r]=m.useState(""),[s,i]=m.useState(""),[o,a]=m.useState(!1),{signIn:l,user:u,isAdmin:d,isLoading:h}=Px(),f=du();m.useEffect(()=>{!h&&u&&d&&f("/admin")},[u,d,h,f]);const p=async y=>{y.preventDefault(),i(""),a(!0);try{const{error:g}=await l(e,n);if(g){i(g.message),a(!1);return}}catch{i("An unexpected error occurred. Please try again."),a(!1)}};return h?c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:c.jsx(mh,{className:"h-8 w-8 animate-spin text-primary"})}):c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:c.jsxs(Yh,{className:"w-full max-w-md",children:[c.jsxs(j0,{className:"space-y-4 text-center",children:[c.jsx("div",{className:"flex justify-center",children:c.jsx("div",{className:"bg-primary p-4 rounded-lg",children:c.jsx("img",{src:Vf,alt:"IRIDE",className:"h-8 w-auto"})})}),c.jsxs("div",{children:[c.jsx(R0,{className:"text-2xl font-bold",children:"Admin Login"}),c.jsx(N0,{children:"Sign in to access the admin dashboard"})]})]}),c.jsx(Xh,{children:c.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s&&c.jsx(iP,{variant:"destructive",children:c.jsx(oP,{children:s})}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Kh,{htmlFor:"email",children:"Email"}),c.jsx(On,{id:"email",type:"email",placeholder:"[email protected]",value:e,onChange:y=>t(y.target.value),required:!0,disabled:o})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(Kh,{htmlFor:"password",children:"Password"}),c.jsx(On,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:n,onChange:y=>r(y.target.value),required:!0,disabled:o})]}),c.jsx(et,{type:"submit",className:"w-full",disabled:o,children:o?c.jsxs(c.Fragment,{children:[c.jsx(mh,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing in..."]}):c.jsxs(c.Fragment,{children:[c.jsx(fL,{className:"mr-2 h-4 w-4"}),"Sign In"]})})]})})]})})},aP=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:n,className:ue("w-full caption-bottom text-sm",e),...t})}));aP.displayName="Table";const lP=m.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:ue("[&_tr]:border-b",e),...t}));lP.displayName="TableHeader";const cP=m.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:ue("[&_tr:last-child]:border-0",e),...t}));cP.displayName="TableBody";const Kq=m.forwardRef(({className:e,...t},n)=>c.jsx("tfoot",{ref:n,className:ue("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Kq.displayName="TableFooter";const cv=m.forwardRef(({className:e,...t},n)=>c.jsx("tr",{ref:n,className:ue("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));cv.displayName="TableRow";const Ui=m.forwardRef(({className:e,...t},n)=>c.jsx("th",{ref:n,className:ue("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ui.displayName="TableHead";const Bi=m.forwardRef(({className:e,...t},n)=>c.jsx("td",{ref:n,className:ue("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Bi.displayName="TableCell";const Gq=m.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:ue("mt-4 text-sm text-muted-foreground",e),...t}));Gq.displayName="TableCaption";var lp="Dialog",[uP,zG]=br(lp),[Yq,Sr]=uP(lp),dP=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=m.useRef(null),l=m.useRef(null),[u,d]=xo({prop:r,defaultProp:s??!1,onChange:i,caller:lp});return c.jsx(Yq,{scope:t,triggerRef:a,contentRef:l,contentId:uo(),titleId:uo(),descriptionId:uo(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};dP.displayName=lp;var hP="DialogTrigger",Xq=m.forwardRef((e,t)=>
vendor: 5,512 bytes, lines 349-353
349{const{__scopeDialog:n,...r}=e,s=Sr(hP,n),i=be(t,s.triggerRef);return c.jsx(fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":O0(s.open),...r,ref:i,onClick:le(e.onClick,s.onOpenToggle)})});Xq.displayName=hP;var A0="DialogPortal",[Jq,fP]=uP(A0,{forceMount:void 0}),pP=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=Sr(A0,t);return c.jsx(Jq,{scope:t,forceMount:n,children:m.Children.map(r,o=>c.jsx(Wn,{present:n||i.open,children:c.jsx(xf,{asChild:!0,container:s,children:o})}))})};pP.displayName=A0;var Jh="DialogOverlay",mP=m.forwardRef((e,t)=>{const n=fP(Jh,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Sr(Jh,e.__scopeDialog);return i.modal?c.jsx(Wn,{present:r||i.open,children:c.jsx(Zq,{...s,ref:t})}):null});mP.displayName=Jh;var Qq=Ka("DialogOverlay.RemoveScroll"),Zq=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Sr(Jh,n);return c.jsx(T0,{as:Qq,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(fe.div,{"data-state":O0(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),To="DialogContent",gP=m.forwardRef((e,t)=>{const n=fP(To,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Sr(To,e.__scopeDialog);return c.jsx(Wn,{present:r||i.open,children:i.modal?c.jsx(eK,{...s,ref:t}):c.jsx(tK,{...s,ref:t})})});gP.displayName=To;var eK=m.forwardRef((e,t)=>{const n=Sr(To,e.__scopeDialog),r=m.useRef(null),s=be(t,n.contentRef,r);return m.useEffect(()=>{const i=r.current;if(i)return pA(i)},[]),c.jsx(yP,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:le(e.onFocusOutside,i=>i.preventDefault())})}),tK=m.forwardRef((e,t)=>{const n=Sr(To,e.__scopeDialog),r=m.useRef(!1),s=m.useRef(!1);return c.jsx(yP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),yP=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Sr(To,n),l=m.useRef(null),u=be(t,l);return dA(),c.jsxs(c.Fragment,{children:[c.jsx(E0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(ou,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":O0(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(nK,{titleId:a.titleId}),c.jsx(sK,{contentRef:l,descriptionId:a.descriptionId})]})]})}),P0="DialogTitle",vP=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Sr(P0,n);return c.jsx(fe.h2,{id:s.titleId,...r,ref:t})});vP.displayName=P0;var xP="DialogDescription",wP=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Sr(xP,n);return c.jsx(fe.p,{id:s.descriptionId,...r,ref:t})});wP.displayName=xP;var bP="DialogClose",SP=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Sr(bP,n);return c.jsx(fe.button,{type:"button",...r,ref:t,onClick:le(e.onClick,()=>s.onOpenChange(!1))})});SP.displayName=bP;function O0(e){return e?"open":"closed"}var kP="DialogTitleWarning",[WG,_P]=dD(kP,{contentName:To,titleName:P0,docsSlug:"dialog"}),nK=({titleId:e})=>{const t=_P(kP),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 350 351If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 352 353For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},rK="DialogDescriptionWarning",sK=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_P(rK).contentName}}.`;return m.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},iK=dP,oK=pP,EP=mP,TP=gP,CP=vP,jP=wP,aK=SP;const lK=iK,cK=oK,RP=m.forwardRef(({className:e,...t},n)=>c.jsx(EP,{ref:n,className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));RP.displayName=EP.displayName;const NP=m.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(cK,{children:[c.jsx(RP,{}),c.jsxs(TP,{ref:r,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
353nded-lg",e),...n,children:[t,c.jsxs(aK,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Sf,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));NP.displayName=TP.displayName;const AP=({className:e,...t})=>c.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});AP.displayName="DialogHeader";const PP=m.forwardRef(({className:e,...t},n)=>c.jsx(CP,{ref:n,className:ue("text-lg font-semibold leading-none tracking-tight",e),...t}));PP.displayName=CP.displayName;const OP=m.forwardRef(({className:e,...t},n)=>c.jsx(jP,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));OP.displayName=jP.displayName;const uK=lu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ck({className:e,variant:t,...n}){return c.jsx("div",{className:ue(uK({variant:t}),e),...n})}function dK(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var I0="ScrollArea",[IP,HG]=br(I0),[hK,Gn]=IP(I0),DP=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=m.useState(null),[u,d]=m.useState(null),[h,f]=m.useState(null),[p,y]=m.useState(null),[g,b]=m.useState(null),[x,v]=m.useState(0),[w,S]=m.useState(0),[k,_]=m.useState(!1),[E,C]=m.useState(!1),N=be(t,$=>l($)),R=tp(s);return c.jsx(hK,{scope:n,type:r,dir:R,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:d,content:h,onContentChange:f,scrollbarX:p,onScrollbarXChange:y,scrollbarXEnabled:k,onScrollbarXEnabledChange:_,scrollbarY:g,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:C,onCornerWidthChange:v,onCornerHeightChange:S,children:c.jsx(fe.div,{dir:R,...o,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});DP.displayName=I0;var LP="ScrollAreaViewport",MP=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=e,o=Gn(LP,n),a=m.useRef(null),l=be(t,a,o.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),c.jsx(fe.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});MP.displayName=LP;var Gr="ScrollAreaScrollbar",D0=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Gn(Gr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return m.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?c.jsx(fK,{...r,ref:t,forceMount:n}):s.type==="scroll"?c.jsx(pK,{...r,ref:t,forceMount:n}):s.type==="auto"?c.jsx(FP,{...r,ref:t,forceMount:n}):s.type==="always"?c.jsx(L0,{...r,ref:t}):null});D0.displayName=Gr;var fK=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Gn(Gr,e.__scopeScrollArea),[i,o]=m.useState(!1);return m.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(Wn,{present:n||i,children:c.jsx(FP,{"data-state":i?"visible":"hidden",...r,ref:t})})}),pK=m.forwardRef((e,t)=>
vendor: 10,419 bytes, line 353
353{const{forceMount:n,...r}=e,s=Gn(Gr,e.__scopeScrollArea),i=e.orientation==="horizontal",o=up(()=>l("SCROLL_END"),100),[a,l]=dK("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return m.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),m.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let h=u[d];const f=()=>{const p=u[d];h!==p&&(l("SCROLL"),o()),h=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[s.viewport,i,l,o]),c.jsx(Wn,{present:n||a!=="hidden",children:c.jsx(L0,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:le(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:le(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),FP=m.forwardRef((e,t)=>{const n=Gn(Gr,e.__scopeScrollArea),{forceMount:r,...s}=e,[i,o]=m.useState(!1),a=e.orientation==="horizontal",l=up(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?u:d)}},10);return rl(n.viewport,l),rl(n.content,l),c.jsx(Wn,{present:r||i,children:c.jsx(L0,{"data-state":i?"visible":"hidden",...s,ref:t})})}),L0=m.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=Gn(Gr,e.__scopeScrollArea),i=m.useRef(null),o=m.useRef(0),[a,l]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=zP(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function h(f,p){return wK(f,o.current,a,p)}return n==="horizontal"?c.jsx(mK,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollLeft,p=jk(f,a,s.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollLeft=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollLeft=h(f,s.dir))}}):n==="vertical"?c.jsx(gK,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollTop,p=jk(f,a);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollTop=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollTop=h(f))}}):null}),mK=m.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=Gn(Gr,e.__scopeScrollArea),[o,a]=m.useState(),l=m.useRef(null),u=be(t,l,i.onScrollbarXChange);return m.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(VP,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":cp(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(i.viewport){const f=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),HP(f,h)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Zh(o.paddingLeft),paddingEnd:Zh(o.paddingRight)}})}})}),gK=m.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=Gn(Gr,e.__scopeScrollArea),[o,a]=m.useState(),l=m.useRef(null),u=be(t,l,i.onScrollbarYChange);return m.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(VP,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":cp(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(i.viewport){const f=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),HP(f,h)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Zh(o.paddingTop),paddingEnd:Zh(o.paddingBottom)}})}})}),[yK,$P]=IP(Gr),VP=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:h,...f}=e,p=Gn(Gr,n),[y,g]=m.useState(null),b=be(t,N=>g(N)),x=m.useRef(null),v=m.useRef(""),w=p.viewport,S=r.content-r.viewport,k=Et(d),_=Et(l),E=up(h,10);function C(N){if(x.current){const R=N.clientX-x.current.left,$=N.clientY-x.current.top;u({x:R,y:$})}}return m.useEffect(()=>{const N=R=>{const $=R.target;(y==null?void 0:y.contains($))&&k(R,S)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[w,y,S,k]),m.useEffect(_,[r,_]),rl(y,E),rl(p.content,E),c.jsx(yK,{scope:n,scrollbar:y,hasThumb:s,onThumbChange:Et(i),onThumbPointerUp:Et(o),onThumbPositionChange:_,onThumbPointerDown:Et(a),children:c.jsx(fe.div,{...f,ref:b,style:{position:"absolute",...f.style},onPointerDown:le(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),x.current=y.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),C(N))}),onPointerMove:le(e.onPointerMove,C),onPointerUp:le(e.onPointerUp,N=>{const R=N.target;R.hasPointerCapture(N.pointerId)&&R.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),x.current=null})})})}),Qh="ScrollAreaThumb",UP=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=$P(Qh,e.__scopeScrollArea);return c.jsx(Wn,{present:n||s.hasThumb,children:c.jsx(vK,{ref:t,...r})})}),vK=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,i=Gn(Qh,n),o=$P(Qh,n),{onThumbPositionChange:a}=o,l=be(t,h=>o.onThumbChange(h)),u=m.useRef(void 0),d=up(()=>{u.current&&(u.current(),u.current=void 0)},100);return m.useEffect(()=>{const h=i.viewport;if(h){const f=()=>{if(d(),!u.current){const p=bK(h,a);u.current=p,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[i.viewport,d,a]),c.jsx(fe.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:le(e.onPointerDownCapture,h=>{const p=h.target.getBoundingClientRect(),y=h.clientX-p.left,g=h.clientY-p.top;o.onThumbPointerDown({x:y,y:g})}),onPointerUp:le(e.onPointerUp,o.onThumbPointerUp)})});UP.displayName=Qh;var M0="ScrollAreaCorner",BP=m.forwardRef((e,t)=>{const n=Gn(M0,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(xK,{...e,ref:t}):null});BP.displayName=M0;var xK=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=Gn(M0,n),[i,o]=m.useState(0),[a,l]=m.useState(0),u=!!(i&&a);return rl(s.scrollbarX,()=>{var h;const d=((h=s.scrollbarX)==null?void 0:h.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),rl(s.scrollbarY,()=>{var h;const d=((h=s.scrollbarY)==null?void 0:h.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?c.jsx(fe.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Zh(e){return e?parseInt(e,10):0}function zP(e,t){const n=e/t;return isNaN(n)?0:n}function cp(e){const t=zP(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function wK(e,t,n,r="ltr"){const s=cp(n),i=s/2,o=t||i,a=s-o,l=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return WP([l,u],h)(e)}function jk(e,t,n="ltr"){const r=cp(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,o]:[o*-1,0],u=nv(e,l);return WP([0,o],[0,a])(u)}function WP(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function HP(e,t){return e>0&&e<t}var bK=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&t(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function up(e,t){const n=Et(e),r=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),m.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function rl(e,t){const n=Et(t);At(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var qP=DP,SK=MP,kK=BP;const KP=m.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(qP,{ref:r,className:ue("relative overflow-hidden",e),...n,children:[c.jsx(SK,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(GP,{}),c.jsx(kK,{})]}));KP.displayName=qP.displayName;const GP=m.forwardRef(({className:e,orientation:t="vertical",...n},r)=>c.jsx(D0,{ref:r,orientation:t,className:ue("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:c.jsx(UP,{className:"relative flex-1 rounded-full bg-border"})}));GP.displayName=D0.displayName;function kr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Co(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const YP=6048e5,_K=864e5;let EK={};function dp(){return EK}function Xc(e,t){var a,l,u,d;const n=dp(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=kr(e),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function ef(e){return Xc(e,{weekStartsOn:1}
vendor: 9,270 bytes, line 353
353)}function XP(e){const t=kr(e),n=t.getFullYear(),r=Co(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=ef(r),i=Co(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=ef(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Rk(e){const t=kr(e);return t.setHours(0,0,0,0),t}function Nk(e){const t=kr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function TK(e,t){const n=Rk(e),r=Rk(t),s=+n-Nk(n),i=+r-Nk(r);return Math.round((s-i)/_K)}function CK(e){const t=XP(e),n=Co(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ef(n)}function jK(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function RK(e){if(!jK(e)&&typeof e!="number")return!1;const t=kr(e);return!isNaN(Number(t))}function NK(e){const t=kr(e),n=Co(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const AK={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},PK=(e,t,n)=>{let r;const s=AK[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Pm(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const OK={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},IK={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},DK={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},LK={date:Pm({formats:OK,defaultWidth:"full"}),time:Pm({formats:IK,defaultWidth:"full"}),dateTime:Pm({formats:DK,defaultWidth:"full"})},MK={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},FK=(e,t,n,r)=>MK[e];function Ol(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;s=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[a]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const $K={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},VK={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},UK={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},BK={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zK={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},WK={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},HK=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},qK={ordinalNumber:HK,era:Ol({values:$K,defaultWidth:"wide"}),quarter:Ol({values:VK,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ol({values:UK,defaultWidth:"wide"}),day:Ol({values:BK,defaultWidth:"wide"}),dayPeriod:Ol({values:zK,defaultWidth:"wide",formattingValues:WK,defaultFormattingWidth:"wide"})};function Il(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?GK(a,h=>h.test(o)):KK(a,h=>h.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function KK(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function GK(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function YK(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(s.length);return{value:o,rest:a}}}const XK=/^(\d+)(th|st|nd|rd)?/i,JK=/\d+/i,QK={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ZK={any:[/^b/i,/^(a|c)/i]},eG={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tG={any:[/1/i,/2/i,/3/i,/4/i]},nG={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rG={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sG={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},iG={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},oG={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},aG={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lG={ordinalNumber:YK({matchPattern:XK,parsePattern:JK,valueCallback:e=>parseInt(e,10)}),era:Il({matchPatterns:QK,defaultMatchWidth:"wide",parsePatterns:ZK,defaultParseWidth:"any"}),quarter:Il({matchPatterns:eG,defaultMatchWidth:"wide",parsePatterns:tG,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Il({matchPatterns:nG,defaultMatchWidth:"wide",parsePatterns:rG,defaultParseWidth:"any"}),day:Il({matchPatterns:sG,defaultMatchWidth:"wide",parsePatterns:iG,defaultParseWidth:"any"}),dayPeriod:Il({matchPatterns:oG,defaultMatchWidth:"any",parsePatterns:aG,defaultParseWidth:"any"})},cG={code:"en-US",formatDistance:PK,formatLong:LK,formatRelative:FK,localize:qK,match:lG,options:{weekStartsOn:0,firstWeekContainsDate:1}};function uG(e){const t=kr(e);return TK(t,NK(t))+1}function dG(e){const t=kr(e),n=+ef(t)-+CK(t);return Math.round(n/YP)+1}function JP(e,t){var d,h,f,p;const n=kr(e),r=n.getFullYear(),s=dp(),i=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(f=s.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=Co(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=Xc(o,t),l=Co(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=Xc(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function hG(e,t){var a,l,u,d;const n=dp(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=JP(e,t),i=Co(e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),Xc(i,t)}function fG(e,t){const n=kr(e),r=+Xc(n,t)-+hG(n,t);return Math.round(r/YP)+1}function Me(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}
vendor: 5,448 bytes, line 353
353const Rs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Me(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Me(n+1,2)},d(e,t){return Me(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Me(e.getHours()%12||12,t.length)},H(e,t){return Me(e.getHours(),t.length)},m(e,t){return Me(e.getMinutes(),t.length)},s(e,t){return Me(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return Me(s,t.length)}},qo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ak={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Rs.y(e,t)},Y:function(e,t,n,r){const s=JP(e,r),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return Me(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Me(i,t.length)},R:function(e,t){const n=XP(e);return Me(n,t.length)},u:function(e,t){const n=e.getFullYear();return Me(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Me(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Me(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Rs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Me(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=fG(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):Me(s,t.length)},I:function(e,t,n){const r=dG(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Me(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Rs.d(e,t)},D:function(e,t,n){const r=uG(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Me(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Me(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Me(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return Me(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=qo.noon:r===0?s=qo.midnight:s=r/12>
vendor: 4,402 bytes, line 353
353=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=qo.evening:r>=12?s=qo.afternoon:r>=4?s=qo.morning:s=qo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Rs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Rs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Rs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Rs.s(e,t)},S:function(e,t){return Rs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ok(r);case"XXXX":case"XX":return zi(r);case"XXXXX":case"XXX":default:return zi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ok(r);case"xxxx":case"xx":return zi(r);case"xxxxx":case"xxx":default:return zi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pk(r,":");case"OOOO":default:return"GMT"+zi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pk(r,":");case"zzzz":default:return"GMT"+zi(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Me(r,t.length)},T:function(e,t,n){const r=e.getTime();return Me(r,t.length)}};function Pk(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+Me(i,2)}function Ok(e,t){return e%60===0?(e>0?"-":"+")+Me(Math.abs(e)/60,2):zi(e,t)}function zi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Me(Math.trunc(r/60),2),i=Me(r%60,2);return n+s+t+i}const Ik=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},QP=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},pG=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return Ik(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Ik(r,t)).replace("{{time}}",QP(s,t))},mG={p:QP,P:pG},gG=/^D+$/,yG=/^Y+$/,vG=["D","DD","YY","YYYY"];function xG(e){return gG.test(e)}function wG(e){return yG.test(e)}function bG(e,t,n){const r=SG(e,t,n);if(console.warn(r),vG.includes(e))throw new RangeError(r)}function SG(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const kG=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_G=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EG=/^'([^]*?)'?$/,TG=/''/g,CG=/[a-zA-Z]/;function Dk(e,t,n){var d,h,f,p;const r=dp(),s=r.locale??cG,i=r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,o=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,a=kr(e);if(!RK(a))throw new RangeError("Invalid time value");let l=t.match(_G).map(y=>{const g=y[0];if(g==="p"||g==="P"){const b=mG[g];return b(y,s.formatLong)}return y}).join("").match(kG).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const g=y[0];if(g==="'")return{isToken:!1,value:jG(y)};if(Ak[g])return{isToken:!0,value:y};
353if(g.match(CG))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:y}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return l.map(y=>{if(!y.isToken)return y.value;const g=y.value;(wG(g)||xG(g))&&bG(g,t,String(e));const b=Ak[g[0]];return b(a,g,s.localize,u)}).join("")}function jG(e){const t=e.match(EG);return t?t[1].replace(TG,"'"):e}const RG=()=>{const{user:e,signOut:t}=Px(),n=du(),[r,s]=m.useState(null),i=m.useMemo(()=>wj(),[]),{data:o,isLoading:a,error:l}=BF({queryKey:["admin-bookings"],queryFn:async()=>{const{data:f,error:p}=await i.from("bookings").select("*").order("created_at",{ascending:!1});if(p){const y=crypto.randomUUID();throw console.error(`Database error (ref: ${y})`),new Error("Unable to load bookings. Please try again or contact support.")}return f}}),u=async()=>{await t(),n("/admin/login")},d=f=>{try{return Dk(new Date(f),"PPP")}catch{return f}},h=f=>{try{return Dk(new Date(f),"PPP 'at' p")}catch{return f}};return a?c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:c.jsx(mh,{className:"h-8 w-8 animate-spin text-primary"})}):l?c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:c.jsx(Yh,{className:"max-w-md",children:c.jsx(Xh,{className:"pt-6",children:c.jsx("p",{className:"text-destructive text-center",children:"Error loading bookings. Please try again later."})})})}):c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("header",{className:"border-b bg-card",children:c.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"bg-primary p-2 rounded",children:c.jsx("img",{src:Vf,alt:"IRIDE",className:"h-6 w-auto"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-bold",children:"Admin Dashboard"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:e==null?void 0:e.email})]})]}),c.jsxs(et,{variant:"outline",onClick:u,children:[c.jsx(pL,{className:"mr-2 h-4 w-4"}),"Sign Out"]})]})}),c.jsx("main",{className:"container mx-auto px-4 py-8",children:c.jsxs(Yh,{children:[c.jsxs(j0,{children:[c.jsxs(R0,{className:"flex items-center gap-2",children:[c.jsx(ub,{className:"h-5 w-5"}),"Booking Submissions"]}),c.jsxs(N0,{children:[(o==null?void 0:o.length)??0," total bookings"]})]}),c.jsx(Xh,{children:o&&o.length>0?c.jsx("div",{className:"rounded-md border",children:c.jsxs(aP,{children:[c.jsx(lP,{children:c.jsxs(cv,{children:[c.jsx(Ui,{children:"Date"}),c.jsx(Ui,{children:"Name"}),c.jsx(Ui,{children:"Tour"}),c.jsx(Ui,{children:"Email"}),c.jsx(Ui,{children:"Phone"}),c.jsx(Ui,{className:"text-right",children:"Actions"})]})}),c.jsx(cP,{children:o.map(f=>c.jsxs(cv,{children:[c.jsx(Bi,{className:"whitespace-nowrap",children:d(f.created_at)}),c.jsx(Bi,{className:"font-medium",children:f.full_name}),c.jsx(Bi,{children:c.jsx(Ck,{variant:"secondary",children:f.tour_name})}),c.jsx(Bi,{children:f.email}),c.jsx(Bi,{children:f.phone}),c.jsx(Bi,{className:"text-right",children:c.jsxs(et,{variant:"ghost",size:"sm",onClick:()=>s(f),children:[c.jsx(lL,{className:"h-4 w-4 mr-1"}),"View"]}
353)})]},f.id))})]})}):c.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[c.jsx(ub,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),c.jsx("p",{children:"No bookings yet"})]})})]})}),c.jsx(lK,{open:!!r,onOpenChange:()=>s(null),children:c.jsxs(NP,{className:"max-w-2xl max-h-[90vh]",children:[c.jsxs(AP,{children:[c.jsx(PP,{children:"Booking Details"}),c.jsxs(OP,{children:["Submitted on ",r&&h(r.created_at)]})]}),r&&c.jsx(KP,{className:"max-h-[70vh] pr-4",children:c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[c.jsx(wL,{className:"h-4 w-4"}),"Personal Information"]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Full Name:"}),c.jsx("p",{className:"font-medium",children:r.full_name})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Date of Birth:"}),c.jsx("p",{className:"font-medium",children:d(r.date_of_birth)})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Nationality:"}),c.jsx("p",{className:"font-medium",children:r.nationality})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Country of Residence:"}),c.jsx("p",{className:"font-medium",children:r.country_of_residence})]})]})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[c.jsx(WT,{className:"h-4 w-4"}),"Contact Information"]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Email:"}),c.jsx("p",{className:"font-medium",children:r.email})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Phone:"}),c.jsx("p",{className:"font-medium",children:r.phone})]}),c.jsxs("div",{className:"col-span-2",children:[c.jsx("span",{className:"text-muted-foreground",children:"Residential Address:"}),c.jsx("p",{className:"font-medium",children:r.residential_address})]})]})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[c.jsx(bs,{className:"h-4 w-4"}),"Tour Details"]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Tour:"}),c.jsx("p",{className:"font-medium",children:r.tour_name})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Bike Option:"}),c.jsx("p",{className:"font-medium",children:r.bike_option})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Has Pillion:"}),c.jsx("p",{className:"font-medium",children:r.has_pillion})]}),r.payment_method&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Payment Method:"}),c.jsx("p",{className:"font-medium",children:r.payment_method})]})]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold mb-3",children:"Riding Experience"}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Years Experience:"}),c.jsx("p",{className:"font-medium",children:r.years_experience})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Off-road Experience:"}),c.jsx("p",{className:"font-medium",children:r.off_road_experience})]}),r.has_valid_licence&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Valid Licence:"}),c.jsx("p",{className:"font-medium",children:r.has_valid_licence})]}),r.licence_country&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Licence Country:"}),c.jsx("p",{className:"font-medium",children:r.licence_country})]}),r.certifications&&c.jsxs("div",{className:"col-span-2",children:[c.jsx("span",{className:"text-muted-foreground",children:"Certifications:"}),c.jsx("p",{className:"font-medium",children:r.certifications})]})]})]}
353),(r.physically_fit||r.has_insurance||r.medical_conditions||r.fitness_details||r.insurance_provider||r.insurance_policy_number)&&c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold mb-3",children:"Health & Insurance"}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[r.physically_fit&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Physically Fit:"}),c.jsx("p",{className:"font-medium",children:r.physically_fit})]}),r.has_insurance&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Has Insurance:"}),c.jsx("p",{className:"font-medium",children:r.has_insurance})]}),r.medical_conditions&&c.jsxs("div",{className:"col-span-2",children:[c.jsx("span",{className:"text-muted-foreground",children:"Medical Conditions:"}),c.jsx("p",{className:"font-medium",children:r.medical_conditions})]}),r.fitness_details&&c.jsxs("div",{className:"col-span-2",children:[c.jsx("span",{className:"text-muted-foreground",children:"Fitness Details:"}),c.jsx("p",{className:"font-medium",children:r.fitness_details})]}),r.insurance_provider&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Insurance Provider:"}),c.jsx("p",{className:"font-medium",children:r.insurance_provider})]}),r.insurance_policy_number&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Policy Number:"}),c.jsx("p",{className:"font-medium",children:r.insurance_policy_number})]})]})]}),r.emergency_name&&c.jsxs("div",{children:[c.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[c.jsx(qT,{className:"h-4 w-4"}),"Emergency Contact"]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Name:"}),c.jsx("p",{className:"font-medium",children:r.emergency_name})]}),r.emergency_relationship&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Relationship:"}),c.jsx("p",{className:"font-medium",children:r.emergency_relationship})]}),r.emergency_phone&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Phone:"}),c.jsx("p",{className:"font-medium",children:r.emergency_phone})]}),r.emergency_country&&c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Country:"}),c.jsx("p",{className:"font-medium",children:r.emergency_country})]})]})]}),r.dietary_requirements&&r.dietary_requirements.length>0&&c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold mb-3",children:"Dietary Requirements"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:r.dietary_requirements.map((f,p)=>c.jsx(Ck,{variant:"outline",children:f},p))}),r.dietary_other&&c.jsxs("p",{className:"mt-2 text-sm",children:[c.jsx("span",{className:"text-muted-foreground",children:"Other: "}),r.dietary_other]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold mb-3",children:"Declaration"}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Declaration Name:"}),c.jsx("p",{className:"font-medium",children:r.declaration_name})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Declaration Date:"}),c.jsx("p",{className:"font-medium",children:d(r.declaration_date)})]}),c.jsxs("div",{className:"col-span-2",children:[c.jsx("span",{className:"text-muted-foreground",children:"Electronic Signature:"}),c.jsx("p",{className:"font-medium italic",children:r.electronic_signature})]})]})]})]})})]})})]})},NG=()=>{const e=Po();return m.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsxs("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:[c.jsx(Rn,{title:"Page Not Found | iRide Adventures",description:"The page you're looking for doesn't exist. Return to iRide Adventures to explore our expeditions and training.",path:"/404"}),c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),c.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),c.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})]})},AG=new EF,PG=()=>c.jsx(NF,{client:AG,children:c.jsxs(oF,{children:[c.jsx(nM,{}),c.jsx(IM,{}),c.jsx($$,{children:c.jsx(IU,{children:c.jsxs(P$,{children:[c.jsx(zt,{path:"/",element:c.jsx(hW,{})}),c.jsx(zt,{path:"/expeditions",element:c.jsx(yW,{})}),c.jsx(zt,{path:"/training",element:c.jsx(DW,{})}),c.jsx(zt,{path:"/special-courses",element:c.jsx($W,{})}),c.jsx(zt,{path:"/great-escape",element:c.jsx(CW,{})}),c.jsx(zt,{path:"/facilities",element:c.jsx(WW,{})}),c.jsx(zt,{path:"/inside-iride",element:c.jsx(XW,{})}),c.jsx(zt,{path:"/gallery",element:c.jsx(QW,{})}),c.jsx(zt,{path:"/privacy-policy",element:c.jsx(tH,{})}),c.jsx(zt,{path:"/terms-and-conditions",element:c.jsx(sH,{})}),c.jsx(zt,{path:"/booking",element:c.jsx($q,{})}),c.jsx(zt,{path:"/liability-waiver",element:c.jsx(Bq,{})}),c.jsx(zt,{path:"/admin/login",element:c.jsx(qq,{})}),c.jsx(zt,{path:"/admin",element:c.jsx(DU,{requireAdmin:!0,children:c.jsx(RG,{})})}),c.jsx(zt,{path:"*",element:c.jsx(NG,{})})]})})})]})});sT(document.getElementById("root")).render(c.jsx(dT,{children:c.jsx(PG,{})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.